body {
    --header-height: 32px;
    margin: 0;
    overflow: hidden;
    font-family: Roboto, system-ui, sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variant-numeric: proportional-nums;
}

h1, h2 {
    font-family: 'Source Serif 4', serif, sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variant-numeric: proportional-nums;
}

.popover {
    font-family: Roboto, system-ui, sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variant-numeric: proportional-nums;
}

header {
    background: #191A1E;
    line-height: 1.5;
    height: var(--header-height);
}

time {
    font-variant-numeric: tabular-nums;
}

main {
    display: flex;
}

.bingo-table {
    font-weight: 700;
}

#draft-random-button {
    font-weight: 600;
    font-size: min(1.15rem, 1.2vw);
    padding: 0.16em 0.5em 0.1em 0.5em;
    line-height: 1.0;
    width: 100%;
}

#draft-container {
    width: 100%;
}

#draft-pool {
    line-height: 1.0;
    background-color: #080808;
}

.draft .card-container table, .draft .card-container .card-header {
    opacity: 0.333;
}

.draft .card-container.draft-card table, .draft .card-container.draft-card .card-header {
    opacity: 1.0;
}

.draft .card-container.skipped-card .table-container {
    background-color: #300;
}

.draft-item {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5em;
    text-decoration: none;
    padding: 0.15em 0.3em;
    user-select: none;
    cursor: pointer;
}

.draft-item > span {
    flex-grow: 1;
}

.draft-item > span.draft-index {
    display: inline-block;
    min-width: 1.6em;
    font-variation-settings: 'wdth' 90;
    color: #999;
    font-size: 0.8em;
    flex-grow: 0;
}

.draft-item > span.draft-remaining {
    font-size: 0.85em;
    flex-grow: 0;
    display: flex;
    gap: 0.15em;
}

.draft-item > span.draft-remaining i {

}

#draft-pool > div:nth-child(odd) {
    background-color: #2B3035;
}

#draft-pool > div:nth-child(even) {
    background-color: #272C30;
}

#draft-pool > div:hover:not(.invalid) {
    background-color: rgb(var(--bs-secondary-bg-rgb));
}

#draft-pool > div[data-flag="watch"] {
    background-color: #5000A0;
}

#draft-pool > div[data-flag="watch"]:hover {
    background-color: #6000B0;
}

#draft-pool > div[data-flag="block"] {
    background-color: #A00000;
}

#draft-pool > div[data-flag="block"]:hover {
    background-color: #B00000;
}

body:not(.read-only) #draft-pool > div.selected {
    background-color: #0020E0;
}

body:not(.read-only) #draft-pool > div.selected:hover {
    background-color: #0030F0;
}

#draft-pool > div.invalid {
    cursor: default;
    opacity: 0.25;
}

.popover-body {
    font-variant-numeric: tabular-nums;
    white-space: pre-wrap;
}

.popover-body * {
    white-space: normal;
}

@supports (height: 100svh) {
    body {
        width: 100svw;
        height: 100svh;
    }

    main {
        height: calc(100svh - var(--header-height));
    }

    #draft {
        max-height: calc(100svh - var(--header-height));
    }

    @media (orientation: landscape) {
        #keyword-list, #draft-container {
            max-height: calc(100svh - var(--header-height));
        }
    }
}

@supports not (height: 100svh) {
    body {
        width: 100vw;
        height: calc(100 * var(--vh));
    }

    main {
        height: calc(100 * var(--vh) - var(--header-height));
    }

    #draft {
        max-height: calc(100 * var(--vh) - var(--header-height));
    }

    @media (orientation: landscape) {
        #keyword-list, #draft-container {
            max-height: calc(100 * var(--vh) - var(--header-height));
        }
    }
}

#bingo a {
    text-decoration: none;
    white-space: nowrap;
}

#bingo {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@supports (container-type: size) {
    #bingo {
        container-type: size;
        container-name: bingo-container;
    }
}

