@font-face {
    font-family: "ADJMN Press Start";
    src: url("/games/fonts/PressStart2P-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

/*
 * Independent, below-game score panels. All selectors are scoped to the
 * injected section so the stylesheet cannot alter the game runner layout.
 */
.game-scoreboards {
    --scores-mint: #a4f5dc;
    --scores-mint-dim: #79c9aa;
    --scores-black: #030806;
    --scores-line: rgba(164, 245, 220, .34);
    width: min(100%, 960px);
    margin: clamp(28px, 6vw, 58px) auto 0;
    padding: clamp(15px, 3vw, 25px);
    border: 1px solid #34483f;
    color: var(--scores-mint);
    background:
        repeating-linear-gradient(0deg, rgba(164, 245, 220, .018) 0, rgba(164, 245, 220, .018) 1px, transparent 1px, transparent 4px),
        #101512;
    box-shadow: 0 13px 35px rgba(0, 0, 0, .28);
}

.game-scoreboards,
.game-scoreboards * {
    box-sizing: border-box;
}

.game-scoreboards h2 {
    margin: 0;
    color: var(--scores-mint);
    font: 700 .8rem/1.55 "Courier New", monospace;
    letter-spacing: .03em;
    text-align: center;
    text-shadow: 0 0 8px rgba(164, 245, 220, .18);
    text-transform: uppercase;
}

.game-scoreboards .scoreboards-note {
    max-width: 56ch;
    margin: 10px auto 20px;
    color: #c0d8cd;
    font: 500 .72rem/1.65 "Courier New", monospace;
    text-align: center;
}

.game-scoreboards .scoreboards-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(7px, 2vw, 18px);
}

.game-scoreboards .scoreboard-period {
    min-width: 0;
    padding: clamp(9px, 2vw, 17px) clamp(6px, 1.8vw, 15px) 12px;
    border: 1px solid #315044;
    background:
        repeating-linear-gradient(0deg, rgba(164, 245, 220, .025) 0, rgba(164, 245, 220, .025) 1px, transparent 1px, transparent 4px),
        var(--scores-black);
    text-shadow: 0 0 7px rgba(164, 245, 220, .12);
}

.game-scoreboards .scoreboard-period h3 {
    min-height: 3.4em;
    display: grid;
    align-content: center;
    margin: 0 0 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--scores-line);
    color: var(--scores-mint);
    font: 700 .72rem/1.5 "Courier New", monospace;
    letter-spacing: .02em;
    text-align: center;
    text-transform: uppercase;
}

.game-scoreboards .board-status {
    min-height: 1.6em;
    margin: 0 0 5px;
    color: #c3e5d6;
    font: 500 .72rem/1.5 "Courier New", monospace;
    overflow-wrap: anywhere;
}

.game-scoreboards .board-status:empty {
    display: none;
}

.game-scoreboards .board-status.error {
    color: #ffc1c1;
    text-shadow: none;
}

.game-scoreboards .board-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 2px 0 0;
    list-style: none;
}

.game-scoreboards .board-row {
    display: grid;
    grid-template-columns: 1.55em minmax(2.3em, 1fr) minmax(3.6em, auto);
    align-items: center;
    gap: clamp(2px, .8vw, 8px);
    min-width: 0;
    min-height: 1.47em;
    color: var(--scores-mint);
    font: 700 .68rem/1.5 "Courier New", monospace;
    letter-spacing: .01em;
    font-variant-numeric: tabular-nums;
}

.game-scoreboards .board-rank {
    color: var(--scores-mint-dim);
}

.game-scoreboards .board-initials,
.game-scoreboards .board-score {
    min-width: 0;
    white-space: nowrap;
}

.game-scoreboards .board-score {
    text-align: right;
}

@media (max-width: 359px) {
    .game-scoreboards {
        padding: 12px 9px;
    }

    .game-scoreboards .scoreboards-note {
        margin-bottom: 14px;
        font-size: .66rem;
    }

    .game-scoreboards .scoreboard-period {
        padding-right: 5px;
        padding-left: 5px;
    }

    .game-scoreboards .board-row {
        grid-template-columns: 1.35em minmax(2em, 1fr) minmax(3.1em, auto);
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-scoreboards,
    .game-scoreboards * {
        scroll-behavior: auto;
    }
}
