/* Site top bar, Games menu and phone tab bar (Layout/SiteNav.razor, 2026-10-10 redesign).
   Shared palette tokens keep navigation consistent with the selected theme. All classes prefixed qt-. */
.qt-top {
    --qt-bar: var(--qse-surface); --qt-panel: var(--qse-surface); --qt-card: var(--qse-surface); --qt-card2: var(--qse-surface-2);
    --qt-fg: var(--qse-text); --qt-dim: var(--qse-text-muted); --qt-dim2: var(--qse-text);
    --qt-line: var(--qse-border); --qt-line2: var(--qse-border-strong);
    --qt-amber: var(--qse-accent); --qt-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    --qt-disp: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
    position: sticky; top: 0; z-index: 1025;
    background: var(--qt-bar); color: var(--qt-fg); border-bottom: 1px solid var(--qt-line);
    font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.4;
}
.qt-top a { color: inherit; text-decoration: none; }
.qt-top button { font: inherit; color: inherit; cursor: pointer; }
.qt-top :focus-visible, .qt-tabs :focus-visible { outline: 2px solid var(--qt-amber, var(--qse-accent)); outline-offset: 2px; }
.qt-ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.qt-ic.sm { width: 16px; height: 16px; }

.qt-wrap { max-width: 1480px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 48px); }
.qt-top > .qt-wrap { display: flex; align-items: center; gap: 10px 28px; padding-block: 12px; }

/* Logo lockup (2026-10-12): mark, then "SPORTS" set level with the Q-S-E letters, "by QSE Games" in italics under it, right-aligned.
   Everything scales from the mark height --lk-h. In home/qse-mark-2.webp (uncut export of qse-logo-white.png, arc included)
   the silver letter fill runs from 31.3% to 79.2% of the image height; Roboto Condensed caps are 0.7308em tall and sit
   0.1154em below the top of a line-height:1 box, so SPORTS = 0.6548 × --lk-h with a 0.2374 × --lk-h top margin puts its
   cap top and baseline on the letters' top and bottom. Re-derive both numbers if the mark image changes.
   The lockup box is held to the mark's height so the bar centres the mark; the subtitle hangs a few px into the bar's padding.
   Variants: top bar 46px (here), phone 34px / 30px (below), the "All pages" drawer 30px (qse-skin.css .qd-lock). */
.qt-lock { --lk-h: 46px; display: inline-flex; align-items: flex-start; gap: 10px; flex-shrink: 0; height: var(--lk-h);
    text-decoration: none; }   /* text-decoration: the drawer copy sits outside .qt-top's link reset */
.qt-lock img { height: var(--lk-h); width: auto; display: block; }
.qt-lock span { font-family: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif; font-weight: 900; line-height: 1;
    font-size: calc(var(--lk-h) * 0.6548); margin-top: calc(var(--lk-h) * 0.2374); letter-spacing: 0.14em; color: var(--qse-text); }
.qt-lock b { display: block; font: inherit; margin-right: -0.14em; }
.qt-lock small { display: block; margin-top: -1px; font-family: "Exo 2", "Roboto Condensed", system-ui, sans-serif; font-style: italic;
    font-weight: 700; font-size: max(9px, calc(var(--lk-h) * 0.22)); letter-spacing: 0.02em; line-height: 1; white-space: nowrap;
    text-align: right;   /* a "by …" credit ends under the final S (owner 2026-10-12) */
    color: var(--qt-dim, var(--qse-text-muted)); }

.qt-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; align-items: center; min-width: 0; }
.qt-nav a, .qt-nav button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--qt-dim2); font-weight: 600; font-size: 16px; border: 0; background: none; white-space: nowrap; }
.qt-nav a:hover, .qt-nav button:hover { color: var(--qt-fg); background: rgba(255,255,255,0.05); }
.qt-nav a[aria-current], .qt-nav button[aria-expanded="true"] { background: var(--qt-card2); color: var(--qt-fg); }

.qt-right { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.qt-plan { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--qt-line2); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; white-space: nowrap; }
.qt-plan:hover { border-color: var(--qt-amber); }
.qt-plan i { width: 9px; height: 9px; border-radius: 999px; }
.qt-ava { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--qt-line2); background: var(--qt-card2); color: var(--qt-fg); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qt-ava[aria-expanded="true"], .qt-ava:hover { border-color: var(--qt-amber); }
.qt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: var(--qt-amber); color: var(--qse-on-accent) !important; font-weight: 700; font-size: 15px; white-space: nowrap; }
.qt-btn:hover { filter: brightness(1.08); }
.qt-btn.plain { background: none; color: var(--qt-fg) !important; padding: 0 10px; font-weight: 600; }
.qt-icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--qt-line2); background: none; display: inline-flex; align-items: center; justify-content: center; }
.qt-phone { display: none; }
/* 2026-11-13: the inbox bell beside the account button (same 44px box). */
.qt-bell { position: relative; color: var(--qt-fg) !important; flex-shrink: 0; }
.qt-bell:hover, .qt-bell[aria-current] { border-color: var(--qt-amber); }
.qt-bell-n { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #DC2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Tablet widths need the compact Games control so links cannot overlap account/theme controls. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .qt-nav, .qt-right .qt-desk { display: none; }
    .qt-phone { display: inline-flex; }
}

