/* =========================================================
   QSE Sports — Theme Layer
   Font: Exo 2 Bold Italic (headings/wordmark) + Inter (body)
   ========================================================= */

:root, [data-theme="light"] {
    /* Font variables — overridden at runtime by the font picker */
    --qse-heading-font: 'Exo 2', system-ui, sans-serif;
    --qse-body-font: 'Inter', system-ui, sans-serif;

    /* Master brand */
    --qse-navy-deep: #0E1724;
    --qse-navy: #142244;
    --qse-navy-2: #1A2340;
    --qse-blue: #2C6FD6;
    --qse-blue-hover: #3A7BD5;
    --qse-blue-glow: rgba(44, 111, 214, 0.35);
    --qse-silver-1: #D9DDE3;
    --qse-silver-2: #8892A6;
    --qse-off-white: #F4F6FA;

    /* Sport accents */
    --qse-football: #1FA34A;
    --qse-baseball: #DC2626;
    --qse-basketball: #F97316;
    --qse-hockey: #38BDF8;
    --qse-golf: #5AB130;
    --qse-trivia: #8B5CF6;

    /* Bootstrap overrides */
    --bs-primary: #2C6FD6;
    --bs-primary-rgb: 44, 111, 214;
    /* 2026-10-06 (compliance audit item 11, WCAG AA 4.5:1): links were #3A7BD5 (3.8-4.2:1 on our light surfaces) with
       an even lighter hover (#5B95E6, ~3:1). #2563C9 is 5.1-5.7:1 on #fff / #f8f9fa / #f1f3f5 / #F4F6FA; hover goes
       DARKER (#1F5BB5, 5.9-6.5:1). Dark mode below already passed (5.1-5.9:1). */
    --bs-link-color: #2563C9;
    --bs-link-color-rgb: 37, 99, 201;
    --bs-link-hover-color: #1F5BB5;
    --bs-link-hover-color-rgb: 31, 91, 181;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* ---- Theme-aware surfaces (flipped by [data-theme=dark] below) ---- */
    --qse-app-bg: #f8f9fa;          /* page canvas behind the content */
    --qse-surface: #ffffff;         /* cards, bars, footer */
    --qse-surface-2: #f1f3f5;       /* subtle raised/striped surface */
    --qse-text: #1A2340;            /* default body text */
    --qse-text-muted: #5c636a;      /* secondary text — was #6c757d (4.2-4.7:1); now 5.5-6.1:1 (audit item 11) */
    --qse-border: #e2e6ea;          /* hairlines */
    --qse-border-strong: #8892A6;
    --qse-focus: #2563C9;
    --qse-accent: #966500;
    --qse-accent-hover: #7a5100;
    --qse-on-accent: #ffffff;
    --qse-positive: #146c43;
    --qse-violet: #6f42c1;
    --qse-overlay: rgba(14, 23, 36, 0.55);

    /* ---- Skeleton shimmer (consumed by Skeleton.razor) ---- */
    --qse-skel-base: rgba(136,146,166,0.18);
    --qse-skel-sheen: rgba(136,146,166,0.34);

    /* ---- Spacing scale ---- */
    --qse-space-2xs: 2px;
    --qse-space-xs: 4px;
    --qse-space-sm: 8px;
    --qse-space-md: 12px;
    --qse-space-lg: 16px;
    --qse-space-xl: 24px;
    --qse-space-2xl: 32px;

    /* ---- Radius scale ---- */
    --qse-radius-sm: 4px;
    --qse-radius-md: 8px;
    --qse-radius-lg: 12px;
    --qse-radius-pill: 999px;

    /* ---- Elevation scale ---- */
    --qse-shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
    --qse-shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --qse-shadow-lg: 0 12px 32px rgba(0,0,0,0.18);

    /* ---- Motion scale ---- */
    --qse-dur-fast: 0.15s;
    --qse-dur: 0.2s;
    --qse-dur-slow: 0.35s;

    /* ---- Rating tiers (2026-11-05, owner: ONE scale everywhere) — RatingDisplay.Tier bands
       Elite 95+ · All-Star 88+ · Star 78+ · Starter 70+ · Backup 55+ · Replacement 45+ · Depth.
       --qse-tier-* fills bars and badges (white text on top); --qse-tier-*-ink colours a number. ---- */
    --qse-tier-elite: #7c3aed;
    --qse-tier-allstar: #1d4ed8;
    --qse-tier-star: #0f766e;
    --qse-tier-starter: #15803d;
    --qse-tier-backup: #a16207;
    --qse-tier-replacement: #c2410c;
    --qse-tier-depth: #6b7280;
    --qse-tier-elite-ink: #6d28d9;
    --qse-tier-allstar-ink: #1d4ed8;
    --qse-tier-star-ink: #0f766e;
    --qse-tier-starter-ink: #15803d;
    --qse-tier-backup-ink: #a16207;
    --qse-tier-replacement-ink: #c2410c;
    --qse-tier-depth-ink: #5c636a;
}

/* ---------- Typography ---------- */
body {
    font-family: var(--qse-body-font);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--qse-heading-font);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* QSE wordmark — mirrors the logo's chrome-bevel italic look */
.qse-wordmark {
    font-family: var(--qse-heading-font);
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #F4F6FA 0%, #D9DDE3 40%, #8892A6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,0.12)) drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.qse-accent-text {
    color: var(--qse-blue);
    font-weight: 600;
}

/* ---------- Brand buttons ---------- */
.btn-qse {
    background: linear-gradient(135deg, #2C6FD6 0%, #3A7BD5 100%);
    color: #fff;
    border: none;
    font-family: var(--qse-heading-font);
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px var(--qse-blue-glow), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-qse:hover, .btn-qse:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--qse-blue-glow), inset 0 1px 0 rgba(255,255,255,0.25);
    filter: brightness(1.08);
}
.btn-qse:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.btn-qse-outline {
    background: transparent;
    color: var(--qse-off-white);
    border: 1px solid rgba(255,255,255,0.35);
    font-family: var(--qse-heading-font);
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: all 0.15s ease;
}
.btn-qse-outline:hover, .btn-qse-outline:focus {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.6);
}

/* ---------- Hero section ---------- */
.qse-hero {
    position: relative;
    background: radial-gradient(ellipse at 30% 20%, #1A2E5C 0%, #0E1724 65%);
    color: var(--qse-off-white);
    overflow: hidden;
}
.qse-hero::before {
    content: "";
    position: absolute;
    top: -30%;
    left: -15%;
    right: -15%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(44,111,214,0.2) 0%, transparent 65%);
    transform: rotate(-8deg);
    pointer-events: none;
}
.qse-hero > * {
    position: relative;
    z-index: 1;
}