#card-grid {
    flex-grow: 0;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
}

.card-break {
    flex-basis: 100%;
}

[data-visible-card-count="2"] .card-break {
    display: none;
}

#draft, #keywords {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    font-weight: 600;
    font-variation-settings: 'wdth' 75;
    font-size: min(1.15em, 1.2vw);
    z-index: 1;
}

#draft {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: auto;
    width: 100%;
}

#keywords {
    flex-direction: row;
    align-items: center;
}

body:not(.draft) #draft {
    display: none;
}

.table-container {
    margin: auto;
    position: relative;
    overflow: hidden;
}

.bingo-table {
    table-layout: fixed;
    border-collapse: collapse;
    line-height: 1.0;
}

.bingo-table td {
    border: 1px solid var(--bs-body-color);
    position: relative;
    user-select: none;
    background-clip: padding-box;
}

.bingo-table td {
    cursor: pointer;
}

body.read-only .bingo-table td {
    cursor: default;
}

body.draft .bingo-table td {
    cursor: default;
}

body.draft .card-container.draft-card .bingo-table td {
    cursor: pointer;
}

.bingo-table td {
    background-color: #111;
}

body:not(.read-only) .bingo-table td:hover {
    background-color: #222;
}

.bingo-table td.selected {
    background-color: #0020E0;
}

body:not(.read-only) .bingo-table td.selected:hover {
    background-color: #0030F0;
}

.bingo-table td[data-flag="watch"] {
    background-color: #400080;
}

body:not(.read-only) .bingo-table td[data-flag="watch"]:hover {
    background-color: #500090;
}

.bingo-table td[data-flag="block"] {
    background-color: #A00000;
}

body:not(.read-only) .bingo-table td[data-flag="block"]:hover {
    background-color: #B00000;
}

.bingo-table td.marked {
    background-color: #0020E0;
}

body:not(.read-only) .bingo-table td.marked:hover {
    background-color: #0030F0;
}

.bingo-table td.recent {
    background-image: url('https://static.savageplayers.com/images/light-checker.png');
    background-size: 12.5%;
}