/* "LIVE ON QSE" ticker (above the bar; scrolls away). */
.qt-tick { background: var(--qse-surface); border-bottom: 1px solid var(--qse-border); overflow: hidden; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; color: var(--qse-text); }
.qt-tick .qt-wrap { display: flex; align-items: center; gap: 22px; min-height: 40px; white-space: nowrap; }
.qt-tick .live { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px; border-radius: 4px; background: var(--qse-accent); color: var(--qse-on-accent); font-family: "Roboto Condensed", "Arial Narrow", sans-serif; font-weight: 900; font-size: 14px; letter-spacing: 0.08em; flex-shrink: 0; }
.qt-tick .live::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #B91C1C; }
.qt-tick b { color: var(--qse-text); }
.qt-tick .g { flex-shrink: 0; }
.qt-tick a.g { margin-left: 0; padding-left: 0; color: var(--qse-text); font-family: inherit; font-weight: inherit; } /* a game: links to /live */
.qt-tick a { margin-left: auto; color: #FFD27A; font-family: Inter, system-ui, sans-serif; font-weight: 600; text-decoration: none; flex-shrink: 0; padding-left: 12px; }
@media (max-width: 767.98px) { .qt-tick { display: none; } } /* the prototype phone screens have no ticker */

/* Menus: drop-down panels under the bar, a sheet above the tab bar on phones. */
.qt-panel { position: absolute; top: 100%; z-index: 1026; background: var(--qt-panel); border-bottom: 1px solid var(--qt-line2); box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.qt-scrim { position: fixed; inset: 0; z-index: 1020; background: rgba(4, 8, 16, 0.45); }
.qt-panel h2 { margin: 0 0 10px; font-family: var(--qt-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--qt-dim); font-weight: 600; }

.qt-games { left: 0; right: 0; max-height: calc(100vh - 80px); overflow-y: auto; }
.qt-games-grid { padding-block: 24px 28px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.qt-g-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.qt-g-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qt-g { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; min-width: 0; }
a.qt-g:hover { background: var(--qt-card2); }
.qt-g i { width: 64px; height: 44px; border-radius: 8px; background-size: cover; background-position: center; flex-shrink: 0; }
.qt-g i.more { background: repeating-linear-gradient(135deg, var(--qse-surface-2) 0 10px, var(--qse-surface) 10px 20px); }
.qt-g b { display: block; font-family: var(--qt-disp); font-weight: 900; font-size: 21px; line-height: 1.05; text-transform: uppercase; }
.qt-g small { display: block; color: var(--qt-dim); font-size: 14px; }
.qt-g.next b { color: var(--qt-dim2); }
.qt-g-extra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--qt-line); }
.qt-g-extra a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--qt-dim2); font-weight: 600; }
.qt-g-extra a:hover { background: var(--qt-card2); color: var(--qt-fg); }
.qt-cg { border-radius: 14px; padding: 16px; background: var(--qse-surface-2); border: 1px solid var(--qt-line); display: flex; flex-direction: column; gap: 8px; }
.qt-cg b { font-family: var(--qt-disp); font-weight: 900; font-size: 25px; text-transform: uppercase; letter-spacing: 0.04em; color: #E9DFC6; }
.qt-cg p { margin: 0; color: var(--qt-dim); font-size: 15px; }
.qt-cg .tac, .qt-cg .pwr { font-family: var(--qt-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--qse-accent); font-weight: 600; }
.qt-cg a { color: var(--qt-amber); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }

.qt-account { right: clamp(16px, 3vw, 48px); width: min(320px, calc(100vw - 32px)); border: 1px solid var(--qt-line2); border-top: 0; border-radius: 0 0 14px 14px; padding: 14px; }
.qt-acct-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; border-bottom: 1px solid var(--qt-line); margin-bottom: 6px; min-width: 0; }
.qt-acct-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-acct-head small { display: block; color: var(--qt-dim); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.qt-acct-head > span:last-child { min-width: 0; }
.qt-ava.static { cursor: default; }
.qt-account nav { display: flex; flex-direction: column; }
.qt-account nav a, .qt-allpages, .qt-signout { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--qt-dim2); font-weight: 600; border: 0; background: none; width: 100%; text-align: left; }
.qt-account nav a:hover, .qt-allpages:hover, .qt-signout:hover { background: var(--qt-card2); color: var(--qt-fg); }
.qt-account nav a[aria-current] { color: var(--qt-fg); background: var(--qt-card); }
.qt-account form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--qt-line); }
.qt-signout { color: #FCA5A5; }

/* In-page jumps (the home page's "How it plays") land below the sticky bar, not under it. */
html:has(.qse-topbar-shell) { scroll-padding-top: 84px; }
@media (max-width: 767.98px) { html:has(.qse-topbar-shell) { scroll-padding-top: 68px; } }

/* The page list drawer opened from "All pages" needs its own scrim on wide screens. */
.qse-topbar-shell > .mobile-nav-backdrop.show { position: fixed; inset: 0; z-index: 1035; background: rgba(0, 0, 0, 0.4); }

/* Site footer (PortalLayout): brand line + legal links. Themed and compact on game surfaces, dark brand on top-bar pages. */
.qt-foot { border-top: 1px solid var(--qse-border, #dee2e6); background: var(--qse-surface, #fff); color: var(--qse-text-muted, #6c757d); font-size: 14px; }
.qt-foot-wrap { max-width: 1480px; margin: 0 auto; padding: 14px clamp(16px, 3vw, 48px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.qt-foot a { color: inherit; text-decoration: none; }
.qt-foot a:hover { text-decoration: underline; }
.qt-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.qt-foot .fam b { color: var(--qse-text, #212529); }
.qse-topbar-shell .qt-foot { background: var(--qse-app-bg); border-top-color: var(--qse-border); color: var(--qse-text-muted); font-size: 15px; }
.qse-topbar-shell .qt-foot-wrap { padding-block: 20px; }
.qse-topbar-shell .qt-foot .fam b { color: var(--qse-text); }
/* Contested Ground's gold, by Light/Dark mode (2026-10-12): the cream was fixed on top-bar pages, so it vanished on
   every Light theme's page. #765C17 is >= 5.2:1 on all five Light canvases and surfaces. */
.qt-foot a.cg { color: #E9DFC6; }
html[data-bs-theme="light"] .qt-foot a.cg { color: #765C17; }
.qt-foot nav a { min-height: 24px; display: inline-flex; align-items: center; }
@media (max-width: 767.98px) { .qt-foot nav a { min-height: 44px; } }
.qse-game-first .qt-foot-wrap { padding: 0; gap: 4px 16px; }

/* Phone tab bar */
.qt-tabs { display: none; }

/* Tablets and narrow laptops: keep the nav on one line. */
@media (min-width: 768px) and (max-width: 1100px) {
    .qt-top > .qt-wrap { gap: 10px 14px; }
    .qt-nav { flex-wrap: nowrap; gap: 0; }
    .qt-nav a, .qt-nav button { padding: 0 9px; font-size: 15px; }
    .qt-plan { padding: 7px 10px; font-size: 12px; }
}
@media (min-width: 768px) and (max-width: 960px) {
    .qt-lock span { display: none; }
}

@media (max-width: 1100px) {
    .qt-games-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .qt-games-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .qt-top > .qt-wrap { height: 60px; padding-block: 0; gap: 10px; }
    .qt-lock { --lk-h: 34px; }
    .qt-nav, .qt-desk { display: none; }
    .qt-phone { display: inline-flex; }
    .qt-plan { padding: 6px 10px; font-size: 11px; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }

    .qt-panel { position: fixed; top: 61px; left: 0; right: 0; bottom: 0; max-height: none; overflow-y: auto; border: 0; border-radius: 0; width: auto; box-shadow: none; }
    .qse-topbar-shell:has(.qt-tabs) .qt-panel { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    .qt-games-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 18px 24px; }
    .qt-g-list.two { grid-template-columns: minmax(0, 1fr); }
    .qt-account { padding: 16px; }

    .qt-tabs {
        display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1027;
        background: var(--qse-surface); border-top: 1px solid var(--qse-border);
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
        font-family: Inter, system-ui, sans-serif;
    }
    .qt-tabs a, .qt-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; color: var(--qse-text-muted); font-size: 12px; font-weight: 600; text-decoration: none; border: 0; background: none; font-family: inherit; }
    .qt-tabs .qt-ic { width: 22px; height: 22px; }
    .qt-tabs a[aria-current], .qt-tabs button.on { color: var(--qse-text); font-weight: 800; }
    .qt-tabs a[aria-current] .qt-ic, .qt-tabs button.on .qt-ic { stroke: var(--qse-accent); }
    /* Room for the fixed tab bar under the page and footer. */
    .qse-topbar-shell:has(.qt-tabs) > main { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 400px) {
    .qt-lock { --lk-h: 30px; }
    .qt-lock small { display: none; }
}
@media (max-width: 340px) {
    .qt-plan { display: none; }
}
