body {
    background-color: silver;
    background: url("bg.png");
    background-size: 200px 200px;
    overflow: hidden;
}

.window, .popup {
    font-family: helvetica;
    border: solid 1pt black;
    box-shadow: 2pt 2pt rgba(0, 0, 0, 0.33);
    position: absolute;
    padding: 0;
    visibility: hidden;
}

.window {
    background: white;
    max-width: 30em;
    margin: 0;
    top: 1em;
    left: 1em;
    margin-right: 1em;
    max-height: 85vh;
    overflow: hidden;
}

.scrollable {
    max-height: calc(85vh - 2em);
    overflow: auto;
}

.popup {
    width: 25em;
    background: #f7f3d1;
    bottom: 1em;
    right: 1em;
    cursor: pointer;
    font-style: italic;
    z-index: 2;
}

@media (max-width: 500px) {
    .popup {
        display: none;
    }
}

h1 {
    margin: 0;
    padding: 0.5em 1em;
    background: gray;
    color: white;
    font-size: 1em;
    border-bottom: solid 1pt black;
    cursor:default;
}

*::selection {
    background: darkblue;
    color: white;
}

h1::selection {
    background: transparent;
}

a {
    color: blue;
    text-decoration: underline;
}

h2 {
    font-size: 1em;
    border-top: solid 1pt black;
    padding: 1em;
    padding-bottom: 0;
    margin: 0;
    margin-bottom: 1em;
}

button {
    font-family: helvetica;
    font-weight: bold;
    font-size: 0.9em;
    color: black;
    border: 1pt outset silver;
    background: silver;
    height: 2em;
    padding: 0 0.5em;
}

button.titlebar-button {
    position: absolute;
    right: 6px;
    top: 6px;
    height: 22px;
    padding: 0 5px;
}

button:active {
    border-style: inset;
}

p {
    margin: 1em;
    line-height: 1.2em;
}

ul {
    margin-top: -0.5em;
    line-height: 1.2em;
    list-style-type: square;
}

img {
    max-width: calc(100vw - 2em);
    display: block;
}

.loading-bar {
    background-image: url("loading_pattern.png");
    height: 0.5em;
    animation: 1s linear 0s infinite loading_anim;
}

@keyframes loading_anim {
  to {
    background-position-x: 600px;
  }
}