@keyframes mark-fade {
    0%   { background-color: #40A0FF; }
    100% { background-color: #0020E0; }
}

@keyframes mark-fade-hover {
    0%   { background-color: #50B0FF; }
    100% { background-color: #0030F0; }
}

.bingo-table td.marked.animated {
    animation-name: mark-fade-hover, mark-fade;
    animation-duration: 1s;
}

body:not(.read-only) .bingo-table td.marked.animated:hover {
    animation-name: mark-fade, mark-fade-hover;
    animation-duration: 1s;
}

.bingo-square-boundary {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: 2%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@supports (container-type: size) {
    .bingo-square-boundary {
        container-type: inline-size;
    }
}

td .bingo-square-content {
    --font-scale: 20;
    text-align: center;
    white-space: pre-line;
}

td .bingo-square-content.unscaled {
    visibility: hidden;
}

.square-id-container {
    position: absolute;
    top: 0;
    left: 1%;
    width: 12%;
    height: 12%;
    container-type: size;
}

.square-id {
    position: absolute;
    opacity: 65%;
    font-weight: 600;
}

@supports (container-type: size) {
    .square-id {
        font-size: 100cqi;
    }

    .bingo-square-content {
        font-size: calc(var(--font-scale) * 1cqi);
    }
}

@supports not (container-type: size) {
    .square-id {
        font-size: calc(100 * var(--cw));
    }

    .bingo-square-content {
        font-size: calc(var(--font-scale) * var(--cw));
    }
}

.card-name, .count {
    line-height: 1.0;
}

.bingo-table img, #draft-pool img, .card-name img {
    height: 1em;
    vertical-align: top;
}

img.flag-glow {
    filter: drop-shadow(0 0 0.1em rgba(255, 255, 255, 0.5));
}

img.objective-description {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20%;
    height: 20%;
    cursor: help;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

img.objective-description-draft {
    padding: 0.15em 0;
    cursor: help;
}

.card-header {
    flex-grow: 1;
    position: relative;
    display: flex;
    margin: auto;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    align-items: end;
    cursor: default;
}

body:not([data-card-count="1"]) .card-header {
    cursor: zoom-in;
}

body:not([data-card-count="1"]).single-visible-card .card-header {
    cursor: zoom-out;
}

body:not([data-card-count="1"]).single-visible-card #home-button {
    display: none;
}

body:not(.single-visible-card) #back-button-container, body[data-card-count="1"] #back-button-container {
    display: none;
}

.card-header h1 {
    text-align: center;
    margin-bottom: 0.13em;
    padding-bottom: calc(pow(1.0 - var(--font-scale), 1.5) * 0.82em) !important;
}

.card-header .count {
    position: absolute;
    margin: 0.28em;
}

.card-header .bell {
    position: absolute;
    bottom: 0.03em;
    padding-right: 0.25em;
    cursor: pointer;
}

body.draft .card-header .count {
    display: none;
}

body:not(.draft) .card-header .bell {
    display: none;
}

body.read-only .card-header .bell {
    display: none;
}

.card-header .bingo-count {
    left: 0;
}

.card-header .square-count {
    right: 0;
}

.card-header .bell {
    right: 0;
}

@supports (container-type: size) {
    .card-header {
        container-type: inline-size;
    }

    .card-header h1 {
        font-size: calc(var(--font-scale) * 6.75cqi);
        padding-bottom: 2.0cqi;
    }

    .card-header .count {
        font-size: 4.5cqi;
    }

    .card-header .bell {
        font-size: 5.2cqi;
    }
}

@supports not (container-type: size) {
    .card-header h1 {
        font-size: calc(var(--font-scale) * 6.75 * var(--cw));
        padding-bottom: calc(var(--font-scale) * 2.0 * var(--cw));
    }

    .card-header .count {
        font-size: calc(4.5 * var(--cw));
    }

    .card-header .bell {
        font-size: calc(5.2 * var(--cw));
    }
}

.bingo-line-container {
    pointer-events: none;
    opacity: 0.75;
}

@keyframes line-fade {
    0%   { opacity: 0.0; }
    100% { opacity: 1.0; }
}

.bingo-line {
    position: absolute;
    display: none;
    background: linear-gradient(
        hsla(0, 0%, 100%, 0.000)  0.00%,
        hsla(0, 0%, 100%, 0.013)  0.81%,
        hsla(0, 0%, 100%, 0.049)  1.55%,
        hsla(0, 0%, 100%, 0.104)  2.25%,
        hsla(0, 0%, 100%, 0.175)  2.90%,
        hsla(0, 0%, 100%, 0.259)  3.53%,
        hsla(0, 0%, 100%, 0.352)  4.12%,
        hsla(0, 0%, 100%, 0.450)  4.71%,
        hsla(0, 0%, 100%, 0.550)  5.29%,
        hsla(0, 0%, 100%, 0.648)  5.88%,
        hsla(0, 0%, 100%, 0.741)  6.47%,
        hsla(0, 0%, 100%, 0.825)  7.10%,
        hsla(0, 0%, 100%, 0.896)  7.75%,
        hsla(0, 0%, 100%, 0.951)  8.45%,
        hsla(0, 0%, 100%, 0.987)  9.19%,
        hsla(0, 0%, 100%, 1.000) 10.00%,
        hsla(0, 0%, 100%, 1.000) 90.00%,
        hsla(0, 0%, 100%, 0.987) 90.81%,
        hsla(0, 0%, 100%, 0.951) 91.55%,
        hsla(0, 0%, 100%, 0.896) 92.25%,
        hsla(0, 0%, 100%, 0.825) 92.90%,
        hsla(0, 0%, 100%, 0.741) 93.53%,
        hsla(0, 0%, 100%, 0.648) 94.12%,
        hsla(0, 0%, 100%, 0.550) 94.71%,
        hsla(0, 0%, 100%, 0.450) 95.29%,
        hsla(0, 0%, 100%, 0.352) 95.88%,
        hsla(0, 0%, 100%, 0.259) 96.47%,
        hsla(0, 0%, 100%, 0.175) 97.10%,
        hsla(0, 0%, 100%, 0.104) 97.75%,
        hsla(0, 0%, 100%, 0.049) 98.45%,
        hsla(0, 0%, 100%, 0.013) 99.19%,
        hsla(0, 0%, 100%, 0.000) 100.0%
    );
}

.bingo-line.bingo-line-col {
    background: linear-gradient(
        90deg,
        hsla(0, 0%, 100%, 0.000)  0.00%,
        hsla(0, 0%, 100%, 0.013)  0.81%,
        hsla(0, 0%, 100%, 0.049)  1.55%,
        hsla(0, 0%, 100%, 0.104)  2.25%,
        hsla(0, 0%, 100%, 0.175)  2.90%,
        hsla(0, 0%, 100%, 0.259)  3.53%,
        hsla(0, 0%, 100%, 0.352)  4.12%,
        hsla(0, 0%, 100%, 0.450)  4.71%,
        hsla(0, 0%, 100%, 0.550)  5.29%,
        hsla(0, 0%, 100%, 0.648)  5.88%,
        hsla(0, 0%, 100%, 0.741)  6.47%,
        hsla(0, 0%, 100%, 0.825)  7.10%,
        hsla(0, 0%, 100%, 0.896)  7.75%,
        hsla(0, 0%, 100%, 0.951)  8.45%,
        hsla(0, 0%, 100%, 0.987)  9.19%,
        hsla(0, 0%, 100%, 1.000) 10.00%,
        hsla(0, 0%, 100%, 1.000) 90.00%,
        hsla(0, 0%, 100%, 0.987) 90.81%,
        hsla(0, 0%, 100%, 0.951) 91.55%,
        hsla(0, 0%, 100%, 0.896) 92.25%,
        hsla(0, 0%, 100%, 0.825) 92.90%,
        hsla(0, 0%, 100%, 0.741) 93.53%,
        hsla(0, 0%, 100%, 0.648) 94.12%,
        hsla(0, 0%, 100%, 0.550) 94.71%,
        hsla(0, 0%, 100%, 0.450) 95.29%,
        hsla(0, 0%, 100%, 0.352) 95.88%,
        hsla(0, 0%, 100%, 0.259) 96.47%,
        hsla(0, 0%, 100%, 0.175) 97.10%,
        hsla(0, 0%, 100%, 0.104) 97.75%,
        hsla(0, 0%, 100%, 0.049) 98.45%,
        hsla(0, 0%, 100%, 0.013) 99.19%,
        hsla(0, 0%, 100%, 0.000) 100.0%
    );
}

.bingo-line.animated {
    animation-name: line-fade;
    animation-duration: 0.5s;
}

#keyword-list li {
    padding: 0.1em 0.25em;
    cursor: pointer;
}

#keyword-list {
    padding: 0.5em;
    z-index: 1;
}

#keyword-tab {
    display: block;
    padding: 0.6em 0.3em;
    cursor: pointer;
}