/* Logo image in hero — let it breathe, drop-shadow to separate from bg */
.qse-hero-logo {
    max-width: 340px;
    width: 100%;
    filter: drop-shadow(0 8px 32px rgba(44,111,214,0.4)) drop-shadow(0 2px 8px rgba(0,0,0,0.6));
    border-radius: 16px;
}

/* ---------- Cards ---------- */
.qse-card {
    background: linear-gradient(180deg, rgba(26,35,64,0.85) 0%, rgba(14,23,36,0.85) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--qse-off-white);
    backdrop-filter: blur(6px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.qse-card:hover {
    transform: translateY(-3px);
    border-color: rgba(44,111,214,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(44,111,214,0.2);
}

/* ---------- Sport cards with real PNG logos ---------- */
.accent-football  { --qse-accent: var(--qse-football); }
.accent-baseball  { --qse-accent: var(--qse-baseball); }
.accent-basketball{ --qse-accent: var(--qse-basketball); }
.accent-hockey    { --qse-accent: var(--qse-hockey); }
.accent-golf      { --qse-accent: var(--qse-golf); }
.accent-trivia    { --qse-accent: var(--qse-trivia); }

.sport-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08) !important;
    background: #000 !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}
.sport-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 2px var(--qse-accent, var(--qse-blue));
}

/* The PNG tile — fills card top, crop bottom to hide baked-in accent lines */
.sport-card-img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: -6px;
    clip-path: inset(0 0 4% 0);
}

/* Line icons (Shared/QseIcon, 2026-10-11): sized to the text they sit in. */
.qse-ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.qse-ic.lg { width: 1.6rem; height: 1.6rem; }
/* 2026-11-15 (owner): full-colour sport marks (SportGlyph) on the league pages; inline, a bit larger than a line icon. */
.qse-sport-glyph { width: 1.5em; height: 1.5em; flex-shrink: 0; vertical-align: -0.4em; }

/* One "selected" look on every setup screen (owner 2026-10-11: brand amber, not green/blue). Used by SeasonPicker,
   DifficultyPicker, TeamMatchupPicker's side toggle and the sport pages' own chips (.qse-sel). The dark values also
   apply inside the dark site skin (.qx-page carries data-theme="dark"). */
:root { --qse-sel-bg: #FFF3CC; --qse-sel-border: #D99A00; --qse-sel-text: #5C4100; }
[data-theme="dark"], [data-theme="nord"] { --qse-sel-bg: rgba(255, 184, 0, 0.16); --qse-sel-border: #FFB800; --qse-sel-text: #FFD666; }
.qse-sel, .btn.qse-sel, .btn.qse-sel:hover, .btn.qse-sel:focus { background: var(--qse-sel-bg) !important; border-color: var(--qse-sel-border) !important; color: var(--qse-sel-text) !important; }

/* A tile with no logo PNG (the beta-hub Multiplayer card, 2026-10-11): same shape as the 1909x824 logos. */
.sport-card-art {
    aspect-ratio: 1909 / 824;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: radial-gradient(ellipse at 50% 45%, rgba(37,99,235,0.35), #000 70%);
    color: #fff;
    text-align: center;
}
.sport-card-art img { width: 32%; height: auto; }
.sport-card-art span {
    font-family: var(--qse-heading-font);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(1.6rem, 3.4vw, 3.4rem);
    line-height: 1;
    color: #60A5FA;
}
.sport-card-art small { color: rgba(255,255,255,0.75); font-size: 0.95rem; }

/* Bottom section of sport card (text area) */
.sport-card-body {
    background: #000;
    border-top: none;
    padding: 0.6rem 1rem;
    text-align: center;
    color: #fff;
}
.sport-card-body .text-muted {
    color: rgba(255,255,255,0.7) !important;
}
.sport-card-body small.text-muted {
    color: rgba(255,255,255,0.7) !important;
}
.sport-card-body .sport-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--qse-heading-font);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--qse-accent, var(--qse-blue));
    color: #fff;
}

