body {
    background-color: #009688;
    font-family: sans-serif;
    overscroll-behavior-y: contain;
    margin-top: 0px;
    margin-bottom: 0px;
}

#instructions-overlay, #share-overlay, #excluded-word-overlay {
    background-color: rgba(200, 200, 200, 190);
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100vw;
    min-height: 100vh;
}

#content, #instructions, #share, #excluded-word {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    min-height: 100vh;
}

#instructions img {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

#close-instructions {
    margin-bottom: 1em;
}

#instructions p, #share p, #excluded-word p {
    margin: 2em;
    text-align: center;
}

#instructions ul {
    margin: 2em;
    margin-top: 0;
}

button {
    margin-top: 0.5em;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    display: block;
    background-color: #6fb05c;
    border-color: #649e53;
    border-style: none none solid none;
    border-width: 0.2em;
    font-size: 1.8em;
    color: white;
    padding: 0.2em 0.4em;
    border-radius: 0.5em;
}

button:active {
    border-style: solid none none none;
    border-color: #6fb05c;
}

.title-bar {
    display: flex;
    margin-left: 1.5em;
    margin-right: 1.5em;
}

.title-bar h1 {
    flex-grow: 1;
}

.title-space, .title-bar svg {
    width: 2em;
    padding: 0 0.4em;
}

.loading .title-space, .loading svg {
    display: none;
}

h1, h2, #current-word, #word-message, #word-count {
    text-align: center;
    padding-left: 1em;
    padding-right: 1em;
}

#message {
    font-size: large;
    text-align: center;
}

#word-container {
    display: grid;
}

#word-count {
    font-weight: bold;
    font-size: x-large;
}

#word-message, #current-word, #word-count {
    margin-top: 0.2em;
    margin-bottom: 0.2em;
}

#word-message, #current-word {
    font-weight: bold;
    font-size: xx-large;
    height: 1.5em;
    grid-area: 1 / 1 / 2 / 2;
}

#word-message {
    background-color: #fff;
    animation-duration: 1.0s;
    animation-name: fade;
    animation-timing-function: ease-out;
    animation-delay: 2s;
    animation-fill-mode: forwards;
}

#word-lists h2 {
    text-align: left;
}

#word-lists div, #puzzle-selector {
    margin-left: 1em;
    margin-right: 1em;
}

#word-lists span {
    display: inline-block;
    font-size: x-large;
}

#hint-checkboxes {
    margin-top: 1em;
}

#hint-checkboxes label {
    display: block;
    font-size: large;
    margin-left: 1em;
}

.finished #game-grid {
    animation-duration: 1.0s;
    animation-name: spin;
    animation-timing-function: ease-in-out;
}

@keyframes fade {
    from {
        opacity: 1.0;
    }
    to {
        opacity: 0.0;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(720deg);
    }
}

#game-grid {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 95%;
    user-select: none;
    touch-action: none;
}

#game-grid * {
    pointer-events: none;
}

.letter path {
    fill: #eee;
    stroke: #aaa;
    stroke-width: 0.02em;
}

#route-line circle {
    fill: red;
    opacity: 0.7;
}

#route-line path {
    fill: none;
    stroke: red;
    opacity: 0.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.starts {
    fill: #811;
}

.counts {
    fill: #333;
}

.no-starts-hint .starts {
    display: none;
}

.no-visits-hint .visits {
    display: none;
}

.no-words-hint #hint-checkboxes {
    display: none;
}

.letter.finished .starts, .letter.finished .visits {
    display: none;
}

.letter.finished text {
    fill: #999;
}

.letter.finished path {
    stroke: none;
    fill: #e8e8e8;
}

#score-meter {
    position: relative;
    width: 60%;
    height: 2em;
    border: 0.1em solid black;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

#next-level-marker {
    position: absolute;
    font-size: 1.3em;
    white-space: nowrap;
}

#score-bar {
    position: absolute;
    height: 100%;
    background-color: #009688;
}

#share-text {
    margin-left: 2em;
    margin-right: 2em;
    font-family: sans-serif;
}

@media only all and (max-width: 45em) {
    #content, #instructions, #share, #exluded-word {
        position: absolute;
        top: 0px;
        left: 0px;
        width: 100%;
        margin-left: 0px;
        margin-right: 0px;
        border-radius: 0px;
    }
}

@media not all and (max-width: 45em) {
    #content, #instructions, #share, #excluded-word {
        max-width: 40em;
        margin-left: auto;
        margin-right: auto;
    }
}