body.keyword-list-hidden-two-cards[data-card-count="2"]:not(.single-visible-card) #keyword-list,
body.keyword-list-hidden.single-visible-card                                      #keyword-list,
body.keyword-list-hidden:not([data-card-count="2"])                               #keyword-list {
    display: none;
}

#keyword-tab .fa-caret-left,
#keyword-tab .fa-caret-right,
#keyword-tab .fa-caret-up,
#keyword-tab .fa-caret-down {
    display: none;
}

.single-visible-card       .card-container { display: none; }
.single-visible-card.visible-card-1 #card-1 { display: block; }
.single-visible-card.visible-card-2 #card-2 { display: block; }
.single-visible-card.visible-card-3 #card-3 { display: block; }
.single-visible-card.visible-card-4 #card-4 { display: block; }

.single-visible-card .keyword                           { display: none; }
.single-visible-card.visible-card-1 .keyword.from-card-1 { display: list-item; }
.single-visible-card.visible-card-2 .keyword.from-card-2 { display: list-item; }
.single-visible-card.visible-card-3 .keyword.from-card-3 { display: list-item; }
.single-visible-card.visible-card-4 .keyword.from-card-4 { display: list-item; }

.draft .keyword.from-draft                      { display: list-item; }

@media (orientation: landscape) {
    #keyword-list {
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: repeat(3, 1fr);
        overflow: auto;
    }

    body.keyword-list-hidden-two-cards[data-card-count="2"]:not(.single-visible-card) #keyword-tab .fa-caret-left,
    body.keyword-list-hidden.single-visible-card                                      #keyword-tab .fa-caret-left,
    body.keyword-list-hidden:not([data-card-count="2"])                               #keyword-tab .fa-caret-left {
        display: block;
    }

    body:not(.keyword-list-hidden-two-cards)[data-card-count="2"]:not(.single-visible-card) #keyword-tab .fa-caret-right,
    body:not(.keyword-list-hidden).single-visible-card                                      #keyword-tab .fa-caret-right,
    body:not(.keyword-list-hidden):not([data-card-count="2"])                               #keyword-tab .fa-caret-right {
        display: block;
    }

    #draft {
        max-width: 24em;
    }
}