/* ---------- Sidebar ---------- */
.sidebar {
    background: #000000 !important;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.sidebar .nav-link {
    border-radius: 6px;
    margin: 2px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.sidebar .nav-link:hover {
    background: rgba(44, 111, 214, 0.15);
    color: #fff !important;
}
.sidebar .nav-link.active {
    background: rgba(44, 111, 214, 0.22);
    box-shadow: inset 3px 0 0 var(--qse-blue);
}

/* Sidebar logo image */
.sidebar-logo {
    max-width: 160px;
    border-radius: 0;
}

/* ---------- Swoosh decorative ---------- */
.qse-swoosh {
    display: inline-block;
    width: 120px;
    height: 10px;
    background: linear-gradient(90deg, transparent, var(--qse-blue), transparent);
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.55;
}

/* =========================================================
   Dark mode — set on <html data-theme="dark" data-bs-theme="dark">
   by the early-paint script in App.razor (wired to the persisted
   platform_user_preferences.theme). data-bs-theme flips all Bootstrap
   components for free; the rules below flip our own QSE surfaces +
   token values so custom chrome (cards, footer, skeletons) follows.
   ========================================================= */
[data-theme="dark"], [data-theme="nord"], [data-theme="dracula"], [data-theme="gruvbox-dark"],
[data-theme="solarized-dark"], [data-theme="rose-pine-moon"], [data-theme="everforest-dark"] {
    --qse-app-bg: #0B1220;
    --qse-surface: #121B2E;
    --qse-surface-2: #1A2742;
    --qse-text: #EEF2F8;
    --qse-text-muted: #A6B1C4;
    --qse-border: rgba(255,255,255,0.10);
    --qse-border-strong: rgba(255,255,255,0.30);
    --qse-focus: #9CC2FF;
    --qse-accent: #FFB800;
    --qse-accent-hover: #FFC633;
    --qse-on-accent: #111111;
    --qse-positive: #86EFAC;
    --qse-violet: #D8B4FE;
    --qse-overlay: rgba(0, 0, 0, 0.65);

    --qse-tier-elite-ink: #C4B5FD;
    --qse-tier-allstar-ink: #93C5FD;
    --qse-tier-star-ink: #5EEAD4;
    --qse-tier-starter-ink: #86EFAC;
    --qse-tier-backup-ink: #FCD34D;
    --qse-tier-replacement-ink: #FDBA74;
    --qse-tier-depth-ink: #A6B1C4;

    --qse-skel-base: rgba(255,255,255,0.06);
    --qse-skel-sheen: rgba(255,255,255,0.16);

    --qse-shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --qse-shadow-md: 0 4px 12px rgba(0,0,0,0.55);
    --qse-shadow-lg: 0 12px 32px rgba(0,0,0,0.6);

    --bs-link-color: #9CC2FF;
    --bs-link-color-rgb: 156, 194, 255;
    --bs-link-hover-color: #C7DCFF;
    --bs-link-hover-color-rgb: 199, 220, 255;

    color-scheme: dark;
}

/* Established Nord and Solarized palettes, adapted where small interface text needs
   stronger contrast. Theme identity is independent of Bootstrap's light/dark mode.
   Original palettes: nordtheme.com; github.com/altercation/solarized (MIT). */
[data-theme="nord"] {
    --qse-app-bg: #2e3440; --qse-surface: #3b4252; --qse-surface-2: #434c5e;
    --qse-text: #eceff4; --qse-text-muted: #d8dee9;
    --qse-border: #596579; --qse-border-strong: #8998ad;
    --qse-focus: #88c0d0; --qse-accent: #88c0d0; --qse-accent-hover: #8fbcbb; --qse-on-accent: #2e3440;
    --qse-positive: #a3be8c; --qse-violet: #d6b8d2; --qse-overlay: rgba(46,52,64,.72);
    --qse-sel-bg: rgba(136,192,208,.16); --qse-sel-border: #88c0d0; --qse-sel-text: #eceff4;
    --bs-link-color: #88c0d0; --bs-link-color-rgb: 136,192,208;
    --bs-link-hover-color: #eceff4; --bs-link-hover-color-rgb: 236,239,244;
}
[data-theme="solarized-light"] {
    --qse-app-bg: #fdf6e3; --qse-surface: #eee8d5; --qse-surface-2: #e5dcc3;
    --qse-text: #073642; --qse-text-muted: #465b61;
    --qse-border: #d0c7af; --qse-border-strong: #839496;
    --qse-focus: #006a9c; --qse-accent: #006b74; --qse-accent-hover: #00545c; --qse-on-accent: #ffffff;
    --qse-positive: #526700; --qse-violet: #6054a2; --qse-overlay: rgba(0,43,54,.55);
    --qse-sel-bg: rgba(42,161,152,.13); --qse-sel-border: #006b74; --qse-sel-text: #073642;
    --bs-link-color: #006a9c; --bs-link-color-rgb: 0,106,156;
    --bs-link-hover-color: #004e73; --bs-link-hover-color-rgb: 0,78,115;
    color-scheme: light;
}

/* Dracula (github.com/dracula/dracula-theme) and Gruvbox (github.com/morhetz/gruvbox).
   Decorative/game palettes stay local; muted ink is adapted for interface contrast. */
[data-theme="dracula"] {
    --qse-app-bg: #282a36; --qse-surface: #30323f; --qse-surface-2: #44475a;
    --qse-text: #f8f8f2; --qse-text-muted: #c5c8da;
    --qse-border: #6272a4; --qse-border-strong: #8994bc;
    --qse-focus: #8be9fd; --qse-accent: #ff79c6; --qse-accent-hover: #ff9cd5; --qse-on-accent: #282a36;
    --qse-positive: #50fa7b; --qse-violet: #bd93f9; --qse-overlay: rgba(40,42,54,.75);
    --qse-sel-bg: rgba(255,121,198,.16); --qse-sel-border: #ff79c6; --qse-sel-text: #f8f8f2;
    --bs-link-color: #8be9fd; --bs-link-color-rgb: 139,233,253;
    --bs-link-hover-color: #f8f8f2; --bs-link-hover-color-rgb: 248,248,242;
}
[data-theme="gruvbox-dark"] {
    --qse-app-bg: #282828; --qse-surface: #32302f; --qse-surface-2: #3c3836;
    --qse-text: #fbf1c7; --qse-text-muted: #d5c4a1;
    --qse-border: #665c54; --qse-border-strong: #a89984;
    --qse-focus: #8ec07c; --qse-accent: #fabd2f; --qse-accent-hover: #fece64; --qse-on-accent: #282828;
    --qse-positive: #b8bb26; --qse-violet: #d3869b; --qse-overlay: rgba(29,32,33,.75);
    --qse-sel-bg: rgba(250,189,47,.16); --qse-sel-border: #fabd2f; --qse-sel-text: #fbf1c7;
    --bs-link-color: #8ec07c; --bs-link-color-rgb: 142,192,124;
    --bs-link-hover-color: #fbf1c7; --bs-link-hover-color-rgb: 251,241,199;
}

/* Catppuccin, Rosé Pine and Everforest: recognizable base palettes with
   small-text accents/secondary ink adapted to meet interface contrast checks.
   Sources: github.com/catppuccin/palette, rosepinetheme.com/palette,
   github.com/sainnhe/everforest. */
[data-theme="catppuccin-latte"] {
    --qse-app-bg: #eff1f5; --qse-surface: #eff1f5; --qse-surface-2: #e6e9ef;
    --qse-text: #4c4f69; --qse-text-muted: #5c5f77;
    --qse-border: #ccd0da; --qse-border-strong: #8c8fa1;
    --qse-focus: #1e66f5; --qse-accent: #8839ef; --qse-accent-hover: #7024cf; --qse-on-accent: #ffffff;
    --qse-positive: #28790e; --qse-violet: #8839ef; --qse-overlay: rgba(76,79,105,.55);
    --qse-sel-bg: rgba(136,57,239,.12); --qse-sel-border: #8839ef; --qse-sel-text: #4c4f69;
    --bs-link-color: #1e66f5; --bs-link-color-rgb: 30,102,245;
    --bs-link-hover-color: #164cc0; --bs-link-hover-color-rgb: 22,76,192;
    color-scheme: light;
}
[data-theme="rose-pine-dawn"] {
    --qse-app-bg: #faf4ed; --qse-surface: #fffaf3; --qse-surface-2: #f2e9e1;
    --qse-text: #575279; --qse-text-muted: #6b647c;
    --qse-border: #dfdad9; --qse-border-strong: #9893a5;
    --qse-focus: #286983; --qse-accent: #a34862; --qse-accent-hover: #87384f; --qse-on-accent: #ffffff;
    --qse-positive: #286983; --qse-violet: #755a91; --qse-overlay: rgba(87,82,121,.55);
    --qse-sel-bg: rgba(180,99,122,.12); --qse-sel-border: #a34862; --qse-sel-text: #575279;
    --bs-link-color: #286983; --bs-link-color-rgb: 40,105,131;
    --bs-link-hover-color: #1d4c60; --bs-link-hover-color-rgb: 29,76,96;
    color-scheme: light;
}
[data-theme="rose-pine-moon"] {
    --qse-app-bg: #232136; --qse-surface: #2a273f; --qse-surface-2: #393552;
    --qse-text: #e0def4; --qse-text-muted: #b5b0cc;
    --qse-border: #56526e; --qse-border-strong: #908caa;
    --qse-focus: #9ccfd8; --qse-accent: #ea9a97; --qse-accent-hover: #f0b7b4; --qse-on-accent: #232136;
    --qse-positive: #9ccfd8; --qse-violet: #c4a7e7; --qse-overlay: rgba(35,33,54,.75);
    --qse-sel-bg: rgba(234,154,151,.16); --qse-sel-border: #ea9a97; --qse-sel-text: #e0def4;
    --bs-link-color: #9ccfd8; --bs-link-color-rgb: 156,207,216;
    --bs-link-hover-color: #e0def4; --bs-link-hover-color-rgb: 224,222,244;
}
[data-theme="everforest-dark"] {
    --qse-app-bg: #2d353b; --qse-surface: #343f44; --qse-surface-2: #3d484d;
    --qse-text: #d3c6aa; --qse-text-muted: #c2b8a3;
    --qse-border: #56635f; --qse-border-strong: #9da9a0;
    --qse-focus: #7fbbb3; --qse-accent: #a7c080; --qse-accent-hover: #bfd49d; --qse-on-accent: #2d353b;
    --qse-positive: #a7c080; --qse-violet: #d699b6; --qse-overlay: rgba(35,42,46,.75);
    --qse-sel-bg: rgba(167,192,128,.16); --qse-sel-border: #a7c080; --qse-sel-text: #d3c6aa;
    --bs-link-color: #7fbbb3; --bs-link-color-rgb: 127,187,179;
    --bs-link-hover-color: #d3c6aa; --bs-link-hover-color-rgb: 211,198,170;
}

/* 2026-10-12 (owner): Everforest Light and Catppuccin Mocha were retired as look-alikes of Solarized Light and
   Rosé Pine Moon (QseThemeCatalog.Retired); these two add colours no other theme has — the only teal page and
   the only yellow page. Solarized Dark: github.com/altercation/solarized base03/base02 with base2 text; cyan,
   blue and green lifted for 4.5:1 on every surface. Kanagawa Lotus: github.com/rebelot/kanagawa.nvim lotus
   (lotusWhite3 page, lotusInk2 text); crimson, blue and green deepened for 4.5:1 on every surface. */
[data-theme="solarized-dark"] {
    --qse-app-bg: #002b36; --qse-surface: #073642; --qse-surface-2: #0d4452;
    --qse-text: #eee8d5; --qse-text-muted: #a3b2b4;
    --qse-border: #23505b; --qse-border-strong: #6c8a90;
    --qse-focus: #6fb8ea; --qse-accent: #3cbfb4; --qse-accent-hover: #5fd0c6; --qse-on-accent: #002b36;
    --qse-positive: #9cc23a; --qse-violet: #a4a8e8; --qse-overlay: rgba(0,26,33,.75);
    --qse-sel-bg: rgba(60,191,180,.16); --qse-sel-border: #3cbfb4; --qse-sel-text: #eee8d5;
    --bs-link-color: #6fb8ea; --bs-link-color-rgb: 111,184,234;
    --bs-link-hover-color: #eee8d5; --bs-link-hover-color-rgb: 238,232,213;
}
[data-theme="kanagawa-lotus"] {
    --qse-app-bg: #f2ecbc; --qse-surface: #f7f3d6; --qse-surface-2: #e7dba0;
    --qse-text: #43436c; --qse-text-muted: #5f5d52;
    --qse-border: #d5cea3; --qse-border-strong: #8a8980;
    --qse-focus: #3e5a8c; --qse-accent: #a42f44; --qse-accent-hover: #8a2738; --qse-on-accent: #ffffff;
    --qse-positive: #4a6429; --qse-violet: #624c83; --qse-overlay: rgba(67,67,108,.55);
    --qse-sel-bg: rgba(200,64,83,.12); --qse-sel-border: #a42f44; --qse-sel-text: #43436c;
    --bs-link-color: #3e5a8c; --bs-link-color-rgb: 62,90,140;
    --bs-link-hover-color: #2d4369; --bs-link-hover-color-rgb: 45,67,105;
    color-scheme: light;
}

/* Body canvas + default text follow the tokens in dark mode (Bootstrap's
   data-bs-theme handles its own components; this covers the base page). */
body { background-color: var(--qse-app-bg); color: var(--qse-text); }

html[data-theme] {
    --bs-body-bg: var(--qse-app-bg); --bs-body-color: var(--qse-text);
    --bs-emphasis-color: var(--qse-text); --bs-secondary-color: var(--qse-text-muted);
    --bs-secondary-bg: var(--qse-surface); --bs-tertiary-bg: var(--qse-surface-2);
    --bs-border-color: var(--qse-border);
}
.card { --bs-card-bg: var(--qse-surface); }
html[data-bs-theme="light"] .qse-modal-card .btn-close { filter: none; }
html[data-bs-theme="dark"] .qse-modal-card .btn-close { filter: var(--bs-btn-close-white-filter); }

.qse-theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qse-theme-tools { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.qse-portal:has(.qse-game-toolbar:not([hidden])) [data-qse-legacy-theme-toggle] { display:none; }
.qse-theme-tool { width:44px; height:44px; padding:0; border:1px solid var(--qse-border-strong); border-radius:8px;
    display:inline-flex; align-items:center; justify-content:center; color:var(--qse-text); background:var(--qse-surface); cursor:pointer; }
.qse-theme-tool:focus-visible { outline:3px solid var(--qse-focus); outline-offset:2px; }
.qse-theme-tool:disabled { cursor:wait; }
.qse-quick-theme-menu { position:fixed; inset:70px 12px auto auto; margin:0; width:min(250px,calc(100vw - 24px));
    max-height:calc(100dvh - 150px); overflow:auto; padding:6px; border:1px solid var(--qse-border-strong);
    border-radius:10px; background:var(--qse-surface); color:var(--qse-text); box-shadow:var(--qse-shadow-lg); }
.qse-quick-theme-menu button { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:6px 10px;
    border:0; border-radius:6px; color:var(--qse-text); background:transparent; font-size:.85rem; text-align:left; }
.qse-quick-theme-menu button:hover,.qse-quick-theme-menu button[aria-pressed="true"] { background:var(--qse-surface-2); }
.qse-quick-theme-menu button:focus-visible { outline:2px solid var(--qse-focus); outline-offset:-2px; }
.qse-theme-dot { width:12px; height:12px; flex-shrink:0; border-radius:50%; background:var(--qse-accent); }
.qse-theme-save-error { position:fixed; top:72px; right:12px; max-width:calc(100vw - 24px); z-index:1100;
    padding:8px 12px; background:var(--qse-surface); color:var(--bs-danger-text-emphasis); border:1px solid var(--qse-border-strong); }
@media(max-width:767.98px) {
    .qt-right { gap:6px; }
    .qt-right .qt-plan { display:none; }
    .qt-top > .qt-wrap { gap:6px; }
    .qse-game-toolbar .qse-game-brand { display:none; }
}
@media(max-width:399.98px) { .qt-right .qt-phone,.qt-top .qt-lock span { display:none; } }
.qse-theme-option { display: flex; flex-direction: column; gap: 8px; padding: 12px; text-align: left;
    border: 2px solid var(--qse-border-strong); border-radius: 12px; background: var(--qse-surface); color: var(--qse-text); min-width: 0; }
.qse-theme-option[aria-pressed="true"] { border-color: var(--qse-focus); }
.qse-theme-option:focus-visible { outline: 3px solid var(--qse-focus); outline-offset: 3px; }
.qse-theme-picker > label { min-height: 44px; }
.qse-theme-option > span:last-child { font-size: .85rem; color: var(--qse-text-muted); }
.qse-theme-preview { display: block; width: 100%; border-radius: 8px; padding: 8px; background: var(--qse-app-bg); color: var(--qse-text); }
.qse-theme-preview-bar { display: block; height: 8px; width: 60%; background: var(--qse-accent); border-radius: 4px; margin-bottom: 8px; }
.qse-theme-preview-card { display: flex; align-items: center; justify-content: space-between; padding: 8px; border: 1px solid var(--qse-border); border-radius: 6px; background: var(--qse-surface); }
.qse-theme-preview-card span { width: 24px; height: 12px; border-radius: 4px; background: var(--qse-accent); }
.qse-theme-picker-compact .qse-theme-options { grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); gap:8px; }
.qse-theme-picker-compact .qse-theme-option { gap:4px; padding:8px; border-width:1px; font-size:.82rem; }
.qse-theme-picker-compact .qse-theme-option > span:last-child { display:none; }
.qse-theme-picker-compact .qse-theme-preview { padding:5px; border-radius:5px; }
.qse-theme-picker-compact .qse-theme-preview-bar { height:5px; margin-bottom:5px; }
.qse-theme-picker-compact .qse-theme-preview-card { padding:4px; font-size:.7rem; }
.qse-theme-picker-compact .qse-theme-preview-card span { width:16px; height:8px; }
@media (max-width: 399.98px) { .qse-theme-options { grid-template-columns: minmax(0, 1fr); } }

/* Our custom light-surface chrome that isn't a Bootstrap component. */
[data-bs-theme="dark"] .lobby-card { background: var(--qse-surface); border-color: var(--qse-border); color: var(--qse-text); }
[data-bs-theme="dark"] .lobby-card .text-muted { color: var(--qse-text-muted) !important; }
[data-bs-theme="dark"] .sport-card-body { background: #000; }

/* =========================================================
   League shell (2026-07-18) — shared chrome for every league
   page: the persistent LeagueNavBar + dashboard panels +
   compact stat tables. Token-driven so dark mode is free.
   ========================================================= */

/* ---------- League nav bar ---------- */
.lg-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    background: var(--qse-surface);
    border: 1px solid var(--qse-border);
    border-radius: var(--qse-radius-md);
    padding: 4px 10px;
    margin-bottom: 14px;
    box-shadow: var(--qse-shadow-sm);
    font-size: 0.85rem;
}
.lg-nav-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--qse-heading-font);
    font-weight: 700;
    color: var(--qse-text);
    text-decoration: none;
    padding: 4px 8px 4px 2px;
    margin-right: 4px;
    border-right: 1px solid var(--qse-border);
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lg-nav-brand:hover { color: var(--qse-blue); }
.lg-nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1px;
    min-width: 0;
}
.lg-nav-link {
    display: inline-block;
    padding: 5px 10px;
    border-radius: var(--qse-radius-sm);
    color: var(--qse-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--qse-dur-fast) ease;
}
.lg-nav-link:hover { background: rgba(44,111,214,0.10); color: var(--qse-blue); }
.lg-nav-link.active {
    background: rgba(44,111,214,0.14);
    color: var(--qse-blue);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--qse-blue);
}
.lg-nav-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--qse-text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

