html, body {
    color: white;
    font-family: "Courier New";
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
}

/* Scale canvas with resize attribute to full size.
 * From paper.js's website.
 */
canvas[resize] {
    width: 100%;
    margin: 0;
    flex-grow: 2;
}

#sidebar {
    max-width: 350px;
    max-height: 80%;
    align-items: stretch;
    position: fixed;
    background-color: black;
    z-index: 1;
    top: 0;
    right: 0;
    margin: 20px;
    padding: 10px;
    overflow-wrap: break-word;

    display: flex;
    flex-direction: column;
}

#sidebar-inner {
    border-color: white;
    border-width: 1px;
    border-style: dashed;
    padding: 10px;
    overflow-y: scroll;

    flex: 1 1;
}

h1 {
    margin: 0;
    font-size: 2em;
    font-weight: bold;
}

h2 {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}

#submit {
    font-size: 1em;
    margin-top: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    color: white;
    background-color: black;
    border-radius: 0;
    -webkit-appearance: none;
    min-height: fit-content;
    flex: 0 1;
}

#submit:hover {
    background-color: #222222;
}

#submit:active {
    background-color: white;
    color: black;
}

.tip {
    margin-top: -2px;
    margin-bottom: 10px;
    font-size: 0.8em;
    font-family: Arial, Helvetica, sans-serif;
    color: gray;
    font-style: italic;
}

.special {
    color: lightblue;
}

table {
    list-style: none;
    table-layout: fixed;
    box-sizing: border-box;
}

.description {
    padding-right: 2ch;
    width: min-content;
}

.setting {
    margin-top: 6px;
    line-height: 1.5;
}

input {
    background-color: #111111;
    border: 1px solid white;
    color: lightblue;
    font-family:'Courier New', Courier, monospace;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
}

.blank_row {
    height: 1em;
}

@media only screen and (pointer: coarse) {
    #sidebar {
        position: static;
        width: 100%;
        max-width: none;
        margin: 0;
        box-sizing: border-box;
        font-size: 3em;
        flex-grow: 1;
    }

    #sidebar-inner {
        width: 100%;
        box-sizing: border-box;
    }

    h1 {
        font-size: 1em;
    }

    h2 {
        font-size: 1em;
    }

    input[type=text] {
        font-size: 1em;
        width: 10ch;
        height: 2em; 
        padding: 0.5ch;
    }
}