@media (orientation: portrait) {
    main {
        flex-direction: column;
    }

    #draft {
        font-size: min(1em, 2vh);
        flex-direction: column;
        border-bottom: #444750 solid 1px;
    }

    #draft-container {
        min-height: 0;
    }

    #keywords {
        font-size: min(0.75em, 2vh);
        flex-direction: column;
    }

    #keyword-list {
        flex-direction: row;
        justify-content: center;
    }

    #keyword-tab {
        padding: 0.1em 1em;
    }

    #draft-random-button {
        font-size: min(1rem, 2vh);
    }

    body:not(.single-visible-card) #bingo {
        min-height: min(calc(200vw/1.92), 70vh);
    }

    body.single-visible-card #bingo {
        min-height: min(calc(100vw/0.92), 70vh);
    }

    body.keyword-list-hidden-two-cards[data-card-count="2"]:not(.single-visible-card) #keyword-tab .fa-caret-up,
    body.keyword-list-hidden.single-visible-card                                      #keyword-tab .fa-caret-up,
    body.keyword-list-hidden:not([data-card-count="2"])                               #keyword-tab .fa-caret-up {
        display: block;
    }

    body:not(.keyword-list-hidden-two-cards)[data-card-count="2"]:not(.single-visible-card) #keyword-tab .fa-caret-down,
    body:not(.keyword-list-hidden).single-visible-card                                      #keyword-tab .fa-caret-down,
    body:not(.keyword-list-hidden):not([data-card-count="2"])                               #keyword-tab .fa-caret-down {
        display: block;
    }
}