/* ---------- League page shell (2026-10-11) ----------
   Every league page in every sport: the wrapper that holds the nav bar gets one width (pages had their own inline
   max-width, 760px to full screen, so the nav bar jumped between pages) and one page-heading style — the league name
   lives in the nav bar, the heading names the page. */
:is(.container, .container-fluid):has(> .lg-nav) {
    max-width: 1280px !important;
    margin-inline: auto;
    padding-inline: 16px;
}
:is(.container, .container-fluid):has(> .lg-nav) h1:not(.visually-hidden) {
    font-family: var(--qse-heading-font);
    font-size: clamp(1.35rem, 3.2vw, 1.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.35rem;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
/* "Back to League / Dashboard / League Office" links repeat the nav bar. They stay in the markup (error states render
   without the nav bar and still need a way out) and hide only when the nav bar is on the page. */
:is(.container, .container-fluid):has(> .lg-nav) .lg-back { display: none !important; }
/* Wide tables scroll inside their own box on phones instead of being clipped at the edge. */
@media (max-width: 767.98px) {
    /* Nav dropdowns: anchored to the nav bar, full width, so the right-hand menus (History, Commish) can't open past
       the screen edge. */
    .lg-nav { position: relative; }
    .lg-nav .lg-dd { position: static; }
    .lg-nav .lg-dd-menu { left: 6px; right: 6px; min-width: 0; }
    :is(.container, .container-fluid):has(> .lg-nav) :is(.card, .card-body, .lg-panel, .lg-panel-body):has(> table) { overflow-x: auto; }
    :is(.container, .container-fluid):has(> .lg-nav) :is(.card, .card-body, .lg-panel, .lg-panel-body) > table { min-width: max-content; }
}

/* Native <details> dropdown — works on static-SSR pages with zero JS. */
.lg-dd { position: relative; display: inline-block; }
.lg-dd > summary {
    list-style: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--qse-radius-sm);
    color: var(--qse-text);
    white-space: nowrap;
    user-select: none;
}
.lg-dd > summary::-webkit-details-marker { display: none; }
.lg-dd > summary::after { content: " ▾"; font-size: 0.7em; color: var(--qse-text-muted); }
.lg-dd > summary:hover { background: rgba(44,111,214,0.10); color: var(--qse-blue); }
.lg-dd > summary.active {
    background: rgba(44,111,214,0.14);
    color: var(--qse-blue);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--qse-blue);
}
.lg-nav-brand-name { overflow: hidden; text-overflow: ellipsis; }
/* 2026-11-18 (owner): league initials beside the name; on a phone the initials stand in for the full name. */
.lg-nav-brand-abbr {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.05rem 0.4rem; border-radius: 0.3rem;
    background: rgba(44,111,214,0.14); color: var(--qse-blue); white-space: nowrap;
}
@media (max-width: 575.98px) {
    .lg-nav-brand-abbr { font-size: 0.85rem; }
    .lg-nav-brand-abbr:not(:empty) + .lg-nav-brand-name { display: none; }
}
.lg-dd[open] > summary { background: rgba(44,111,214,0.14); color: var(--qse-blue); }
.lg-dd-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1050;
    min-width: 200px;
    background: var(--qse-surface);
    border: 1px solid var(--qse-border);
    border-radius: var(--qse-radius-md);
    box-shadow: var(--qse-shadow-md);
    padding: 6px;
}
.lg-dd-menu a {
    display: block;
    padding: 6px 10px;
    border-radius: var(--qse-radius-sm);
    color: var(--qse-text);
    text-decoration: none;
    white-space: nowrap;
}
.lg-dd-menu a:hover { background: rgba(44,111,214,0.10); color: var(--qse-blue); }
/* Close any open dropdown when the pointer leaves it (no-JS nicety). */
@media (hover: hover) {
    .lg-dd:not(:hover):not(:focus-within)[open] > .lg-dd-menu { display: none; }
    .lg-dd:not(:hover):not(:focus-within)[open] > summary { background: transparent; color: var(--qse-text); }
}

