body {
    --page-width: 100%;
    --ground: #111;
    block-size: 100dvh;
}

:is(.game-dashboard, .game-chronicle) {
    /* One row rhythm for the roster and the AST: side by side, a player sits on the same line in both. */
    --board-row-size: 3rem;
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    color: var(--ink-primary);

    > section {
        flex: 1;
        display: grid;
        align-content: start;
        gap: 1rem;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding: 1rem;
    }

    caption { scroll-margin-block-start: 1rem }
    h2 { text-align: center }
}

@media (min-width: 60rem) {
    body { block-size: auto }
    body > footer { display: none }
}

.game-dashboard {
    > section h2 { display: none }

    @media (min-width: 60rem) {
        display: grid;
        place-content: start center;
        gap: 1rem;
        min-block-size: 100vh;
        overflow: visible;
        padding: 1rem;

        section > h2 { display: revert }

        > section {
            display: contents;
            overflow: visible;
            overscroll-behavior-y: auto;
        }
    }

    @media (min-width: 112rem) {
        grid-template-columns: max-content max-content;

        :is(#panel-roster, #panel-nav) { max-inline-size: 46rem }
        > section { display: grid }
    }
}

@media (width < 60rem) {
    body:has(> footer [value="roster"]:checked) .game-dashboard > section:not(#panel-roster),
    body:has(> footer [value="ast"]:checked) .game-dashboard > section:not(#panel-ast),
    body:has(> footer [value="nav"]:checked) .game-dashboard > section:not(#panel-nav),
    body:has(> footer [value="help"]:checked) .game-dashboard > section:not(#panel-help) { display: none }
}