@supports (container-type: size) {
    /*
     * 3 and 4 cards
     */
    @container bingo-container (max-aspect-ratio: 96 / 100) {
        /* portrait */
        .card-container {
            margin: 0 calc(2cqw / 0.96);
        }

        #card-grid {
            margin: 0 calc(-2cqw / 0.96 - 1px);
        }

        .card-header {
            width: calc(46cqw / 0.96);
            height: calc(4cqw / 0.96);
        }

        .bingo-table {
            width: calc(46cqw / 0.96);
            height: calc(46cqw / 0.96);
        }
    }

    @container bingo-container (min-aspect-ratio: 96 / 100) {
        /* landscape */
        .card-container {
            margin: 0 2cqh;
        }

        #card-grid {
            margin: 0 calc(-2cqh - 1px);
        }

        .card-header {
            width: 46cqh;
            height: 4cqh;
        }

        .bingo-table {
            width: 46cqh;
            height: 46cqh;
        }
    }

    /*
     * 2 cards
     */
    @container bingo-container (max-aspect-ratio: 46 / 100) {
        /* super portrait */
        [data-visible-card-count="2"] .card-container {
            margin: 0 calc(100cqw * 2 / 46);
        }

        [data-visible-card-count="2"] #card-grid {
            margin: 0 calc(-100cqw * 2 / 46 - 1px);
        }

        [data-visible-card-count="2"] .card-header {
            width: 100cqw;
            height: calc(100cqw * 4 / 46);
        }

        [data-visible-card-count="2"] .bingo-table {
            width: 100cqw;
            height: 100cqw;
        }
    }

    @container bingo-container (min-aspect-ratio: 46 / 100) {
        /* portrait */
        [data-visible-card-count="2"] .card-container {
            margin: 0 2cqh;
        }

        [data-visible-card-count="2"] #card-grid {
            margin: 0 calc(-2cqh - 1px);
        }

        [data-visible-card-count="2"] .card-header {
            width: 46cqh;
            height: 4cqh;
        }

        [data-visible-card-count="2"] .bingo-table {
            width: 46cqh;
            height: 46cqh;
        }
    }

    @container bingo-container (min-aspect-ratio: 96 / 100) {
        /* landscape */
        [data-visible-card-count="2"] .card-container {
            margin: 0 calc(2cqw / 0.96);
        }

        [data-visible-card-count="2"] #card-grid {
            margin: 0 calc(-2cqw / 0.96 - 1px);
        }

        [data-visible-card-count="2"] .card-header {
            width: calc(46cqw / 0.96);
            height: calc(4cqw / 0.96);
        }

        [data-visible-card-count="2"] .bingo-table {
            width: calc(46cqw / 0.96);
            height: calc(46cqw / 0.96);
        }
    }

    @container bingo-container (min-aspect-ratio: 192 / 100) {
        /* super landscape */
        [data-visible-card-count="2"] .card-container {
            margin: 0 4cqh;
        }

        [data-visible-card-count="2"] #card-grid {
            margin: 0 calc(-4cqh - 1px);
        }

        [data-visible-card-count="2"] .card-header {
            width: 92cqh;
            height: 8cqh;
        }

        [data-visible-card-count="2"] .bingo-table {
            width: 92cqh;
            height: 92cqh;
        }
    }

    /*
     * 1 card
     */
    @container bingo-container (max-aspect-ratio: 92 / 100) {
        /* portrait */
        [data-visible-card-count="1"] .card-header {
            width: 100cqw;
            height: calc(100cqw * 4 / 46);
        }

        [data-visible-card-count="1"] .bingo-table {
            width: 100cqw;
            height: 100cqw;
        }
    }

    @container bingo-container (min-aspect-ratio: 92 / 100) {
        /* landscape */
        [data-visible-card-count="1"] .card-header {
            width: 92cqh;
            height: 8cqh;
        }

        [data-visible-card-count="1"] .bingo-table {
            width: 92cqh;
            height: 92cqh;
        }
    }
}