/* ---------- Dashboard / league panels ---------- */
.lg-panel {
    background: var(--qse-surface);
    border: 1px solid var(--qse-border);
    border-radius: var(--qse-radius-md);
    box-shadow: var(--qse-shadow-sm);
    margin-bottom: 14px;
}
.lg-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--qse-border);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--qse-text-muted);
}
.lg-panel-title a { font-weight: 600; letter-spacing: normal; text-transform: none; font-size: 0.78rem; }
.lg-panel-body { padding: 10px 12px; }
.lg-panel-body.p-0 { padding: 0; }

/* ---------- Compact league stat table ---------- */
.lg-table { width: 100%; margin: 0; font-size: 0.83rem; border-collapse: collapse; }
.lg-table th {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--qse-text-muted);
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 2px solid var(--qse-border);
    white-space: nowrap;
}
.lg-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--qse-border);
    font-variant-numeric: tabular-nums;
}
/* Football league table contract: names read down the left edge, state labels share a centered
   column, and quantities share a right edge even as their digit counts change. */
.football-standings-table th,
.football-standings-table td,
.football-roster-table th,
.football-roster-table td { font-variant-numeric: tabular-nums; }
.football-standings-table th:not(:first-child),
.football-standings-table td:not(:first-child) { white-space: nowrap; }
.football-roster-table th,
.football-roster-table td { vertical-align: middle; }
/* 2026-11-07 (owner: "make sure all columns line up nicely and neatly"): every division's standings table and every
   box-score category is its OWN table, so auto layout sized each one's columns to its own numbers and they drifted
   from table to table. Fixed layout with fixed-width stat columns gives every table the same right-hand grid (the name
   column takes what is left); a minimum width keeps phones scrolling sideways rather than crushing the names. */
