:root {
    --bg: #ffffff;
    --fg: #000000;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f0f;
        --fg: #ffffff;
    }
}

html, body {
    background-color: var(--bg);
    color: var(--fg);
}

html {
    height: 100%;
}

body {
    padding: 0px;
    margin: 0px auto;
    max-width: 640px;
    min-height: 100%;
    padding: 0px 32px;
    font-family: 'Arial', 'Liberation Sans', sans-serif;
    font-size: 1.25em;
    line-height: 1.4;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
}

a {
    color: inherit;
    text-decoration: none;
    border-bottom: 2px solid var(--fg);
    cursor: pointer;
}

hr {
    border: none;
    height: 2px;
    background-color: var(--fg);
}

.content {
    gap: 16px 0px;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.text-center {
    text-align: center;
}

.inline {
    display: inline;
}

.game-board, .control-button-panel {
    display: grid;
}

.game-board {
    grid-template-columns: repeat(4, 3em);
    grid-template-rows: repeat(4, 3em);
    gap: 0.5em;
}

.square {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    user-select: none;
    border: 2px solid var(--fg);
}

.game-board-piece {
    width: 3em;
    height: 3em;
}

.button, .empty-button {
    width: 1.5em;
    height: 1.5em;
}

.button {
    cursor: pointer;
}

.empty-button {
    border: 2px solid transparent;
}

.control-button-panel {
    grid-template-columns: repeat(3, 1.5em);
    grid-template-rows: repeat(3, 1.5em);
    gap: 0.5em;
}