@font-face {
    font-family: "unifont";
    src: url("/static/unifont-17.0.01.otf") format("opentype");
    font-display: swap;
}

html {
    width: 100%;
    height: 100%;
    background: #808080;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "unifont", monospace;
    font-size: 16px;
    line-height: 1rem;
    user-select: none;
}

body {
    margin: 0;
    width: 40rem;
    height: 25rem;
    background: white;
    display: flex;
    flex-direction: column;
    cursor: none;
    position: relative;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

@media (max-width: 640px), (max-height: 400px) {
    html {
        width: 100dvw;
        height: 100dvh;
        align-items: unset;
    }

    body {
        width: 100dvw;
        height: 100dvh;
    }
}

header {
    background: #ccc;
    text-align: center;
}

footer {
    background: #ccc;
}

div[name="page"] {
    height: 100%;
    flex: auto;
    overflow: hidden auto;
    user-select: text;
    white-space: pre-wrap;
    /* color: #4C4C4C; */
    color: #666;

    i {
        color: black;
        font-weight: normal;
        font-style: normal;
    }

    a {
        color: darkred;
    }

    a:active {
        background: #999;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-size: 1rem;
        font-weight: normal;
        text-indent: 2rem;
        margin-block: 1rem;
    }

    h1::before {
        content: "‹‹‹ ";
    }
    h1::after {
        content: " ›››";
    }

    h2::before {
        content: "‹‹ ";
    }
    h2::after {
        content: " ››";
    }

    h3::before {
        content: "‹ ";
    }
    h3::after {
        content: " ›";
    }

    h4::before {
        content: "#### ";
    }
    h5::before {
        content: "##### ";
    }
    h6::before {
        content: "###### ";
    }

    blockquote {
        margin-block: 1rem;
        margin-inline-start: 2rem;
        margin-inline-end: 2rem;
        background: #ccc;
    }

    blockquote blockquote {
        background: #999;
    }

    code {
        font-family: "unifont", monospace;
        font-size: 1rem;
        background: black;
        color: #ccc;
    }

    code::selection {
        background: white;
        color: black;
    }

    pre {
        font-family: "unifont", monospace;
        font-size: 1rem;
    }

    pre.code {
        padding-block: 1rem;
        background: black;
        color: white;
    }

    hr {
        color: inherit;
        border: none;
        outline: solid 1px;
        outline-offset: -17px;
        height: 1rem;
        margin: 0;
    }

    fieldset {
        border: none;
        margin: 0;
        padding: 0;
        background-color: #999;
    }

    fieldset .input-box {
        display: inline-block;
    }

    fieldset input:not([type]),
    fieldset input[type="text"] {
        background-color: #999;
        border: none;
        font-family: "unifont", monospace;
        font-size: 16px;
        outline: none;
        padding: 0;
        cursor: none;
    }

    fieldset button {
        background-color: #999;
        border: none;
        font-family: "unifont", monospace;
        font-size: 16px;
        padding: 0;
        cursor: none;
    }

    fieldset button:active::before,
    fieldset button:active::after,
    fieldset button:hover::before,
    fieldset button:hover::after {
        color: white;
    }

    fieldset button::before {
        content: "< ";
    }

    fieldset button::after {
        content: " >";
    }

    fieldset progress {
        appearance: none;
        width: 80px;
        height: 16px;
        vertical-align: text-bottom;
    }

    fieldset progress::-webkit-progress-bar {
        background: #ccc;
    }

    fieldset progress::-webkit-progress-value {
        background: black;
    }
}

div[name="pointer"] {
    position: absolute;
    width: 0.5rem;
    height: 1rem;
    background: white;
    mix-blend-mode: difference;
    pointer-events: none;
}

div[name="title"] {
    width: fit-content;
    display: inline-block;
}

div.entries {
    display: inline flex;
    flex-direction: column;
    text-indent: 4rem;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: none;
}

a.normal {
    padding-inline: 0.5rem;
}

img {
    display: block;
    margin: 0 auto;
    outline: solid 2px blue;
    outline-offset: -2px;
    min-width: 16px;
    min-height: 16px;
}

::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-button {
    display: none;
}

::-webkit-scrollbar-thumb {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAYAAABllJ3tAAAAGklEQVQI12NkYGD4z4AAjOh8JiQJBiRJOB8Afr4EBJ3LpqcAAAAASUVORK5CYII=);
    /*background: black;*/
}

::-webkit-scrollbar-track {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAYAAABllJ3tAAAAGUlEQVQI12NgYGD4z4AK0Pk4Jf4zMDAwAACFvAP9HeZCzAAAAABJRU5ErkJggg==);
}

::selection {
    background: black;
    color: white;
}