/* 2026-11-07 (owner: "a huge gap between city and the standings. Move both ... more towards center"): the table stops
   at 50rem, so the team name sits next to its numbers on a wide screen. */
.football-standings-table { table-layout: fixed; min-width: 42rem; width: min(100%, 50rem); }
.football-standings-table th:nth-child(2),
.football-standings-table th:nth-child(3),
.football-standings-table th:nth-child(4) { width: 2.5rem; }
.football-standings-table th:nth-child(5) { width: 3.75rem; }
.football-standings-table th:nth-child(6),
.football-standings-table th:nth-child(7),
.football-standings-table th:nth-child(8) { width: 3.25rem; }
.football-standings-table th:nth-child(9),
.football-standings-table th:nth-child(10),
.football-standings-table th:nth-child(11) { width: 3.75rem; }
.football-standings-table td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.football-boxscore-table { table-layout: fixed; width: 100%; min-width: 26rem; }
.football-boxscore-table th:not(:first-child) { width: 4.5rem; }
.football-boxscore-table th:last-child { width: 5.25rem; }   /* the last column carries the panel's right padding */
.football-boxscore-table td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.football-boxscore-table th:not(:first-child),
.football-boxscore-table td:not(:first-child) { white-space: nowrap; }
/* The league record book (2026-11-07): one table per category, one grid - Record and Holder share what's left. */
.football-records-table { table-layout: fixed; min-width: 34rem; font-variant-numeric: tabular-nums; }
.football-records-table th:nth-child(1) { width: 38%; }
.football-records-table th:nth-child(3) { width: 4.5rem; }
.football-records-table th:nth-child(4) { width: 5.5rem; }
.football-records-table th:nth-child(5) { width: 5rem; }
.football-records-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 2026-11-07 (owner: key ratings + real stats per player) - the football league roster: ONE table, a tbody per position
   group, fixed columns so every group's ratings and real-season numbers share one right edge; the player column takes
   what is left, and the minimum width makes phones scroll sideways instead of crushing the names. */
.football-roster-cards { table-layout: fixed; width: 100%; min-width: 62rem; }
.football-roster-cards.rc-with-actions { min-width: 74rem; }
.football-roster-cards col.rc-pos { width: 3rem; }
.football-roster-cards col.rc-num { width: 3.25rem; }
.football-roster-cards col.rc-g { width: 2.5rem; }
.football-roster-cards col.rc-stat { width: 3.75rem; }
.football-roster-cards col.rc-status { width: 5.75rem; }
.football-roster-cards col.rc-usage { width: 6.75rem; }
.football-roster-cards col.rc-acq { width: 7rem; }
.football-roster-cards col.rc-act { width: 12.5rem; }
.football-roster-cards td, .football-roster-cards th { white-space: nowrap; }
.football-roster-cards td.rc-name { white-space: normal; overflow-wrap: anywhere; }
.football-roster-cards thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--qse-text-muted); }
.football-roster-cards tr.rc-group-head th {
    font-size: 0.72rem; font-weight: 600; color: var(--qse-text-muted);
    background: var(--bs-tertiary-bg); border-top: 2px solid var(--qse-border);
}
.football-roster-cards tr.rc-group-head th:first-child { font-size: 0.8rem; color: var(--bs-body-color); }
/* The roster header's Team Home / Rivals buttons: equal cells (UI alignment rule; they were 78 vs 118 px wide). */
@media (min-width: 768px) {   /* phones already square these buttons up in the league header rules */
    .roster-head-actions { display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; }
    .roster-head-actions > .btn { white-space: nowrap; }
}
/* Phones: the league pages size a panel's table to its content (max-content, above); box-score categories keep ONE
   width instead, so they still line up with each other (and scroll sideways together). */