@supports not (container-type: size) {
    /*
     * 3 and 4 cards
     */

    /* portrait */
    .max-96 .card-container {
        margin: 0 calc(2 * var(--mw) / 0.96);
    }

    .max-96 #card-grid {
        margin: 0 calc(-2 * var(--mw) / 0.96 - 1px);
    }

    .max-96 .card-header {
        width: calc(46 * var(--mw) / 0.96);
        height: calc(4 * var(--mw) / 0.96);
    }

    .max-96 .bingo-table {
        width: calc(46 * var(--mw) / 0.96);
        height: calc(46 * var(--mw) / 0.96);
    }

    /* landscape */
    .min-96 .card-container {
        margin: 0 calc(2 * var(--mh));
    }

    .min-96 #card-grid {
        margin: 0 calc(-2 * var(--mh) - 1px);
    }

    .min-96 .card-header {
        width: calc(46 * var(--mh));
        height: calc(4 * var(--mh));
    }

    .min-96 .bingo-table {
        width: calc(46 * var(--mh));
        height: calc(46 * var(--mh));
    }

    /*
     * 2 cards
     */

    /* super portrait */
    [data-visible-card-count="2"] .max-46 .card-container {
        margin: 0 calc(100 * var(--mw) * 2 / 46);
    }

    [data-visible-card-count="2"] .max-46 #card-grid {
        margin: 0 calc(-100 * var(--mw) * 2 / 46 - 1px);
    }

    [data-visible-card-count="2"] .max-46 .card-header {
        width: calc(100 * var(--mw));
        height: calc(100 * var(--mw) * 4 / 46);
    }

    [data-visible-card-count="2"] .max-46 .bingo-table {
        width: calc(100 * var(--mw));
        height: calc(100 * var(--mw));
    }

    /* portrait */
    [data-visible-card-count="2"] .min-46 .card-container {
        margin: 0 calc(2 * var(--mh));
    }

    [data-visible-card-count="2"] .min-46 #card-grid {
        margin: 0 calc(-2 * var(--mh) - 1px);
    }

    [data-visible-card-count="2"] .min-46 .card-header {
        width: calc(46 * var(--mh));
        height: calc(4 * var(--mh));
    }

    [data-visible-card-count="2"] .min-46 .bingo-table {
        width: calc(46 * var(--mh));
        height: calc(46 * var(--mh));
    }

    /* landscape */
    [data-visible-card-count="2"] .min-96 .card-container {
        margin: 0 calc(2 * var(--mw) / 0.96);
    }

    [data-visible-card-count="2"] .min-96 #card-grid {
        margin: 0 calc(-2 * var(--mw) / 0.96 - 1px);
    }

    [data-visible-card-count="2"] .min-96 .card-header {
        width: calc(46 * var(--mw) / 0.96);
        height: calc(4 * var(--mw) / 0.96);
    }

    [data-visible-card-count="2"] .min-96 .bingo-table {
        width: calc(46 * var(--mw) / 0.96);
        height: calc(46 * var(--mw) / 0.96);
    }

    /* super landscape */
    [data-visible-card-count="2"] .min-192 .card-container {
        margin: 0 calc(4 * var(--mh));
    }

    [data-visible-card-count="2"] .min-192 #card-grid {
        margin: 0 calc(-4 * var(--mh) - 1px);
    }

    [data-visible-card-count="2"] .min-192 .card-header {
        width: calc(92 * var(--mh));
        height: calc(8 * var(--mh));
    }

    [data-visible-card-count="2"] .min-192 .bingo-table {
        width: calc(92 * var(--mh));
        height: calc(92 * var(--mh));
    }

    /*
     * 1 card
     */

    /* portrait */
    [data-visible-card-count="1"] .max-92 .card-header {
        width: calc(100 * var(--mw));
        height: calc(100 * var(--mw) * 4 / 46);
    }

    [data-visible-card-count="1"] .max-92 .bingo-table {
        width: calc(100 * var(--mw));
        height: calc(100 * var(--mw));
    }

    /* landscape */
    [data-visible-card-count="1"] .min-92 .card-header {
        width: calc(92 * var(--mh));
        height: calc(8 * var(--mh));
    }

    [data-visible-card-count="1"] .min-92 .bingo-table {
        width: calc(92 * var(--mh));
        height: calc(92 * var(--mh));
    }
}
