html, body {
    margin: 0;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;
    color: #7f5539;
}
body {
    background-color: #ede0d4;

    display: flex;
    align-items: center;
    justify-content: center;
}

main {
    margin: 1rem;
    touch-action: manipulation;
}
h1, h2 {
    margin: 0;
}
h2 {
    font-size: 1.2em;
    font-weight: normal;
}
p {
    margin: 0;
}
button {
    background-color: #7f5539;
    border: none;
    padding: 0.5em;
    cursor: pointer;

    color: #ede0d4;
    font-family: inherit;
    font-size: inherit;
}

#board {
    display: grid;
    grid-template-columns: repeat(9, 32px);
    grid-template-rows: repeat(9, 32px);
    gap: 4px;

    margin: 1em 0;
}

.slot {
    color: #D0C2B7;
    font-weight: bold;
    font-size: 16pt;
    background-color: #F5EDE6;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}
.tile {
    color: #5f402b;
    font-weight: bold;
    font-size: 16pt;
    background-color: #e6ccb2;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}
.tile:hover, .tile:active {
    background-color: #D8AF86;
}
.tile.selected {
    color: #1E2B16;
    background-color: #6a994e;
}
.tile.selected:hover, .tile.selected:active {
    background-color: #5A8243;
}

.text-button {
    font-size: 1.2em;
    margin: 0.5em 0;

    color: inherit;
    display: block;
    background: none;
    border: none;
    padding: 0;
}
.text-button > span {
    font-size: 10pt;

    display: inline-block;
    padding: 0 0.25em;
    border-radius: 0.25em;

    color: #ede0d4;
    background-color: #5f402b
}

.hint {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;

    display: flex;

    justify-content: center;
    align-items: center;
}
.hint.left { justify-content: flex-start; }
.hint.right { justify-content: flex-end; }
.hint.top { align-items: flex-start; }
.hint.bottom { align-items: flex-end; }
.hint-dot {
    display: block;

    background-color: #a7c957;
    border-radius: 50%;

    width: 15.625%;
    height: 15.625%;
}
.hint-dot.potential {
    background-color: rgb(158, 204, 224, 0.5);
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    text-align: center;
    background-color: #ede0d4;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s;
}
.screen h1, .screen h2 {
    margin: 0.5em;
}

#retry {
    margin-top: 1em;
}