@media (max-width: 767.98px) {
    /* Narrower stat columns, and room for the name: the widest category (defense, 6 columns) still shows ~7rem of it. */
    :is(.container, .container-fluid):has(> .lg-nav) .lg-panel-body > table.football-boxscore-table { min-width: 29rem; }
    .football-boxscore-table th:not(:first-child) { width: 3.5rem; }
    .football-boxscore-table th:last-child { width: 4.25rem; }
}
.lg-table tbody tr:last-child td { border-bottom: none; }
.lg-table tbody tr:hover { background: rgba(44,111,214,0.05); }
.lg-table .lg-row-me { background: rgba(44,111,214,0.10); font-weight: 600; }
.lg-table a { color: inherit; }
.lg-table a:hover { color: var(--qse-blue); }

/* 2026-11-07 (owner: standings always by conference / division) - the league home card: one column per conference
   (stacked on a phone), each division's teams in record order. */
.lg-std-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 20px; padding: 6px 12px 10px; }
.lg-std-conf-name {
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 6px 0 4px; border-bottom: 2px solid var(--qse-border);
}
.lg-std-div-name {
    font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--qse-text-muted); margin-top: 8px; padding: 0 8px 2px;
}
.lg-std-table td { padding: 3px 8px; }
.lg-std-table .lg-std-rec { width: 5.4em; white-space: nowrap; }   /* fits "15-2-0" on one line (2026-11-07) */
.lg-std-table .lg-std-diff { width: 3.6em; white-space: nowrap; }
/* 2026-11-07: full team names in the compact standings - one line, ellipsized; the "(PIT)" tag shows only where the
   column has room for it (a conference column under ~260px drops it). */
.lg-std-conf { container-type: inline-size; min-width: 0; }
.lg-std-table { table-layout: fixed; width: 100%; }
.lg-std-table .lg-std-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-std-abbr { color: var(--qse-text-muted, #8a94a6); font-size: 0.85em; }
@container (max-width: 260px) { .lg-std-abbr { display: none; } }

/* Sortable header cells (SortableStatTable) */
.lg-table th.lg-sortable { cursor: pointer; }
.lg-table th.lg-sortable:hover { color: var(--qse-blue); }
/* 2026-10-06 (audit item 10): clickable non-button elements made keyboard-operable (role="button" tabindex="0") need a
   visible focus ring. */
[role="button"][tabindex="0"]:focus-visible { outline: 2px solid var(--qse-blue); outline-offset: 2px; }
/* 2026-10-06 (audit item 12): skip link, shown only while focused (Bootstrap's visually-hidden-focusable). */
.qse-skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 2000; padding: 8px 14px; background: #fff; color: #142244;
    border: 2px solid var(--qse-blue); border-radius: 6px; font-weight: 600; text-decoration: none; }
/* 2026-10-06 (audit item 8): the sort control is a real button that looks like the header text. */
.lg-table .lg-sort-btn { all: unset; cursor: pointer; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.lg-table .lg-sort-btn:hover { color: var(--qse-blue); }
.lg-table .lg-sort-btn:focus-visible { outline: 2px solid var(--qse-blue); outline-offset: 2px; border-radius: 2px; }
.lg-table th .lg-sort-arrow { font-size: 0.62rem; color: var(--qse-blue); margin-left: 2px; }

/* Platform stats grid (StatTable, 2026-11-05): toolbar, column groups, non-qualifier rows, pager.
   UI alignment rule: every grid button is the same box (.lg-grid-btn: fixed width + height), so the toolbar
   buttons and the pager line up; the Totals / Per game pair is a 2-cell grid of that box. */
.lg-grid-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; }
/* Columns / Export CSV: a grid of the same 7.5rem cells, pushed right on a wide screen; on a phone it wraps under the
   Totals / Per game pair and its cells line up with that pair's (first column flush left). */
.lg-grid-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 7.5rem; gap: 12px; margin-left: auto; }
.lg-grid-btn {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    width: 7.5rem; height: 2rem; padding: 0 8px; border-radius: var(--qse-radius-sm);
    border: 1px solid var(--qse-border-strong); background: var(--qse-surface); color: var(--qse-text);
    font: inherit; font-size: 0.78rem; font-weight: 600; line-height: 1; white-space: nowrap;
    cursor: pointer; text-decoration: none; list-style: none; user-select: none; flex-shrink: 0;
}
.lg-grid-btn::-webkit-details-marker { display: none; }
.lg-grid-btn:hover:not(:disabled) { border-color: var(--qse-blue); color: var(--qse-blue); }
.lg-grid-btn:focus-visible { outline: 2px solid var(--qse-focus); outline-offset: 2px; }
.lg-grid-btn:disabled { opacity: 0.45; cursor: default; }
.lg-grid-btn.active { background: var(--qse-blue); border-color: var(--qse-blue); color: #fff; }
.lg-grid-seg { display: grid; grid-template-columns: repeat(2, 7.5rem); gap: 0; }
.lg-grid-seg .lg-grid-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.lg-grid-seg .lg-grid-btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-width: 0; }
.lg-grid-check { margin: 0; font-size: 0.8rem; display: flex; align-items: center; gap: 6px; min-height: 2rem; }
.lg-grid-check .form-check-input { margin-top: 0; }
.lg-grid-picker { position: relative; }
.lg-grid-picker-menu {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 12rem; max-height: 18rem; overflow: auto;
    padding: 6px 8px; background: var(--qse-surface); border: 1px solid var(--qse-border); border-radius: var(--qse-radius-md);
    box-shadow: var(--qse-shadow-md); display: grid; grid-template-columns: repeat(2, minmax(5.5rem, 1fr)); gap: 2px 10px;
}
.lg-grid-picker-item { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; white-space: nowrap; }
.lg-table tr.lg-grid-groups th { font-size: 0.66rem; letter-spacing: 0.08em; border-bottom: 1px solid var(--qse-border); }
.lg-table tr.lg-grid-nq td { color: var(--qse-text-muted); font-style: italic; }
.lg-table td.lg-grid-rank { white-space: nowrap; }
.lg-grid-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 12px; }
.lg-grid-range { font-size: 0.78rem; color: var(--qse-text-muted); min-width: 9rem; text-align: center; }
.lg-grid-hint { font-size: 0.7rem; color: var(--qse-text-muted); padding: 2px 12px 6px; }
@media (max-width: 575.98px) {
    .lg-grid-btn { width: 6.5rem; }
    /* Phone: both pairs are 2-cell grids with the same cell and gap, so the four buttons form one 2-column grid. */
    .lg-grid-seg { grid-template-columns: repeat(2, 6.5rem); gap: 8px; }
    .lg-grid-seg .lg-grid-btn:first-child, .lg-grid-seg .lg-grid-btn:last-child { border-radius: var(--qse-radius-sm); border-left-width: 1px; }
    .lg-grid-actions { grid-auto-columns: 6.5rem; gap: 8px; margin-left: 0; flex-basis: 100%; }
    /* 2026-11-11: on a phone the Columns button sits at the LEFT of the bar, so a right-anchored menu opened off-screen
       (x < 0, nothing could be ticked). Open it rightward from the button instead. */
    .lg-grid-picker-menu { left: 0; right: auto; max-width: calc(100vw - 32px); }
    .lg-grid-range { min-width: 0; flex: 1 1 auto; }
}

