.flow-menu-toggle {
    position: fixed;
    top: 4px;
    left: 4px;
    z-index: 999;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--table-line);
    border-radius: 6px;
    background: var(--table-header);
    color: var(--table-text);
    font-size: 24px;
    cursor: pointer;
}
.menu .button { flex: none; }
.landing { max-width: 850px; margin: 0 auto; padding: 60px 16px 24px; }
.landing h1 { font-size: clamp(1.6rem, 6vw, 2.5rem); }
.landing > p { margin: 10px 0 20px; }
.landing p { color: var(--table-muted); white-space: normal; line-height: 1.5; }
.board-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.board-choices > div { padding: 16px; background: var(--table-panel); border-radius: 12px; }
.board-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 12px;
    border: 1px solid var(--table-line);
    border-radius: 8px;
    background: var(--table-header);
    color: var(--table-text);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
}
.board-choices p { margin-top: 16px; }
.board-choice:focus-visible { outline: 3px solid var(--table-accent); outline-offset: 3px; }
html[data-theme="retro"] .landing {
    background: radial-gradient(ellipse at top, #1b4c33, var(--felt-dark));
}
html[data-theme="retro"] .board-choices > div { background: var(--cream); }
html[data-theme="retro"] .board-choices p { color: var(--ink); }
html[data-theme="retro"] .board-choice { background: var(--orange); color: #fff8e4; }
#match-format-label { display: block; margin: 8px 0; font-size: 1.2rem; font-weight: 800; }
@media (max-width: 500px) { .board-choices { grid-template-columns: 1fr; } }

/* Shared drawer for the landing page and both scoreboards. */
#slider.menu {
    box-sizing: border-box;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 998;
    width: min(20rem, 100%);
    height: 100%;
    height: 100dvh;
    padding: 60px 16px 16px;
    border-right: 1px solid var(--table-line);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 10px;
    visibility: hidden;
    transform: translateX(-100%);
}
#slider.menu.active {
    visibility: visible;
    transform: none;
}
#slider.menu > * { flex-shrink: 0; }
#slider.menu .button {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    font-size: 1rem;
}
#slider.menu .button:disabled { opacity: .45; cursor: default; }
#slider.menu .hidden { display: none; }
.menu-version {
    display: block;
    margin-top: auto;
    padding-top: 24px;
    color: var(--table-muted);
    font: 400 .8rem/1.3 system-ui, sans-serif;
}

.grid-container { box-sizing: border-box; width: 100%; }
.bos1 > img, .bos2 > img {
    width: 78%;
    max-width: 32px;
    height: auto;
    margin: auto;
}
#resume-match { margin-block: 18px; }
#resume-match[hidden] { display: none; }
#storage-warning { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001; margin: 0; padding: 8px; background: #612415; color: white; white-space: normal; }

@media (min-width: 900px) and (min-height: 501px) {
    .grid-container .item1 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-container .item1 > div { grid-column: 1 / -1; }
    .grid-container .bos1,
    .grid-container .bos2 {
        display: grid;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        width: 100%;
        height: 60px;
        margin: 0;
    }
    .bos1 > img, .bos2 > img {
        width: 80%;
        max-width: 48px;
        height: auto;
    }
}

@media (min-width: 900px) and (min-height: 501px) {
    .grid-container .item1 {
        grid-template-columns: repeat(2, minmax(0, max-content));
        justify-content: center;
    }
    .grid-container .bos1,
    .grid-container .bos2 {
        grid-template-columns: repeat(8, minmax(0, 54px));
        width: auto;
    }
    .bos1 > img, .bos2 > img { width: 48px; }
}

.bos1 > img, .bos2 > img {
    cursor: auto;
    -webkit-tap-highlight-color: transparent;
}

.bos1 > img, .bos2 > img { border: 0; }