/* Leaders filter bar (LeaderFilterBar, 2026-11-05): season / team / position / qualifier controls are equal cells of
   one grid (owner UI rule), the first column flush left; a phone gets two equal columns. */
.lg-filter-bar { display: grid; grid-template-columns: repeat(auto-fill, 10rem); gap: 8px 12px; margin-bottom: 10px; }
.lg-filter { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.lg-filter-wide { grid-column: span 2; }
.lg-filter-label { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--qse-text-muted); white-space: nowrap; }
.lg-filter .form-select, .lg-filter .form-control { width: 100%; height: 2rem; }
/* League rank next to a stat (StatColumn.RankBadge): the team's place in the league for that column. */
.lg-rank-badge { display: inline-block; min-width: 2.1rem; margin-left: 4px; padding: 0 4px; border-radius: var(--qse-radius-sm);
    font-size: 0.66rem; font-weight: 600; line-height: 1.35; text-align: center; color: var(--qse-text-muted);
    background: var(--qse-surface-2, rgba(127,127,127,0.12)); font-variant-numeric: tabular-nums; }
.lg-rank-badge.lg-rank-top { color: #fff; background: var(--qse-blue); }
/* Segmented choice rows (splits groups, compare sections): equal cells of the grid button box, wrapping in columns. */
.lg-seg-row { display: grid; grid-template-columns: repeat(auto-fill, 7.5rem); gap: 8px; margin-bottom: 8px; }
/* Two-player compare (PlayerCompareView): the better value of each row is bold. */
.lg-compare td.lg-cmp-best { font-weight: 700; color: var(--qse-blue); }
.lg-compare th.lg-cmp-stat, .lg-compare td.lg-cmp-stat { color: var(--qse-text-muted); text-align: center; white-space: nowrap; }
@media (max-width: 575.98px) {
    .lg-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg-seg-row { grid-template-columns: repeat(auto-fill, 6.5rem); }
}

/* Rating tiers (RatingDisplay.TierCss) — one colour scale for every rating number, bar and badge. */
.qse-tier-elite { --qse-tier: var(--qse-tier-elite); --qse-tier-ink: var(--qse-tier-elite-ink); }
.qse-tier-allstar { --qse-tier: var(--qse-tier-allstar); --qse-tier-ink: var(--qse-tier-allstar-ink); }
.qse-tier-star { --qse-tier: var(--qse-tier-star); --qse-tier-ink: var(--qse-tier-star-ink); }
.qse-tier-starter { --qse-tier: var(--qse-tier-starter); --qse-tier-ink: var(--qse-tier-starter-ink); }
.qse-tier-backup { --qse-tier: var(--qse-tier-backup); --qse-tier-ink: var(--qse-tier-backup-ink); }
.qse-tier-replacement { --qse-tier: var(--qse-tier-replacement); --qse-tier-ink: var(--qse-tier-replacement-ink); }
.qse-tier-depth { --qse-tier: var(--qse-tier-depth); --qse-tier-ink: var(--qse-tier-depth-ink); }
.qse-tier-text, .qse-tier-text.val { color: var(--qse-tier-ink); }
.qse-tier-fill { background: var(--qse-tier); }
.badge.qse-tier-badge, .qse-tier-badge { background: var(--qse-tier); color: #fff; }

/* Rating bars (RatingBarGrid — shared player-page attribute grid) */
.lg-rating-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 18px; }
.lg-rating-row { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; }
.lg-rating-row .lg-rating-name { width: 88px; color: var(--qse-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-rating-row .lg-rating-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--qse-surface-2); overflow: hidden; }
.lg-rating-row .lg-rating-fill { height: 100%; border-radius: 3px; }
.lg-rating-row .lg-rating-val { width: 24px; text-align: right; font-weight: 700; }

/* Quick-link columns (LeagueHome footer nav) */
.lg-linkcols { display: flex; flex-wrap: wrap; gap: 18px 34px; font-size: 0.82rem; }
.lg-linkcols .lg-linkcol { min-width: 150px; }
.lg-linkcols .lg-linkcol-title {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--qse-text-muted); margin-bottom: 4px;
}
.lg-linkcols a { display: block; padding: 2px 0; color: var(--qse-text); text-decoration: none; }
.lg-linkcols a:hover { color: var(--qse-blue); }

/* 2026-11-08 (owner: "Time remaining on clock: 5h 32m") - the draft room clock's label, and a slow draft's hours-and-
   minutes reading a size down so "23h 59m" fits the header (the clock itself is styled in DraftRoom.razor). */
.draft-clock-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.draft-clock-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; color: #94a3b8; white-space: nowrap; }
.draft-clock.long { font-size: 1.9rem; white-space: nowrap; }
@media (max-width: 575px) {
    .draft-clock-label { font-size: 0.55rem; letter-spacing: 0.06em; white-space: normal; text-align: center; }
    .draft-clock.long { font-size: 1.25rem; }
}

/* 2026-11-08 (owner: "the last 20 seconds of a team on the clock ... flash red so they know time is almost up"):
   from 20 seconds the running pick clock flashes red (draft-alerts.js adds .flash; a paused clock stays steady red). */
.draft-clock.red:not(.flash) { animation: none; }
.draft-clock.red.flash { animation: qseClockFlash 1s steps(1, end) infinite; }
@keyframes qseClockFlash {
    0%   { color: #fff; background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.55); }
    50%  { color: #f87171; background: rgba(0, 0, 0, 0.4); box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
    .draft-clock.red.flash { animation: none; color: #fff; background: #dc2626; }
}

/* 2026-11-08 (owner: uploaded logos across standings, schedules and game pages) - <LeagueLogo>. */
img.lg-logo { object-fit: contain; vertical-align: middle; flex: 0 0 auto; display: inline-block; }
.lg-logo-gap { margin-right: 6px; }

/* 2026-11-18 (owner: admin users "sorting and filters") - the filter bar: equal cells that wrap into columns, the
   first flush left (UI alignment rule); sortable headers read as headers, not links. */
.um-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem; }
.um-sort { color: inherit; font-weight: inherit; text-decoration: none; white-space: nowrap; }
.um-sort:hover, .um-sort:focus-visible { text-decoration: underline; }
