/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FPL Pals â€” Design System
   Inspired by the official Fantasy Premier League visual language.
   PL purple, neon green accent, flat surfaces, clean typography.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* Interactive Server removed â€” hide any leftover reconnect UI from the framework. */
#components-reconnect-modal {
    display: none !important;
}

/* â”€â”€ CSS Custom Properties (Design Tokens) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
    /* Brand */
    --color-primary: #37003c;
    --color-primary-light: #5a1060;
    --color-primary-dark: #2a002e;
    --color-accent: #00ff87;
    --color-accent-dim: #00cc6a;
    --color-magenta: #e90052;

    /* Semantic */
    --color-success: #00ff87;
    --color-warning: #f5a623;
    --color-danger: #e90052;
    --color-info: #04f5ff;

    /* Dark Theme (Default) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1e1e1e;
    --bg-card: #161616;
    --bg-card-hover: #1c1c1c;
    --bg-input: #1e1e1e;
    --bg-sidebar: #0f0f0f;

    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-muted: #6b6b6b;
    --text-inverse: #0a0a0a;
    --text-accent: #00ff87;

    --border-color: #2a2a2a;
    --border-light: #1f1f1f;

    /* Shadows â€” subtle, no glows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.6);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;

    --leading-tight: 1.2;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Safe areas (zero on desktop and devices without display cutouts) */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);

    /* Bottom nav */
    --bottom-nav-height: 64px;
    --bottom-nav-edge: 10px;
    --bottom-nav-offset: calc(var(--bottom-nav-height) + var(--bottom-nav-edge) + var(--safe-area-bottom));

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    /* Z-Index scale
       100  dropdowns / in-page popovers (below chrome)
       200  app chrome (header, bottom nav, sidebar)
       260  permanent floating chrome (FABs, AI dock)
       400  temporary closable overlays (modals, dialogs, reaction picker)
       450  nested confirms above an open modal
       500  toasts
       1000 system UI (Blazor error)
       9999 boot splash */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fab: 260;
    --z-overlay: 400;
    --z-modal: 400;
    --z-modal-nested: 450;
    --z-toast: 500;
    --z-system: 1000;
    --z-boot: 9999;

    /* Layout */
    --sidebar-width: 240px;
    --header-height: 56px;
    --app-header-offset: calc(var(--header-height) + var(--safe-area-top));
    --app-bottom-chrome: 0px;
    --max-content-width: 1200px;
}

/* â”€â”€ Light Theme â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #f0f0f0;
    --bg-tertiary: #e5e5e5;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f5;
    --bg-input: #f0f0f0;
    --bg-sidebar: #37003c;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b6b6b;
    --text-inverse: #f0f0f0;
    --text-accent: #37003c;

    --border-color: #e0e0e0;
    --border-light: #ebebeb;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* â”€â”€ Base Reset â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
    overflow: hidden;
    /* PWA status bar / notch (black-translucent) â€” keep chrome black, not brand green */
    background: #000000;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* â”€â”€ Typography â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-3xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p { color: var(--text-secondary); line-height: var(--leading-relaxed); }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-dim); }

/* â”€â”€ Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-wrapper {
    display: flex;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--z-sticky);
    padding-top: var(--safe-area-top);
    box-sizing: border-box;
}

.sidebar-brand {
    padding: var(--space-5) var(--space-5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.sidebar-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sidebar-brand-text {
    font-size: var(--text-lg);
    font-weight: 700;
    color: #ffffff;
}

/* â”€â”€ Shared brand wordmark (FPL white / PALS accent) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.brand-wordmark {
    display: inline-flex;
    align-items: baseline;
    font-family: var(--font-sans);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.03em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand-fpl {
    color: #ffffff;
}

.brand-pals {
    color: var(--color-accent);
}

.brand-subtitle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand-subtitle-line {
    display: block;
    width: 1.75rem;
    height: 2px;
    border-radius: 999px;
    background: var(--color-accent);
    flex-shrink: 0;
}

.brand-wordmark--header {
    font-size: 0.95rem;
}

.brand-wordmark--sidebar {
    font-size: 1.05rem;
}

.brand-wordmark--hero {
    font-size: clamp(2.8rem, 8vw, 4.2rem);
    letter-spacing: -0.04em;
}

.brand-subtitle--header,
.brand-subtitle--sidebar {
    font-size: 0.55rem;
    letter-spacing: 0.12em;
}

.brand-subtitle--hero {
    justify-content: center;
    margin-top: var(--space-3);
    font-size: clamp(0.75rem, 2vw, 0.92rem);
    letter-spacing: 0.2em;
}

.brand-subtitle--hero .brand-subtitle-line {
    width: 2.25rem;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-3) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-section-label {
    padding: var(--space-4) var(--space-3) var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: var(--color-accent);
    background: rgba(0, 255, 135, 0.08);
    border-left-color: var(--color-accent);
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    box-sizing: border-box;
    min-height: calc(var(--header-height) + var(--safe-area-top));
    padding: var(--safe-area-top) calc(var(--space-8) + var(--safe-area-right)) 0 calc(var(--space-8) + var(--safe-area-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: relative;
    flex-shrink: 0;
    z-index: var(--z-sticky);
}

.content-body {
    padding: var(--space-8);
    padding-bottom: calc(var(--space-8) + 80px);
    max-width: var(--max-content-width);
    width: 100%;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Chat page: fill remaining space under header, no nested page scroll */
.content-body:has(.chat-shell) {
    padding: 0;
    max-width: none;
    width: 100%;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    animation: none; /* transform animations break height fill */
}

.content-body:has(.chat-shell) > .chat-shell {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
}

/* Personal AI on My Team: hide page siblings so chat-shell fills like league chat */
.content-body:has(> .chat-shell.chat-shell--personal) > :not(.chat-shell) {
    display: none !important;
}

.main-content:has(.chat-shell) .content-header {
    flex-shrink: 0;
}

/* â”€â”€ Header Brand & Icon Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.header-cluster--main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.header-cluster--actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.header-avatar-wrap {
    display: flex;
}

a.header-login-pill {
    display: none;
}

.header-more-wrap,
.breadcrumb-text,
.username-text {
    display: none;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.header-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    color: var(--color-primary);
}

.header-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
}

.header-brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    line-height: 1.05;
}

.header-brand-text {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.header-brand--guest-home {
    border: 1px solid rgba(0, 255, 135, 0.55);
    border-radius: 999px;
    padding: 4px 10px 4px 4px;
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.22), 0 0 18px rgba(0, 255, 135, 0.16);
    background: rgba(0, 255, 135, 0.1);
    gap: 6px;
}

.header-brand--guest-home:hover,
.header-brand--guest-home:focus-visible {
    border-color: rgba(0, 255, 135, 0.85);
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.4), 0 0 22px rgba(0, 255, 135, 0.28);
    background: rgba(0, 255, 135, 0.16);
}

.header-brand-home-hint {
    flex-shrink: 0;
    margin-left: 2px;
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #04140c;
    background: var(--color-accent);
    line-height: 0;
}

.header-brand-home-hint svg {
    display: block;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.header-icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.header-notif-btn {
    position: relative;
    overflow: visible;
}

.header-notif-btn.has-unread {
    color: var(--color-magenta);
    border-color: rgba(233, 0, 82, 0.55);
    background: rgba(233, 0, 82, 0.12);
}

.header-notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--color-magenta);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 0 0 1px rgba(233, 0, 82, 0.35);
    pointer-events: none;
    z-index: 2;
}

.header-notif-menu {
    width: min(22rem, calc(100vw - 1.5rem));
    min-width: 16rem;
    padding: 8px;
}

.header-notif-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px 8px;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.header-notif-menu-count {
    min-width: 1.4rem;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--color-magenta);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
    line-height: 1.4;
}

.header-notif-empty {
    padding: 12px 10px 14px;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.header-notif-menu .header-notif-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.header-notif-item-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-notif-item-body {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-notif-item-time {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

.header-notif-menu .header-notif-show-all {
    margin-top: 4px;
    justify-content: center;
    font-weight: 700;
    color: var(--color-accent);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 12px 12px;
}

.header-pill {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none;
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    -webkit-tap-highlight-color: transparent;
}

.header-pill svg {
    width: 18px;
    height: 18px;
}

.header-avatar-btn {
    overflow: hidden;
    padding: 0;
}

.header-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--color-primary);
    background: var(--color-accent);
    border-radius: 999px;
}

.header-avatar--photo {
    display: block;
    object-fit: cover;
}

.header-avatar--lg {
    width: 36px;
    height: 36px;
    font-size: 13px;
    flex-shrink: 0;
}

.header-account-menu {
    min-width: 240px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(22, 22, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.header-account-menu-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-account-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.header-account-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-account-pro-pill {
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #111;
    background: var(--color-accent);
}

.header-account-hint {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

.header-account-menu a,
.header-account-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
}

.header-account-menu a svg,
.header-account-menu button svg,
.header-account-menu-pro svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.header-account-menu a.is-danger {
    color: #ff8aa3;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 12px 12px;
}

.page-wrapper > .admin-modal-root {
    z-index: 100010;
}

.header-account-menu-pro {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--color-accent);
    font-weight: 700;
    pointer-events: none;
}

.header-account-pro-badge {
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111;
    background: var(--color-accent);
}

.sidebar-notif-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--color-magenta);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
}

/* â”€â”€ Bottom Navigation (mobile floating dock) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.bottom-nav {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--bottom-nav-edge) + var(--safe-area-bottom));
    width: calc(100% - 24px);
    max-width: 420px;
    height: auto;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 6px 8px;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    background: linear-gradient(145deg, rgba(42, 42, 48, 0.96) 0%, rgba(16, 16, 20, 0.94) 52%, rgba(30, 30, 36, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: var(--z-sticky);
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    transform: translateX(0);
    transition: padding var(--transition-fast), max-width var(--transition-fast), width var(--transition-fast), left var(--transition-fast), transform var(--transition-fast), gap var(--transition-fast);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 6px 2px 5px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    border-radius: 999px;
    transition: color var(--transition-fast), background-color var(--transition-fast), padding var(--transition-fast), gap var(--transition-fast);
    min-height: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bottom-nav-item.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.bottom-nav-item:hover {
    color: var(--text-primary);
}

.bottom-nav-icon {
    width: 20px;
    height: 20px;
    transition: width var(--transition-fast), height var(--transition-fast);
}

.bottom-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: width var(--transition-fast), height var(--transition-fast);
}

.bottom-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-magenta);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    border: 2px solid rgba(22, 22, 24, 0.9);
    box-shadow: 0 0 0 1px rgba(233, 0, 82, 0.35);
    pointer-events: none;
    z-index: 2;
}

.bottom-nav-label {
    letter-spacing: 0.02em;
    max-height: 1.2em;
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    transition: max-height var(--transition-fast), opacity var(--transition-fast), margin var(--transition-fast), color var(--transition-fast);
}

.bottom-nav-item.active .bottom-nav-label {
    color: #ffffff;
}

.bottom-nav.is-compact {
    left: 0;
    right: 0;
    width: fit-content;
    max-width: calc(100% - 72px);
    margin-left: auto;
    margin-right: auto;
    padding: 5px 10px;
    gap: 0;
    transform: none;
}

.bottom-nav.is-compact .bottom-nav-item {
    flex: 0 0 auto;
    gap: 0;
    min-width: 36px;
    padding: 6px 6px;
}

.bottom-nav.is-compact .bottom-nav-icon-wrap {
    width: 24px;
    height: 24px;
}

.bottom-nav.is-compact .bottom-nav-icon {
    width: 18px;
    height: 18px;
}

.bottom-nav.is-compact .bottom-nav-label {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

@media (max-width: 380px) {
    .bottom-nav-label {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bottom-nav,
    .bottom-nav-item,
    .bottom-nav-icon,
    .bottom-nav-icon-wrap,
    .bottom-nav-label {
        transition: none;
    }
}

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    border-color: #3a3a3a;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* â”€â”€ Stat Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--color-accent);
}

.stat-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.stat-change {
    font-size: var(--text-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.stat-change.positive { color: var(--color-success); }
.stat-change.negative { color: var(--color-danger); }

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: var(--text-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    min-height: 44px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-primary-light);
    color: var(--color-accent);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-3);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-primary);
    border: 1px solid transparent;
    font-weight: 800;
    border-radius: var(--radius-full);
}

.btn-accent:hover {
    background: var(--color-accent-dim);
    color: var(--color-primary);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    min-height: 36px;
}

/* â”€â”€ Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(55, 0, 60, 0.3);
    color: #c080cc;
}

.badge-success {
    background: rgba(0, 255, 135, 0.12);
    color: var(--color-accent);
}

.badge-warning {
    background: rgba(245, 166, 35, 0.15);
    color: var(--color-warning);
}

.badge-danger {
    background: rgba(233, 0, 82, 0.15);
    color: var(--color-danger);
}

.badge-info {
    background: rgba(4, 245, 255, 0.12);
    color: var(--color-info);
}

.badge-muted {
    background: rgba(107, 107, 107, 0.15);
    color: var(--text-muted);
}

/* Standings header: one column with a controls row and a centered title row. */
.league-v3-standings-header {
    display: flex !important;
    flex-flow: row nowrap;
    width: 100%;
    align-items: stretch;
    gap: 0;
    padding: .35rem .5rem .25rem !important;
    margin-bottom: .18rem !important;
}

.league-v3-standings-controls {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.league-v3-standings-header__left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.league-v3-standings-header__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    margin-left: auto;
}

.league-v3-standings-header .league-standings-gameweek-select {
    min-width: 8.6rem;
    max-width: 10.5rem;
}

@media (max-width: 640px) {
    .league-v3-standings-header {
        padding: .28rem .5rem .18rem !important;
        margin-bottom: .12rem !important;
    }

    .league-v3-standings-controls {
        gap: .3rem;
    }

    .league-v3-standings-header .league-standings-gameweek-select {
        min-width: 8.1rem;
        max-width: 9.4rem;
        padding-right: 1.35rem;
        padding-left: .55rem;
        font-size: .68rem;
    }

    .league-v3-standings-header .standings-view-toggle {
        max-width: 100%;
    }

    .league-v3-standings-header .standings-view-toggle__button {
        min-width: 0;
        padding-right: .4rem;
        padding-left: .4rem;
        font-size: .62rem;
    }
}

.header-settings-old,
.header-logout-old {
    display: none;
}

.header-menu-wrap {
    display: block;
    position: relative;
    z-index: 100001;
}

.header-menu-wrap > summary {
    list-style: none;
}

.header-menu-wrap > summary::-webkit-details-marker {
    display: none;
}

.header-menu-wrap > summary:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.header-context-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    z-index: 100003;
    min-width: 150px;
    padding: var(--space-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.header-context-menu a,
.header-context-menu button {
    display: block;
    width: 100%;
    padding: .6rem .7rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: var(--text-sm);
}

.header-context-menu a:hover,
.header-context-menu button:hover {
    background: var(--bg-tertiary);
}

.league-list-section-heading {
    padding: 0.25rem 0.75rem 0.25rem;
}

.league-list-section-heading .card-section-title {
    margin: 0;
    font-size: var(--text-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.league-cup-status {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid currentColor;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.league-cup-status--qualified {
    color: #9ee6bd;
    background: rgba(72, 187, 120, 0.1);
}

.league-cup-status--disqualified {
    color: #f39aaa;
    background: rgba(233, 0, 82, 0.1);
}

/* â”€â”€ Inputs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    min-height: 44px;
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 135, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Stacked form controls â€” never sit flush against each other */
.form-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.form-stack > .form-group {
    margin-bottom: 0;
}

/* Adjacent stacked controls (inputs / selects / textareas / full-width buttons) */
.form-group + .form-group,
.form-group + .btn,
.form-group + button.btn,
.btn.w-full + .btn,
.btn.w-full + button.btn,
.form-input.w-full + .btn,
.form-input.w-full + button.btn,
textarea.form-input + .btn,
select.form-input + .btn,
.form-input + textarea.form-input,
.form-input + select.form-input,
textarea.form-input + .form-input,
select.form-input + .form-input {
    margin-top: 3px;
}

/* Auth / card forms: ensure stacked fields & CTAs have a tiny vertical gap */
.auth-card .form-group + .btn,
.auth-card .btn.w-full + .btn,
.auth-card .auto-connect-section > .btn + .btn,
.auth-card .league-team-lookup > .btn,
.card .form-group + .btn,
.card .btn.w-full + .btn {
    margin-top: 3px;
}

/* Do not force vertical margins inside horizontal control rows / chrome */
.league-lookup-row .btn,
.bottom-nav .btn,
.chat-dialog-actions .btn,
.admin-modal-actions .btn,
.flex:not(.flex-col) > .btn + .btn,
.inline-flex > .btn + .btn {
    margin-top: 0;
}

/* â”€â”€ Tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-light);
}

.data-table tbody tr:hover td {
    background: var(--bg-card-hover);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Keep league standings full-width even when all team names are short. */
.standings-table {
    display: table;
    width: 100% !important;
    min-width: 100%;
    table-layout: fixed;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    width: auto;
    min-width: 0;
}

/* â”€â”€ Loading States â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--bg-card-hover) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* â”€â”€ Empty States â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-8);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.4;
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: var(--text-sm);
    max-width: 400px;
    margin: 0 auto;
}

/* â”€â”€ Avatar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.avatar-lg { width: 64px; height: 64px; }
.avatar-sm { width: 28px; height: 28px; }

/* â”€â”€ Dashboard â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dash-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.dash-greeting {
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: var(--leading-tight);
}

.dash-header-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-shrink: 0;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.dash-section {
    margin-bottom: var(--space-8);
}

.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.dash-section-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.dash-section-header .dash-section-title {
    margin-bottom: 0;
}

.dash-team-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.dash-team-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    gap: var(--space-4);
}

.dash-team-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
    color: inherit;
}

.dash-team-info {
    min-width: 0;
    flex: 1;
}

.dash-team-name {
    font-size: var(--text-base);
    font-weight: 700;
}

.dash-team-points {
    text-align: right;
    flex-shrink: 0;
}

.dash-team-pts-value {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--color-accent);
}

.dash-league-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.dash-league-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast);
    gap: var(--space-3);
}

.dash-league-card:hover {
    border-color: var(--color-accent);
    color: inherit;
}

.dash-league-info {
    min-width: 0;
    flex: 1;
}

.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.alert-danger {
    background: rgba(233, 0, 82, 0.1);
    border: 1px solid rgba(233, 0, 82, 0.2);
    color: var(--color-danger);
}

.alert-success {
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid rgba(0, 255, 135, 0.2);
    color: var(--color-success);
}

@media (max-width: 768px) {
    .dash-greeting {
        font-size: var(--text-xl);
    }

    .dash-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }

    .dash-team-card {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }

    .dash-team-points {
        text-align: left;
        display: flex;
        align-items: center;
        gap: var(--space-2);
        padding-top: var(--space-2);
        border-top: 1px solid var(--border-light);
    }

    .dash-team-pts-value {
        font-size: var(--text-lg);
    }

    .dash-header-actions {
        width: 100%;
    }

    .dash-header-actions .btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .dash-stats {
        grid-template-columns: 1fr;
    }
}

/* â”€â”€ Home landing â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.content-body:has(.home-landing) {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.88) 100%),
        url("/images/home-background.png") center top / cover no-repeat;
    background-attachment: local;
    padding-top: var(--space-6);
}

.home-landing {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 0 var(--space-12);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-6);
    padding: var(--space-12) var(--space-4) var(--space-8);
    margin-bottom: 0;
    min-height: calc(95vh - var(--header-height, 60px));
    justify-content: center;
    position: relative;
}

.home-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 38%;
    width: min(34rem, 95vw);
    height: min(34rem, 95vw);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 255, 135, 0.24) 0%, rgba(0, 255, 135, 0.08) 42%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: home-hero-glow 8s ease-in-out infinite alternate;
}

@keyframes home-hero-glow {
    from { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes home-card-glow {
    from { box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.35), 0 0 24px rgba(0, 255, 135, 0.12); }
    to { box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.55), 0 0 36px rgba(0, 255, 135, 0.22); }
}

@keyframes home-bubble-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.home-brand,
.home-headline,
.home-lede,
.home-cta {
    position: relative;
    z-index: 1;
}

.home-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0;
}

.home-brand-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-brand-icon-wrap::before {
    content: "";
    position: absolute;
    inset: -20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 135, 0.32) 0%, transparent 70%);
    filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

.home-brand-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -0.25rem;
}

.home-brand .brand-subtitle--hero {
    margin-top: 0.25rem;
}

.home-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 900;
    letter-spacing: 0.04em;
}

.home-brand-logo {
    width: clamp(9.5rem, 24vw, 13.5rem);
    height: auto;
    aspect-ratio: 1;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.5));
}

.home-headline {
    margin: var(--space-4) 0 var(--space-2);
    max-width: 26ch;
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.home-headline-primary {
    font-size: clamp(1.6rem, 4.2vw, 2.2rem);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.home-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-5);
    margin: var(--space-4) auto var(--space-6);
    padding: var(--space-7) 0;
    max-width: 44rem;
}

.home-intro .home-lede {
    margin: 0;
    max-width: 38rem;
    font-size: var(--text-base);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}

.home-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0.65rem 1.8rem;
    border-radius: var(--radius-full, 9999px);
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.home-cta-btn--primary {
    background: var(--color-accent);
    color: #0d1117;
    border: 1px solid transparent;
    box-shadow: 0 4px 18px rgba(0, 255, 135, 0.32);
}

.home-cta-btn--primary:hover,
.home-cta-btn--primary:focus-visible {
    background: #2aff9f;
    color: #0d1117;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 255, 135, 0.48);
}

.home-cta-btn--secondary {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.home-cta-btn--secondary:hover,
.home-cta-btn--secondary:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 255, 135, 0.45);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.home-hero-btn {
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.home-hero-btn--full {
    width: 100%;
}

.home-scroll-hint {
    margin-top: var(--space-8);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, rgba(255, 255, 255, 0.7));
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    border: none;
    background: transparent;
    animation: home-scroll-float 2.2s ease-in-out infinite;
}

@keyframes home-scroll-float {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.65;
    }
    50% {
        transform: translateY(6px);
        opacity: 1;
        color: var(--color-accent);
    }
}

.home-inline-link {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.home-inline-link:hover,
.home-inline-link:focus-visible {
    color: var(--text-primary);
}

.home-feature-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
    margin: var(--space-5) 0 var(--space-6);
}

.home-feature-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: var(--space-5);
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(14, 14, 14, 0.7) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
}



.home-feature-section:hover {
    border-color: rgba(0, 255, 135, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.home-feature-section-title {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 800;
    line-height: 1.3;
}

.home-feature-section-title a {
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s ease;
}

.home-feature-section:hover .home-feature-section-title a {
    color: var(--color-accent);
}

.home-feature-section-copy {
    margin: 0;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--text-secondary);
}

.home-section-link-row {
    margin: var(--space-4) 0 0;
    font-size: var(--text-sm);
    line-height: 1.45;
    color: var(--text-secondary);
}

.home-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-2);
}

.home-cta--section,
.home-chat-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.home-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.home-tour-cta {
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.75rem 2.2rem;
    margin: 0;
    border-radius: var(--radius-full, 9999px);
    box-shadow: 0 6px 22px rgba(0, 255, 135, 0.32);
    letter-spacing: 0.01em;
}

.home-tour-cta--guest {
    border: 1px solid rgba(0, 255, 135, 0.75);
    animation: home-tour-guest-glow 2.2s ease-in-out infinite;
}

.home-tour-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    opacity: 0.8;
    margin: -0.2rem 0;
    animation: home-tour-arrow-bounce 2.2s ease-in-out infinite;
}

@keyframes home-tour-arrow-bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.55;
    }
    50% {
        transform: translateY(3px);
        opacity: 1;
    }
}

.home-register-cta {
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.5rem 1.7rem;
    border-radius: var(--radius-full, 9999px);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--text-primary, #ffffff);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.home-register-cta:hover,
.home-register-cta:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

@keyframes home-tour-guest-glow {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.3), 0 6px 20px rgba(138, 43, 226, 0.42), 0 0 18px rgba(0, 255, 135, 0.2);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(0, 255, 135, 0.8), 0 8px 26px rgba(138, 43, 226, 0.6), 0 0 36px rgba(0, 255, 135, 0.4);
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-tour-cta--guest {
        animation: none;
        box-shadow: 0 0 0 2px rgba(0, 255, 135, 0.5), 0 4px 15px rgba(138, 43, 226, 0.4);
    }
}

/* ─── Below-fold sections ─── */
.home-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-7) 0;
    position: relative;
}



/* Section header with icon */
.home-section-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.home-section-icon {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.home-section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background: rgba(0, 255, 135, 0.12);
    border: 1px solid rgba(0, 255, 135, 0.3);
}

.home-section-label--ai {
    color: #b57bff;
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.35);
}

.home-section-label--chat {
    color: #ffaa44;
    background: rgba(255, 165, 0, 0.12);
    border-color: rgba(255, 165, 0, 0.3);
}

.home-section-title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
}

.home-section-lede {
    margin: 0;
    max-width: 38rem;
    font-size: var(--text-base);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.home-plan-note {
    margin: 0;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--text-muted, var(--text-secondary));
    opacity: 0.9;
}

.home-check-list {
    list-style: none;
    margin: var(--space-3) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.home-check-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
}

.home-check {
    flex-shrink: 0;
    width: 1.3rem;
    height: 1.3rem;
    margin-top: 0.1rem;
    border-radius: 50%;
    background: rgba(0, 255, 135, 0.14);
    border: 1.5px solid rgba(0, 255, 135, 0.5);
    position: relative;
}

.home-check::after {
    content: "";
    position: absolute;
    left: 0.34rem;
    top: 0.23rem;
    width: 0.32rem;
    height: 0.55rem;
    border: solid var(--color-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.home-check-strong {
    color: var(--color-accent);
    font-weight: 700;
}

/* ─── Bot cards ─── */
.home-bots {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.home-prompt-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(14, 14, 14, 0.85) 100%);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    transition:
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        transform var(--transition-normal);
}



.home-prompt-card:hover,
.home-prompt-card:focus-within {
    border-color: rgba(0, 255, 135, 0.35);
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.08), 0 16px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(-3px);
}

.home-prompt-card--spotlight {
    border-color: rgba(0, 255, 135, 0.2);
}



.home-prompt-card--featured {
    gap: var(--space-4);
    padding: var(--space-7);
    border-color: rgba(255, 215, 0, 0.25);
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.06) 0%, rgba(14, 14, 14, 0.88) 50%);
    animation: home-card-glow-gold 3.5s ease-in-out infinite alternate;
}

@keyframes home-card-glow-gold {
    from { box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.2), 0 0 24px rgba(255, 215, 0, 0.08); }
    to { box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.4), 0 0 36px rgba(255, 215, 0, 0.16); }
}

.home-prompt-card--featured:hover,
.home-prompt-card--featured:focus-within {
    border-color: rgba(255, 215, 0, 0.55);
    transform: translateY(-3px);
}

.home-prompt-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}

.home-prompt-card--featured .home-section-title {
    flex: 1;
    min-width: 12rem;
}

.home-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    background: rgba(0, 255, 135, 0.14);
    border: 1px solid rgba(0, 255, 135, 0.45);
    color: var(--color-accent);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-card-badge--pro {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.45);
    color: #ffd700;
}

.home-bot-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.home-bot-mention {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
}

.home-bot-name {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
}

.home-bot-pitch {
    margin: 0;
    font-size: var(--text-base);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.home-try-label {
    margin: var(--space-2) 0 0;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.home-prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.home-prompt-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 255, 135, 0.2);
    background: rgba(0, 255, 135, 0.06);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.home-prompt-chip:hover,
.home-prompt-chip:focus-visible {
    border-color: rgba(0, 255, 135, 0.55);
    background: rgba(0, 255, 135, 0.14);
    color: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 135, 0.12);
    outline: none;
}

.home-card-cta {
    margin-top: var(--space-2);
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
    padding: 0.35rem 0;
    border-bottom: 1.5px solid transparent;
    transition: border-color var(--transition-fast), color var(--transition-fast), gap var(--transition-fast);
}

.home-card-cta:hover,
.home-card-cta:focus-visible {
    color: #ffffff;
    border-bottom-color: currentColor;
    gap: 0.5rem;
    outline: none;
}

.home-featured-cta {
    margin-top: var(--space-3);
    width: fit-content;
    padding: var(--space-3) var(--space-7);
    font-size: 0.95rem;
    font-weight: 800;
    border-radius: var(--radius-full, 9999px);
}

/* ─── Chat section ─── */
.home-chat {
    gap: var(--space-5);
}

.home-chat-mock {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
    border-radius: 16px;
    border: 1px solid rgba(255, 165, 0, 0.12);
    background: linear-gradient(180deg, rgba(255, 80, 120, 0.08) 0%, rgba(14, 14, 14, 0.7) 55%);
}

.home-chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: min(92%, 28rem);
    padding: var(--space-3) var(--space-4);
    border-radius: 14px 14px 14px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: home-bubble-in 0.55s ease both;
}

.home-chat-bubble:nth-child(1) { animation-delay: 0.05s; }
.home-chat-bubble:nth-child(2) { animation-delay: 0.18s; }
.home-chat-bubble:nth-child(3) { animation-delay: 0.3s; align-self: flex-end; border-radius: 14px 14px 4px 14px; }

.home-chat-bubble--bot {
    border-color: rgba(0, 255, 135, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 135, 0.08) 0%, rgba(20, 20, 20, 0.5) 60%);
    box-shadow: 0 0 18px rgba(0, 255, 135, 0.06);
}

.home-chat-bubble-author {
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.home-chat-bubble:not(.home-chat-bubble--bot) .home-chat-bubble-author {
    color: rgba(255, 165, 0, 0.7);
}

.home-chat-bubble-text {
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--text-primary);
}

.home-chat-checks {
    margin-top: 0;
}

/* ─── "How it works" steps ─── */
.home-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.home-steps-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.8vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    color: var(--text-primary);
}

.home-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}

.home-step-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-5);
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(14, 14, 14, 0.75) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
    align-items: center;
    transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
}

.home-step-card:hover {
    border-color: rgba(0, 255, 135, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.home-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    font-size: 1.15rem;
    font-weight: 900;
    color: #0d1117;
    background: linear-gradient(135deg, var(--color-accent), rgba(0, 200, 180, 0.9));
    box-shadow: 0 4px 16px rgba(0, 255, 135, 0.3);
    flex-shrink: 0;
}

.home-step-label {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.home-step-label:hover {
    color: #ffffff;
}

.home-step-copy {
    font-size: var(--text-sm);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.68);
}

/* ─── Final CTA section ─── */
.home-close {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-5);
    padding: var(--space-10) 0;
    position: relative;
}

.home-close-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 135, 0.18) 0%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    animation: home-close-pulse 4s ease-in-out infinite alternate;
}

@keyframes home-close-pulse {
    from { opacity: 0.6; transform: translateX(-50%) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.home-close-text {
    margin: 0;
    max-width: 30rem;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.home-close-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.75rem 2.2rem;
    border-radius: var(--radius-full, 9999px);
    background: var(--color-accent);
    color: #0d1117;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 22px rgba(0, 255, 135, 0.35);
    position: relative;
    z-index: 1;
}

.home-close-link:hover {
    background: #2aff9f;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 28px rgba(0, 255, 135, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .home-hero::before,
    .home-prompt-card--featured,
    .home-chat-bubble {
        animation: none;
    }

    .home-prompt-card:hover,
    .home-prompt-card:focus-within,
    .home-prompt-chip:hover,
    .home-prompt-chip:focus-visible {
        transform: none;
    }
}

[data-theme="light"] .home-prompt-card {
    background:
        linear-gradient(165deg, rgba(55, 0, 60, 0.04), transparent 40%),
        var(--bg-card);
}

[data-theme="light"] .home-prompt-card:hover,
[data-theme="light"] .home-prompt-card:focus-within {
    background:
        linear-gradient(165deg, rgba(0, 204, 106, 0.08), transparent 45%),
        var(--bg-card-hover);
}

[data-theme="light"] .home-prompt-card--featured {
    background:
        linear-gradient(145deg, rgba(0, 204, 106, 0.12), transparent 50%),
        var(--bg-card);
    animation: none;
    box-shadow: 0 0 0 1px rgba(0, 204, 106, 0.35), 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .home-chat-mock {
    background:
        linear-gradient(180deg, rgba(55, 0, 60, 0.08), transparent 55%),
        var(--bg-secondary);
}

[data-theme="light"] .home-chat-bubble {
    background: var(--bg-card);
}

[data-theme="light"] .home-chat-bubble--bot {
    background:
        linear-gradient(135deg, rgba(0, 204, 106, 0.1), transparent 60%),
        var(--bg-card);
}

/* Home landing footer: match transparent, hairline home rhythm (not a purple card) */
.site-footer {
    margin-top: var(--space-8);
    padding: var(--space-6) 0 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

[data-theme="light"] .site-footer {
    background: transparent;
    border-color: var(--border-color);
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-5);
    margin-bottom: var(--space-3);
}

.site-footer-link {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
    color: var(--color-accent);
}

.site-footer-copy {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
    line-height: var(--leading-relaxed);
    max-width: 36rem;
    margin-inline: auto;
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: var(--space-6);
        padding-top: var(--space-5);
    }
}

.legal-page {
    max-width: 42rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.legal-updated {
    margin: calc(var(--space-2) * -1) 0 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.legal-lede {
    margin: 0;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

.legal-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.legal-section h2 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: var(--leading-snug);
}

.legal-section p,
.legal-section li {
    margin: 0;
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

.legal-section ul {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.legal-section code {
    font-size: 0.92em;
    color: var(--text-primary);
}

.legal-disclaimer {
    margin: var(--space-2) 0 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--text-muted);
}

.legal-contact {
    margin: var(--space-2) 0 0;
}

.legal-contact-email {
    display: inline-block;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-accent);
    word-break: break-all;
}

.legal-contact-email:hover {
    color: var(--color-accent-dim);
}

/* Cookie consent â€” essential-only acknowledgement */
.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    padding: var(--space-3) var(--space-4);
    padding-bottom: max(var(--space-3), env(safe-area-inset-bottom, 0px));
    background: var(--bg-secondary);
    border-top: 1px solid #2a2a2a;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.4);
}

.cookie-consent-inner {
    max-width: 52rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.cookie-consent-copy {
    min-width: 0;
    flex: 1;
}

.cookie-consent-title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
}

.cookie-consent-text {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

.cookie-consent-text a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent-btn {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-consent {
        bottom: var(--bottom-nav-offset);
        padding-bottom: var(--space-3);
    }

    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }

    .cookie-consent-btn {
        width: 100%;
    }
}

/* Legacy hero kept for any residual references */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-8);
    background: linear-gradient(170deg, var(--color-primary) 0%, var(--bg-primary) 60%);
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid rgba(0, 255, 135, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: var(--space-6);
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-6);
    line-height: 1.1;
    color: #ffffff;
}

.hero-title .gradient-text {
    color: var(--color-accent);
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin: 0 auto var(--space-10);
    line-height: var(--leading-relaxed);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-20);
    width: 100%;
    max-width: 800px;
}

.hero-feature {
    padding: var(--space-6);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: border-color var(--transition-normal), transform var(--transition-normal);
}

.hero-feature:hover {
    border-color: rgba(0, 255, 135, 0.3);
    transform: translateY(-3px);
}

.hero-feature-icon {
    color: var(--color-accent);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-feature-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: #ffffff;
}

.hero-feature-text {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
}

/* â”€â”€ Help Button & Panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.help-btn:hover {
    background: var(--color-primary);
    color: var(--color-accent);
    border-color: var(--color-primary);
}

.help-panel {
    margin-top: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.help-panel ol {
    list-style: decimal;
    padding-left: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.help-panel code {
    display: inline-block;
    margin-top: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: var(--text-xs);
    word-break: break-all;
}

.fpl-entry-help {
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.fpl-entry-help--compact {
    margin-bottom: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.fpl-entry-help-title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
}

.fpl-entry-help-lead {
    margin: 0 0 var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.fpl-entry-help-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    counter-reset: fpl-help-step;
}

.fpl-entry-help-steps > li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
    counter-increment: fpl-help-step;
}

.fpl-entry-help-steps > li::before {
    content: counter(fpl-help-step);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fpl-entry-help-step {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.fpl-entry-help-step-label {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
}

.fpl-entry-help-step-body {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.fpl-entry-help-step-body a {
    font-weight: 600;
    word-break: break-all;
}

.fpl-entry-help-example {
    display: block;
    margin-top: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
    font-size: var(--text-xs);
    color: var(--text-primary);
    word-break: break-all;
}

.fpl-entry-help-note {
    margin: var(--space-4) 0 0;
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.45;
}

.fpl-entry-help-note code {
    font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
}

.fpl-entry-help--compact .fpl-entry-help-title {
    font-size: var(--text-sm);
}

.fpl-entry-help--compact .fpl-entry-help-steps > li::before {
    width: 22px;
    height: 22px;
    font-size: 11px;
}

.fpl-entry-help--compact .fpl-entry-help-steps > li {
    grid-template-columns: 22px 1fr;
}

/* â”€â”€ Auto-Connect Section â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auto-connect-section {
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.25);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.auto-connect-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    min-width: 0;
}

.auto-connect-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.auto-connect-title {
    font-size: var(--text-base);
    font-weight: 700;
    margin: 0;
    min-width: 0;
}

.auto-connect-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent);
    flex-shrink: 0;
}

.auto-connect-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-3);
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.league-team-lookup {
    min-width: 0;
}

.league-lookup-row {
    display: flex;
    gap: var(--space-2);
    align-items: stretch;
    min-width: 0;
}

.league-lookup-row .form-input {
    flex: 1;
    min-width: 0;
}

.link-team-lookup-status {
    margin-top: var(--space-2);
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.league-lookup-row .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .league-lookup-row {
        flex-direction: column;
        gap: 3px;
    }

    .league-lookup-row .btn {
        width: 100%;
    }
}

.link-team-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0 0 var(--space-5);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.link-team-divider::before,
.link-team-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-subtle, rgba(255, 255, 255, 0.12));
}

.team-search-wrap {
    position: relative;
}

.team-search-results {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    position: absolute;
    left: 0;
    right: 0;
    z-index: var(--z-dropdown);
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-secondary, #1a1f2e);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.team-search-results li + li {
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.team-search-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.team-search-result:hover,
.team-search-result:focus-visible {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.06));
    outline: none;
}

.team-search-result-name {
    font-weight: 600;
    font-size: var(--text-sm);
}

.team-search-result-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.auto-connect-section .btn {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    height: auto;
    min-height: 44px;
    line-height: 1.35;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}

.auto-connect-section .text-xs {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.auto-connect-url-box {
    min-width: 0;
}

.auto-connect-url-box .form-input {
    font-size: var(--text-xs);
    max-width: 100%;
}

.auto-connect-url-link {
    display: block;
    max-width: 100%;
    color: var(--accent);
    font-size: var(--text-xs);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.auto-connect-waiting {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    min-width: 0;
}

.auto-connect-instructions {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    min-width: 0;
}

.auto-connect-instructions > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.auto-connect-url-example {
    display: block;
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-all;
}

.auto-connect-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.auto-connect-success {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    font-weight: 600;
    font-size: var(--text-sm);
    overflow-wrap: anywhere;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff;
    font-weight: 700;
    border: none;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-accent:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-accent:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.link-team-card {
    max-width: min(560px, 100%);
    box-sizing: border-box;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.link-team-help-banner {
    margin-top: var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
}

.link-team-help-banner summary {
    padding: var(--space-3);
    color: var(--text-primary);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    list-style-position: inside;
}

.link-team-help-content {
    padding: 0 var(--space-3) var(--space-3);
    font-size: var(--text-xs);
    line-height: 1.45;
}

.link-team-help-content p {
    margin: 0 0 var(--space-2);
}

.link-team-help-chat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    cursor: pointer;
}

.link-team-help-chat-link:hover,
.link-team-help-chat-link:focus-visible {
    text-decoration: underline;
}

.link-team-quick-connect-help .link-team-inline-help-content {
    padding-top: var(--space-2);
}

.link-team-quick-connect-help .auto-connect-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.link-team-intro {
    margin-bottom: var(--space-8);
}

.link-team-quick-connect-help .auto-connect-title {
    font-size: var(--text-sm);
}

.link-team-inline-help {
    margin: 0 0 var(--space-3);
    color: var(--text-secondary);
    font-size: var(--text-xs);
}

.link-team-quick-connect-help,
.link-team-league-help {
    margin-top: var(--space-3);
}

.link-team-inline-help summary {
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
}

.link-team-manual-option {
    order: 1;
}

.link-team-quick-connect-help {
    order: 2;
}

.link-team-id-info {
    order: 5;
}

.link-team-card > .link-team-divider {
    order: 3;
}

.link-team-card > .auth-footer {
    order: 6;
}

.link-team-secondary-option {
    order: 4;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
}

.link-team-secondary-option .form-group > .btn {
    margin-top: var(--space-3);
}

.link-team-inline-help-content {
    padding: var(--space-2) 0 0;
    line-height: 1.45;
}

.link-team-inline-help-content p {
    margin: 0 0 var(--space-2);
}

.link-team-league-results {
    margin-top: var(--space-3);
}

.link-team-results-title {
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 700;
}

.link-team-league-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.link-team-league-results li + li {
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.link-team-league-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: 100%;
    padding: var(--space-3);
    border: 0;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.link-team-league-result:hover,
.link-team-league-result:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.link-team-league-result span {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.link-team-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-5) 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.link-team-divider::before,
.link-team-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.link-team-confirm-dialog {
    max-width: 380px;
    width: 90vw;
}

.link-team-confirm-details {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    background: var(--surface-raised);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: .75rem;
}

.link-team-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
}

.link-team-confirm-label {
    color: var(--text-muted);
    font-size: .8rem;
    flex-shrink: 0;
}

.link-team-confirm-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
}

/* â”€â”€ Page Title Bar (shared across pages) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.page-title {
    font-size: var(--text-xl);
    font-weight: 800;
    line-height: var(--leading-tight);
}

.page-title-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* â”€â”€ Info Banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.info-banner {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

/* â”€â”€ League List â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.league-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.league-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    gap: var(--space-3);
}

.league-list-item:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
    color: inherit;
}

.league-list-info {
    min-width: 0;
    flex: 1;
}

.league-list-name {
    font-size: var(--text-base);
    font-weight: 700;
}

.league-list-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Modern chats inbox */
.chat-inbox {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-inbox-list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg-card) 92%, transparent);
}

.chat-inbox-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    color: inherit;
    text-decoration: none;
    border: 0;
    background: transparent;
    transition: background-color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.chat-inbox-list .chat-inbox-row + .chat-inbox-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

a.chat-inbox-row:hover {
    background: rgba(255, 255, 255, 0.035);
    color: inherit;
}

a.chat-inbox-row:active {
    background: rgba(255, 255, 255, 0.05);
}

.chat-inbox-row.is-unread .chat-inbox-title {
    color: var(--text-primary);
    font-weight: 800;
}

.chat-inbox-row.is-unread .chat-inbox-preview {
    color: color-mix(in srgb, var(--text-primary) 72%, var(--text-muted));
}

.chat-inbox-row--help {
    margin-top: 0.5rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 28%, var(--border-color));
    border-radius: 18px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 55%),
        color-mix(in srgb, var(--bg-card) 94%, transparent);
}

a.chat-inbox-row--help:hover {
    border-color: color-mix(in srgb, var(--color-accent) 45%, var(--border-color));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 14%, transparent), transparent 55%),
        color-mix(in srgb, var(--bg-card) 94%, transparent);
}

.chat-inbox-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    border-radius: 999px;
    background: var(--chat-avatar-bg, var(--color-accent));
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

.chat-inbox-avatar--help {
    background: color-mix(in srgb, var(--color-accent) 18%, var(--bg-tertiary));
    color: var(--color-accent);
    border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
}

.chat-inbox-avatar--help svg {
    width: 1.25rem;
    height: 1.25rem;
}

.chat-inbox-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.chat-inbox-topline,
.chat-inbox-bottomline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.chat-inbox-bottomline {
    align-items: center;
}

.chat-inbox-title-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.chat-inbox-kicker {
    color: var(--color-accent);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.chat-inbox-title {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.chat-inbox-time {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.chat-inbox-time.is-unread {
    color: var(--color-accent);
    font-weight: 700;
}

.chat-inbox-preview {
    margin: 0;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.chat-inbox-unread {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.chat-inbox-section {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.chat-inbox-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.15rem;
}

.chat-inbox-section-title {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chat-inbox-section-count {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.chat-inbox-empty {
    padding: 0.35rem 0 0.75rem;
}

@media (max-width: 640px) {
    .chat-inbox-row {
        padding: 0.9rem 0.85rem;
        gap: 0.75rem;
    }

    .chat-inbox-avatar {
        width: 2.55rem;
        height: 2.55rem;
        flex-basis: 2.55rem;
        font-size: 0.72rem;
    }

    .chat-inbox-title {
        font-size: 0.9rem;
    }
}

/* Modern leagues inbox */
.leagues-inbox {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.leagues-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--bg-tertiary, var(--bg-card)) 88%, var(--border-color));
    border: 1px solid var(--border-color);
}

.leagues-tab {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.35rem;
    padding: 0.4rem 0.55rem;
    border: none;
    border-radius: calc(var(--radius-lg) - 2px);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 650;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.leagues-tab.is-active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, .08));
}

.leagues-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted) 16%, transparent);
    color: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.leagues-tab.is-active .leagues-tab-count {
    background: color-mix(in srgb, var(--color-accent) 18%, transparent);
    color: var(--color-accent);
}

.leagues-inbox-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.leagues-inbox-section + .leagues-inbox-section {
    margin-top: 0.35rem;
}

.leagues-inbox-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.15rem;
}

.leagues-inbox-section-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.leagues-inbox-section-count {
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--text-muted);
}

.leagues-inbox-section--muted .leagues-inbox-row {
    opacity: 0.92;
}

.leagues-inbox-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    overflow: hidden;
}

.leagues-inbox-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.85rem;
    text-decoration: none;
    color: inherit;
    transition: background .12s ease;
}

.leagues-inbox-list .leagues-inbox-row + .leagues-inbox-row {
    border-top: 1px solid color-mix(in srgb, var(--border-color) 85%, transparent);
}

a.leagues-inbox-row:hover {
    background: color-mix(in srgb, var(--color-accent) 7%, var(--bg-card));
    color: inherit;
}

a.leagues-inbox-row:active {
    background: color-mix(in srgb, var(--color-accent) 11%, var(--bg-card));
}

.leagues-inbox-row.is-active .leagues-inbox-title {
    font-weight: 750;
}

.leagues-inbox-row--static {
    cursor: default;
}

.leagues-inbox-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 2.1rem;
    flex-shrink: 0;
    margin-left: 0.15rem;
}

.leagues-inbox-rank-num {
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.leagues-inbox-body {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.leagues-inbox-topline,
.leagues-inbox-bottomline {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
}

.leagues-inbox-title {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.leagues-inbox-meta {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leagues-inbox-meta-sep {
    margin: 0 0.15rem;
    opacity: 0.7;
}

.leagues-inbox-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.75;
}

.leagues-inbox-empty {
    margin: 0;
    padding: 1.1rem 0.85rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-align: center;
}

.leagues-inbox-row .league-cup-status {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .leagues-inbox-row {
        padding: 0.75rem 0.7rem;
        gap: 0.55rem;
    }

    .leagues-tab {
        font-size: 0.8rem;
        padding: 0.35rem 0.35rem;
    }
}

/* â”€â”€ Card Section Titles â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card-section-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.card-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.card-section-header .card-section-title {
    margin-bottom: 0;
}

.card-sub-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

/* â”€â”€ Compact Stats (inline league header stats) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.compact-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-2);
}

.compact-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.compact-stat-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compact-stat-value {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
}

/* â”€â”€ FPL Chips â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fpl-chips-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: var(--space-4);
}

.fpl-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card-hover);
    border-radius: var(--radius-md);
    padding: 6px 2px;
    text-align: center;
    min-width: 0; /* Prevents overflow in tight grids */
}

.fpl-chip.is-unavailable {
    opacity: 0.5;
}

.fpl-chip.is-selected {
    border: 1px solid var(--color-accent);
    background: rgba(0, 255, 135, 0.12);
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.18), 0 0 14px rgba(0, 255, 135, 0.14);
}

.fpl-chip-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    object-fit: contain;
}

.fpl-chip-name {
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.fpl-chip-status {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.fpl-chip.is-available .fpl-chip-status {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.fpl-chip.is-selected .fpl-chip-status {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* â”€â”€ Portal Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.portal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.portal-user-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 255, 135, 0.2);
    background: rgba(0, 255, 135, 0.04);
    margin-bottom: var(--space-6);
}

.portal-user-card--link {
    display: block;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.portal-user-card--link:hover,
.portal-user-card--link:focus-visible {
    border-color: var(--color-accent);
    background: rgba(0, 255, 135, 0.08);
    outline: none;
}

.portal-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4);
}

/* â”€â”€ Standings Rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.standings-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.fpl-updating-banner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: var(--space-4);
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.fpl-updating-dot {
    width: 0.55rem;
    height: 0.55rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--color-success);
    animation: standings-live-pulse 1.8s ease-out infinite;
}

.standings-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    display: inline-block;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 0 0 rgba(0, 255, 135, 0.55);
    animation: standings-live-pulse 1.8s ease-out infinite;
}

@keyframes standings-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 135, 0.55); }
    70% { box-shadow: 0 0 0 0.35rem rgba(0, 255, 135, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 135, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .standings-live-dot {
        animation: none;
    }
}

.h2h-fixtures-header {
    flex-wrap: wrap;
    row-gap: var(--space-2);
}

.h2h-fixtures-table {
    table-layout: fixed;
    width: 100%;
}

.h2h-fixtures-table th,
.h2h-fixtures-table td {
    min-width: 0;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
}

.h2h-fixture-team {
    min-width: 0;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.h2h-fixture-score-badge {
    display: inline-block;
    min-width: 2.8rem;
    padding: 0.25rem 0.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: #fff;
    color: #050505;
    font-weight: 700;
    white-space: nowrap;
}

.h2h-fixture-score-badge--live {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent), 0 0 0.65rem rgba(0, 255, 135, 0.25);
}

.h2h-fixture-item {
    min-width: 0;
    gap: 0.35rem;
}

.h2h-fixture-score {
    flex: 0 0 auto;
}

.h2h-fixture-pagination {
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.h2h-fixture-pagination-arrow {
    min-width: 2rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 1rem;
    line-height: 1;
}

.league-live-pill {
    margin-right: 0.6rem;
}

@media (max-width: 480px) {
    .h2h-fixtures-header > div {
        margin-left: auto;
    }

    .h2h-fixtures-table th,
    .h2h-fixtures-table td {
        padding: 0.45rem 0.3rem;
        font-size: 0.76rem;
        overflow-wrap: anywhere;
    }

    .h2h-fixtures-table th:first-child,
    .h2h-fixtures-table td:first-child,
    .h2h-fixtures-table th:nth-child(3),
    .h2h-fixtures-table td:nth-child(3) {
        width: 36% !important;
    }

    .h2h-fixtures-table th:nth-child(2),
    .h2h-fixtures-table td:nth-child(2) {
        width: 3.5rem !important;
    }

    .h2h-fixture-item {
        padding: 0.45rem !important;
    }

    .h2h-fixture-score {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
        font-size: 0.8rem !important;
    }

    .h2h-fixture-score-badge {
        min-width: 2.45rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}

.standings-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.standings-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    transition: background var(--transition-fast);
}

.standings-row:hover {
    background: var(--bg-card-hover);
}

.standings-row-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.standings-row-link:hover {
    border-color: var(--color-accent);
    color: inherit;
}

.table-row-link:hover td {
    background: var(--bg-card-hover);
}

.standings-row-me {
    border: 1px solid rgba(0, 255, 135, 0.2);
    background: rgba(0, 255, 135, 0.04);
}

tr.standings-row-me td {
    background: rgba(0, 255, 135, 0.06);
}

tr.standings-row-me td:first-child {
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

tr.standings-row-me td:last-child {
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
    padding-right: .8rem;
}

/* Keep the compact GW/TOT pair close together while allowing the team column
   to consume the remaining table width. */
.standings-classic-table th:nth-child(2),
.standings-classic-table td:nth-child(2) {
    width: auto !important;
}

.standings-classic-table th:nth-last-child(2),
.standings-classic-table td:nth-last-child(2) {
    width: 3rem !important;
    padding-left: .15rem !important;
    padding-right: .15rem !important;
}

.standings-classic-table th:last-child,
.standings-classic-table td:last-child {
    width: 3.4rem !important;
    padding-left: .15rem !important;
    padding-right: .15rem !important;
}

.standings-rank {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.standings-info {
    flex: 1;
    min-width: 0;
}

.standings-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.standings-score {
    text-align: right;
    flex-shrink: 0;
}

/* â”€â”€ Snapshot Rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.snapshot-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.snapshot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

/* â”€â”€ Team Stats Grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.pitch-financials {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    margin-top: 12px;
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    align-self: center;
}

/* â”€â”€ Pitch Formation View â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pitch-view {
    height: 600px;
    margin: 0 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(25, 243, 106, 0.48);
    border-radius: 23px;
    background: linear-gradient(90deg, transparent 49.8%, rgba(25, 243, 106, 0.11) 50%, transparent 50.2%), linear-gradient(rgba(25, 243, 106, 0.025) 1px, transparent 1px), #030604;
    background-size: auto, 100% 70px, auto;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    box-shadow: none;
}
.pitch-view::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid rgba(25, 243, 106, 0.25);
    pointer-events: none;
}

.pitch-view::after {
    content: none;
}

.circle {
    position: absolute;
    width: 140px;
    height: 140px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(25, 243, 106, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.box {
    position: absolute;
    left: 50%;
    width: 42%;
    height: 18%;
    transform: translateX(-50%);
    border: 1px solid rgba(25, 243, 106, 0.2);
    pointer-events: none;
    z-index: 1;
}

.box.top {
    top: 0;
    border-top: 0;
}

.box.bottom {
    bottom: 0;
    border-bottom: 0;
}

.pitch-view > .pitch-formation-label,
.pitch-view > .pitch-financials {
    z-index: 3;
}

.pitch-view > .pitch-financials {
    margin-top: 0;
    margin-bottom: 0;
}

.pitch-view > .pitch-formation-label {
    top: 12px;
    right: 14px;
}

.pitch-view > .pitch-row {
    z-index: 2;
}

.pitch-view > .circle,
.pitch-view > .box {
    display: block;
}

.pitch-view > .pitch-row {
    padding: 0;
}

.pitch-view > .pitch-row:first-of-type {
    margin-top: 0;
}

.pitch-view > .pitch-row:last-of-type {
    margin-bottom: 0;
}

.pitch-view .pitch-player {
    z-index: 2;
}

.pitch-view .player-points {
    z-index: 4;
}

.pitch-view .kit {
    width: 36px;
    height: 42px;
}

.pitch-view .label {
    width: 52px;
}

.pitch-view .bench {
    position: relative;
    z-index: 2;
}

.my-team-squad-card {
    padding-top: 0.55rem;
}

.my-team-squad-card .fpl-chips-container {
    gap: 3px;
    margin-bottom: 0.55rem;
}

.my-team-squad-card .fpl-chip {
    padding: 3px 1px 4px;
    border-radius: var(--radius-sm);
}

.my-team-squad-card .fpl-chip-icon {
    width: 18px;
    height: 18px;
    margin-bottom: 2px;
}

.my-team-squad-card .fpl-chip-name {
    font-size: 7.5px;
    margin-bottom: 2px;
}

.my-team-squad-card .fpl-chip-status {
    font-size: 7px;
    padding: 1px 3px;
}

.my-team-hero {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0.1rem 0.25rem;
    margin-bottom: 0.15rem;
}

.my-team-hero-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.75rem;
}

.my-team-hero-gw-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.my-team-hero-gw-select {
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
}

.my-team-hero-gw-select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 0.3rem;
}

.my-team-hero-gw-select option {
    background: var(--bg-surface, var(--bg-card));
    color: var(--text-primary);
    font-weight: 700;
}

.my-team-hero-live-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.05rem;
    padding: 0.05rem 0.35rem;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-accent) 18%, transparent);
    color: var(--color-accent);
    font-family: inherit;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

button.my-team-hero-live-pill {
    cursor: pointer;
}

button.my-team-hero-live-pill:hover,
button.my-team-hero-live-pill:focus-visible {
    background: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

button.my-team-hero-live-pill:disabled,
button.my-team-hero-live-pill.is-busy {
    cursor: wait;
    opacity: 0.7;
}

.my-team-hero-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.my-team-hero-plan {
    flex: 0 0 auto;
    min-height: 1.65rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
}

.my-team-hero-metrics {
    display: grid;
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    gap: 0.35rem 0.65rem;
    align-items: baseline;
}

.my-team-hero-metric {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.02rem;
}

.my-team-hero-metric strong {
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.my-team-hero-metric span {
    font-size: 0.58rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.my-team-hero-metric--gw-points {
    padding-right: 0.15rem;
}

.my-team-hero-metric--gw-points strong {
    font-size: 1.35rem;
    font-weight: 850;
    color: var(--color-accent);
}

.my-team-hero-metric--gw-points span {
    color: color-mix(in srgb, var(--color-accent) 70%, var(--text-muted));
}

.my-team-hero-metric--secondary strong {
    font-size: 0.82rem;
    font-weight: 700;
}

.my-team-hero-details-btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    min-height: 1.35rem;
    margin-top: 0.05rem;
    padding: 0.1rem 0.4rem;
    border: 0;
    border-radius: var(--radius-full, 999px);
    background: transparent;
    color: var(--color-accent);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.my-team-hero-details-btn svg {
    width: 0.75rem;
    height: 0.75rem;
}

.my-team-hero-details-btn:hover,
.my-team-hero-details-btn:focus-visible {
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
    outline: none;
}

#wt-my-team-analytics,
#wt-entry-analytics {
    scroll-margin-top: 4.75rem;
}

.my-team-analytics {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    scroll-margin-top: 4.5rem;
}

.my-team-analytics-head {
    padding: 0 0.15rem;
}

.my-team-analytics-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 750;
}

.my-team-analytics-sub {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ─── Gameweek Insights (single expandable list) ─── */

.gw-insights {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    scroll-margin-top: 4.5rem;
}

.gw-insights-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.05rem;
}

.gw-insights-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.gw-insights-gw {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.gw-insights-list {
    display: flex;
    flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--border-color) 85%, transparent);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--bg-card, var(--bg-surface)) 96%, transparent);
    overflow: hidden;
}

.gw-insights-item + .gw-insights-item {
    border-top: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.gw-insights-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.72rem 0.85rem;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.gw-insights-row--static {
    cursor: default;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.gw-insights-row--static:hover,
.gw-insights-row--static:focus-visible {
    background: transparent;
}

.gw-insights-meta {
    font-size: 0.86rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    white-space: nowrap;
}

.gw-insights-row:hover,
.gw-insights-row:focus-visible {
    background: color-mix(in srgb, var(--text-primary) 4%, transparent);
    outline: none;
}

.gw-insights-item.is-open > .gw-insights-row {
    background: color-mix(in srgb, var(--text-primary) 5%, transparent);
}

.gw-insights-label {
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 650;
    color: var(--text-primary);
}

.gw-insights-value {
    font-size: 0.86rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    white-space: nowrap;
}

.gw-insights-item.is-positive .gw-insights-value {
    color: var(--color-accent);
}

.gw-insights-item.is-negative .gw-insights-value,
.gw-insights-value.is-negative {
    color: #f87171;
}

.gw-insights-chevron {
    width: 0.85rem;
    height: 0.85rem;
    color: var(--text-muted);
    transition: transform .15s ease;
}

.gw-insights-item.is-open .gw-insights-chevron {
    transform: rotate(180deg);
}

.gw-insights-detail {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0 0.85rem 0.8rem;
    animation: gwInsightOpen .16s ease;
}

@keyframes gwInsightOpen {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gw-insights-detail-copy {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.gw-insights-rows {
    display: flex;
    flex-direction: column;
}

.gw-insights-detail-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0;
    border-top: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent);
    font-size: 0.8rem;
}

.gw-insights-kit {
    height: 1.35rem;
    width: auto;
    flex-shrink: 0;
}

.gw-insights-detail-name-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.45rem;
}

.gw-insights-detail-name {
    font-weight: 600;
}

.gw-insights-detail-secondary {
    font-size: 0.76rem;
    font-weight: 500;
    color: color-mix(in srgb, var(--text-muted) 92%, var(--text-primary));
}

.gw-insights-detail-name--link {
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.gw-insights-detail-name--link:hover,
.gw-insights-detail-name--link:focus-visible {
    color: var(--color-accent);
    text-decoration: underline;
    outline: none;
}

.gw-insights-detail-val {
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.gw-insights-detail-val.is-positive {
    color: var(--color-accent);
}

.gw-insights-detail-val.is-negative {
    color: #f87171;
}

.my-team-collapse {
    padding: 0;
    overflow: hidden;
}

.my-team-collapse-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    list-style: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
}

.my-team-collapse-summary::-webkit-details-marker {
    display: none;
}

.my-team-collapse-chevron {
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
    transition: transform .15s ease;
}

.my-team-collapse[open] .my-team-collapse-chevron {
    transform: rotate(180deg);
}

.my-team-collapse-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid color-mix(in srgb, var(--border-color) 85%, transparent);
}

@media (max-width: 640px) {
    .my-team-hero-metrics {
        grid-template-columns: auto repeat(3, minmax(0, 1fr));
        gap: 0.3rem 0.45rem;
    }

    .my-team-hero-metric--gw-points strong {
        font-size: 1.2rem;
    }

    .my-team-hero-gw-select {
        font-size: 0.98rem;
    }
}

.squad-header {
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: nowrap;
}
.squad-header--centered {
    justify-content: center;
}

.leagues-page-title-bar {
    margin-bottom: 0.65rem;
}

.favorites-page-title-bar {
    margin-bottom: 0.65rem;
}

.leagues-sync-control {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .25rem;
    min-width: 0;
}

.leagues-sync-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    flex: 0 0 auto;
    min-height: 2rem;
    padding: .35rem .65rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 45%, var(--border-color));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--color-accent) 8%, var(--bg-card));
    color: var(--color-accent);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.leagues-sync-btn svg {
    width: 1rem;
    height: 1rem;
}

.leagues-sync-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 14%, var(--bg-card));
}

.leagues-sync-btn:disabled {
    opacity: .6;
    cursor: wait;
}

.leagues-sync-btn.is-busy svg {
    animation: hub-refresh-spin .85s linear infinite;
}

.leagues-sync-error {
    max-width: 12rem;
    color: var(--color-danger, #ff4d6d);
    font-size: var(--text-xs);
    text-align: right;
}

.my-team-title-block {
    min-width: 0;
    flex: 1 1 auto;
}

.my-team-page-title-bar {
    margin-bottom: var(--space-4);
    flex-wrap: nowrap;
    align-items: center;
}

.my-team-manager {
    margin: 0;
    margin-top: .15rem;
}

.my-team-live-refresh {
    align-self: center;
    width: auto !important;
    max-width: 42%;
    flex: 0 0 auto;
}

.my-team-live-refresh .hub-sync-meta {
    min-width: 0;
    max-width: 9rem !important;
    overflow: hidden;
}

.my-team-live-refresh .hub-sync-time,
.my-team-live-refresh .hub-sync-hint {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-team-summary-metrics {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 2.4rem;
}

@media (max-width: 480px) {
    .my-team-page-title-bar {
        gap: .55rem;
    }

    .my-team-page-title-bar .page-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .my-team-live-refresh {
        width: auto !important;
        max-width: 48% !important;
        gap: .3rem;
    }

    .my-team-live-refresh .hub-sync-meta {
        max-width: 6.5rem !important;
    }

    .my-team-live-refresh .hub-sync-hint {
        display: none;
    }
}
.squad-header-main {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-1);
    min-width: 0;
}
.gameweek-select-label {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
}
.gw-history-select {
    min-width: 72px;
    padding: 3px 22px 3px 8px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 700;
}
.squad-current-points {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 700;
}

/* Keep older circle-based markup readable if a cached client renders it. */
.pitch-player-shirt {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #050505;
    border: 2px solid #1fdb4f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    position: relative;
    z-index: 2;
}

.pitch-player-name,
.pitch-player-team {
    position: relative;
    z-index: 2;
}

.pitch-player-shirt .pitch-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.pitch-player-shirt .pitch-badge--c {
    background: #1fdb4f;
    color: #000;
}

.pitch-player-shirt .pitch-badge--vc {
    background: #ff9900;
    color: #000;
}

.pitch-financials {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    align-self: center;
}

.circle, .box {
    display: block;
}

/* Compact glowing pitch layout used by the previous squad view. */
.pitch-view {
    height: auto;
    width: 100%;
    margin: 0;
    position: relative;
    background-color: #050505;
    background-image:
        radial-gradient(circle at top center, transparent 22px, rgba(31, 219, 79, 0.6) 23px, rgba(31, 219, 79, 0.6) 24.5px, transparent 25.5px),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        radial-gradient(circle at bottom center, transparent 22px, rgba(31, 219, 79, 0.6) 23px, rgba(31, 219, 79, 0.6) 24.5px, transparent 25.5px),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        linear-gradient(rgba(31, 219, 79, 0.6), rgba(31, 219, 79, 0.6)),
        radial-gradient(circle at top left, transparent 15px, rgba(31, 219, 79, 0.6) 16px, rgba(31, 219, 79, 0.6) 17.5px, transparent 18.5px),
        radial-gradient(circle at top right, transparent 15px, rgba(31, 219, 79, 0.6) 16px, rgba(31, 219, 79, 0.6) 17.5px, transparent 18.5px),
        radial-gradient(circle at bottom left, transparent 15px, rgba(31, 219, 79, 0.6) 16px, rgba(31, 219, 79, 0.6) 17.5px, transparent 18.5px),
        radial-gradient(circle at bottom right, transparent 15px, rgba(31, 219, 79, 0.6) 16px, rgba(31, 219, 79, 0.6) 17.5px, transparent 18.5px);
    background-size:
        52px 26px, 1.5px 65px, 1.5px 65px, 48% 1.5px, 1.5px 22px, 1.5px 22px, 20% 1.5px,
        52px 26px, 1.5px 65px, 1.5px 65px, 48% 1.5px, 1.5px 22px, 1.5px 22px, 20% 1.5px,
        18px 18px, 18px 18px, 18px 18px, 18px 18px;
    background-position:
        center 65px, 26% top, 74% top, center 65px, 40% top, 60% top, center 22px,
        center calc(100% - 65px), 26% bottom, 74% bottom, center calc(100% - 65px), 40% bottom, 60% bottom, center calc(100% - 22px),
        left top, right top, left bottom, right bottom;
    background-repeat: no-repeat;
    border: 1px solid #1fdb4f;
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-3);
    min-height: 380px;
    box-shadow: 0 0 20px rgba(31, 219, 79, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    overflow: hidden;
}

.pitch-view::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(31, 219, 79, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 15px rgba(31, 219, 79, 0.2), inset 0 0 15px rgba(31, 219, 79, 0.2);
}

.pitch-view::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(31, 219, 79, 0.6);
    pointer-events: none;
    box-shadow: 0 0 10px rgba(31, 219, 79, 0.4);
}

.pitch-view > .circle,
.pitch-view > .box {
    display: none;
}

.pitch-view > .pitch-formation-label {
    top: var(--space-2);
    right: var(--space-3);
}

.pitch-view > .pitch-row {
    padding: var(--space-2) 0;
    z-index: 1;
}

.pitch-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    position: relative;
    z-index: 2;
}

.player {
    position: relative;
    width: 52px;
    text-align: center;
    z-index: 2;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kit {
    width: 36px;
    height: 42px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 950;
    filter: drop-shadow(0 4px 5px #000);
}
.kit img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.dream-team-star {
    position: absolute;
    top: 8px;
    left: -4px;
    z-index: 5;
    display: inline-grid;
    width: 13px;
    height: 13px;
    place-items: center;
    color: #c084fc;
    font-size: 11px;
    line-height: 1;
    text-shadow: 0 0 5px rgba(192, 132, 252, 0.75);
    pointer-events: none;
}
.dream-team-star--current {
    color: var(--color-accent);
    text-shadow: 0 0 5px color-mix(in srgb, var(--color-accent) 80%, transparent);
}
.dream-team-star--both {
    color: #c084fc;
    -webkit-text-stroke: 1px var(--color-accent);
    text-shadow: 0 0 5px rgba(192, 132, 252, 0.85), 0 0 7px color-mix(in srgb, var(--color-accent) 70%, transparent);
    animation: dream-team-star-pulse 1.6s ease-in-out infinite;
}
@keyframes dream-team-star-pulse {
    0%, 100% { text-shadow: 0 0 4px rgba(192, 132, 252, 0.8), 0 0 5px color-mix(in srgb, var(--color-accent) 55%, transparent); }
    50% { text-shadow: 0 0 6px rgba(192, 132, 252, 1), 0 0 10px color-mix(in srgb, var(--color-accent) 90%, transparent); }
}

.player.high .kit {
    filter: drop-shadow(0 0 8px rgba(25, 243, 106, 0.5));
}
.player--provisional-incoming .kit,
.bench-card--provisional .bench-kit {
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.95));
}
.player--provisional-outgoing .kit {
    opacity: .65;
    filter: grayscale(.45) drop-shadow(0 0 5px rgba(250, 204, 21, 0.55));
}
.player--provisional-incoming .label,
.player--provisional-outgoing .label,
.bench-card.bench-card--provisional {
    border-color: #facc15;
}
.provisional-auto-sub-label {
    color: #9a6700;
    font-size: 5px;
    font-weight: 950;
    letter-spacing: .03em;
    line-height: 8px;
    white-space: nowrap;
}
@keyframes provisional-auto-sub-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(250, 204, 21, 0); }
    50% { box-shadow: 0 0 13px rgba(250, 204, 21, .62); }
}
.bench-card--provisional {
    animation: provisional-auto-sub-glow 1.8s ease-in-out infinite;
}
.player-points {
    position: static;
    width: 100%;
    min-width: 0;
    height: 21px;
    padding: 0 4px;
    margin: 2px -1px -2px;
    border-radius: 0 0 5px 5px;
    background: #07110a;
    border: 1.5px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 950;
    color: #fff;
    z-index: 4;
}
.player-points.player-points--live,
.player-points.player-points--finished {
    width: calc(100% + 2px);
    min-width: 0;
    height: 12px;
    padding: 0 5px;
    margin: 0 -1px;
    border: none;
    border-radius: 0 0 5px 5px;
    font-size: 8px;
    line-height: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
}
.player-points.player-points--live {
    background: linear-gradient(135deg, #58ffad 0%, #00c968 52%, #008f4d 100%);
    color: #06170d;
}
.player-points.player-points--finished {
    background: linear-gradient(135deg, #c084fc 0%, #9333ea 52%, #5b21b6 100%);
    color: #fff;
}
.planning-price-badge {
    width: 100%;
    min-width: 0;
    height: 12px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0 0 5px 5px;
    background: #f2f1f2;
    color: #26032e;
    font-size: 7px;
    line-height: 12px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}
.pitch-availability {
    position: absolute;
    left: -3px;
    top: -5px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
}
.pitch-availability .player-availability-icon,
.bench-availability .player-availability-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 3px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    background: #07110a;
}
.role {
    position: absolute;
    right: -2px;
    top: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffad00;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 950;
    z-index: 4;
}
.role.v {
    background: #666;
    color: #fff;
}
.player--triple-captain .role {
    background: #111;
    color: #fff;
    border: 1.5px solid #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
}
.player--triple-captain .kit {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
}
.player--triple-captain .kit::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 48%;
    width: 78%;
    height: 78%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 45%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    animation: triple-captain-kit-pulse 1.7s ease-in-out infinite;
}
@keyframes triple-captain-kit-pulse {
    0%, 100% {
        opacity: 0.45;
        transform: translate(-50%, -50%) scale(0.88);
        filter: blur(0.5px);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12);
        filter: blur(1px);
    }
}
.label {
    margin-top: -9px;
    background: #f2f1f2;
    color: #26032e;
    border-radius: 0 0 6px 6px;
    padding: 0 1px;
    width: 52px;
    z-index: 1;
}
.name {
    font-size: 8px;
    height: 12px;
    line-height: 12px;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fixture {
    font-size: 6px;
    font-weight: 850;
    height: 12px;
    line-height: 12px;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bench {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 17px 11px 13px;
    background: #090909;
    border: 1px solid var(--border-color);
    border-radius: 18px;
}
.bench--boost-active {
    border: 1.5px solid #39ff88;
    box-shadow: 0 0 14px rgba(57, 255, 136, 0.35);
}
.bench--boost-active .bench-title {
    color: #39ff88;
    background: #090909;
    text-shadow: 0 0 8px rgba(57, 255, 136, 0.55);
}
.bench--boost-active .bench-card {
    border-color: #39ff88;
    box-shadow: 0 0 8px rgba(57, 255, 136, 0.22);
}
.bench--boost-active .bench-card:hover,
.bench--boost-active .bench-card:focus-visible {
    border-color: #7dffb0;
    box-shadow: 0 0 12px rgba(57, 255, 136, 0.4);
}
.bench-title {
    position: absolute;
    top: -8px;
    left: 20px;
    margin: 0;
    padding: 0 8px;
    background: #090909;
    border-radius: 4px;
    color: #a400ff;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 1.4px;
    line-height: 1.2;
}
.bench-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.bench-card {
    position: relative;
    background: #111;
    border: 1px solid rgba(164, 0, 255, 0.38);
    border-radius: 11px;
    text-align: center;
    padding: 7px 2px;
    width: 100%;
    color: inherit;
    cursor: pointer;
}
.bench-availability {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
}
.bench-availability .player-availability-icon {
    width: 17px;
    height: 17px;
    padding: 3px;
}
.bench-card:hover,
.bench-card:focus-visible,
.player:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
.bench-kit {
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bench-kit img {
    height: 100%;
    object-fit: contain;
}
.bench-name {
    font-size: 9px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    margin-top: 4px;
}
.performance {
    margin: 17px 0;
}
.performance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    cursor: pointer;
}
.performance-toggle-card {
    cursor: pointer;
}
.performance-toggle-card.is-expanded {
    margin-bottom: 9px;
}
.performance-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.performance-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.performance-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.performance-title-icon {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 2px solid var(--color-accent);
    border-radius: 7px;
    color: var(--color-accent);
}
.performance-title-icon svg {
    width: 17px;
    height: 17px;
}
.performance-gameweek-select {
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 950;
    line-height: 1.2;
    cursor: pointer;
}
.performance-current-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin: 0;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(25, 243, 106, .12), 0 0 12px rgba(25, 243, 106, .8);
    animation: performance-current-pulse 1.8s ease-in-out infinite;
}
@keyframes performance-current-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .58; transform: scale(.82); }
}
.performance-gameweek-select.is-history {
    color: var(--text-primary);
}
.performance-gameweek-select.is-current {
    color: var(--text-primary);
}
.performance-gameweek-select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 5px;
}
.performance-gameweek-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 700;
}
.performance-gameweek-select option.performance-current-option {
    color: var(--color-accent);
}
.performance-caption {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 1px;
    text-align: left;
}
.performance-toggle {
    min-height: 30px;
    flex: 0 0 auto;
    padding: 0 10px;
    border: 1px solid rgba(25, 243, 106, 0.45);
    border-radius: 999px;
    background: rgba(25, 243, 106, 0.08);
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
}
.performance-toggle:hover,
.performance-toggle:focus-visible {
    background: rgba(25, 243, 106, 0.18);
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
.performance-toggle-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}
.performance-toggle-card.is-expanded .performance-toggle-icon {
    transform: rotate(180deg);
}
.performance-title {
    font-size: 16px;
    font-weight: 950;
}
.collapse-icon {
    color: var(--color-accent);
    font-size: 20px;
    transition: transform 0.2s ease;
}
.collapse-icon.open {
    transform: rotate(180deg);
}

.performance-summary {
    background: linear-gradient(145deg, #07150c, #0b0d0c);
    border: 1px solid rgba(25, 243, 106, 0.35);
    border-radius: 18px;
    padding: 12px 16px 7px;
    margin-bottom: 8px;
}
.performance-toggle-card .perf-top {
    margin-top: 14px;
}
.perf-top {
    display: flex;
    justify-content: space-between;
    align-items: end;
}
.perf-score {
    font-size: 28px;
    font-weight: 950;
    color: var(--color-accent);
}
.perf-score small {
    display: block;
    color: var(--text-muted);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.perf-delta {
    text-align: right;
}
.perf-delta b {
    color: var(--color-accent);
    font-size: 18px;
}
.perf-delta span {
    display: block;
    color: var(--text-muted);
    font-size: 8px;
}
.perf-rank {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #1c261f;
    margin-top: 10px;
    padding-top: 9px;
    color: var(--text-muted);
    font-size: 10px;
}
.perf-rank b {
    color: #fff;
}
.performance-summary-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 10px !important;
}
.performance-summary-metrics > div {
    min-width: 0;
    min-height: 52px;
    padding: 0 6px;
    border-left: 1px solid rgba(255, 255, 255, .15);
    text-align: center;
}
.performance-summary-metrics > div:first-child {
    border-left: 0;
}
.performance-summary-metrics .perf-delta {
    flex: 1;
    text-align: center;
}
.performance-metric--gw-points b {
    font-size: 26px;
    font-weight: 950;
}
.performance-summary-metrics .perf-score {
    line-height: 1;
}
.performance-summary.is-live .performance-metric--overall b {
    color: var(--text-primary);
}
.performance-summary.is-live .performance-metric--overall span {
    color: var(--text-muted);
}
.performance-summary.is-live .performance-metric--gw b,
.performance-summary.is-live .performance-metric--gw .perf-score {
    color: var(--color-accent);
}
.performance-expanded-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid #1c261f;
    color: var(--text-muted);
    font-size: 11px;
}
.performance-expanded-meta b {
    color: var(--color-accent);
}
.performance-more-stats {
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.performance-more-stats-title {
    margin-bottom: 3px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 900;
}
.performance-more-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
}
.performance-more-stats-grid > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.performance-more-stats-grid span {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.performance-more-stats-grid strong {
    flex: 0 0 auto;
    color: var(--color-accent);
    font-size: 14px;
}
.performance-story-card {
    margin-top: 9px;
    padding: 13px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(0, 0, 0, .18);
}
.performance-details-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 2px;
    padding: 1px 0 0;
    border: 0;
    background: transparent;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}
.performance-details-toggle .performance-toggle-icon {
    transform: rotate(0deg);
}
.performance-toggle-card.is-expanded .performance-details-toggle .performance-toggle-icon {
    transform: rotate(180deg);
}
.performance-xp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 8px;
}
.performance-xp-card {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-card);
    margin-bottom: 7px;
}
.performance-xp-card--down {
    border-color: var(--border-color);
}
.performance-xp-card--up {
    border-color: var(--border-color);
}
.performance-xp-label {
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.performance-xp-card--down .performance-xp-label {
    color: #f87171;
}
.performance-xp-card--up .performance-xp-label {
    color: var(--color-accent);
}
.performance-xp-card strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.performance-xp-card > span:last-child {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 520px) {
    .performance-summary {
        border-radius: 16px;
        padding: 10px 9px 6px;
    }
    .performance-heading {
        gap: 8px;
    }
    .performance-title-icon {
        width: 26px;
        height: 26px;
        border-radius: 6px;
    }
    .performance-title-icon svg {
        width: 16px;
        height: 16px;
    }
    .performance-gameweek-select {
        font-size: 14px;
    }
    .performance-summary-metrics {
        margin-top: 8px !important;
    }
    .perf-score {
        font-size: 20px;
    }
    .performance-summary-metrics > div {
        min-height: 46px;
        padding: 0 4px;
    }
    .performance-summary-metrics .perf-delta b {
        font-size: 14px;
    }
    .performance-metric--gw-points b {
        font-size: 20px;
    }
    .performance-summary-metrics .perf-delta span,
    .performance-summary-metrics .perf-score small {
        font-size: 7px;
    }
    .performance-xp-grid {
        grid-template-columns: 1fr;
    }
    .performance-more-stats-grid {
        gap: 0 12px;
    }
    .performance-more-stats-grid span {
        font-size: 10px;
    }
    .performance-more-stats-grid strong {
        font-size: 12px;
    }
}

.story {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 7px;
}
.story-head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.story-icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #172019;
    display: flex;
    align-items: center;
    justify-content: center;
}
.story-title {
    font-size: 12px;
    font-weight: 950;
    color: #fff;
}
.story-sub {
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 1px;
}
.story-value {
    margin-left: auto;
    color: var(--color-accent);
    font-weight: 950;
    font-size: 17px;
}
.story-content {
    margin-top: 9px;
}
.mini-row {
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--bg-surface, var(--bg-card)) 70%, var(--border-color) 30%);
    border-radius: 9px;
    padding: 7px 8px;
    margin-top: 5px;
    font-size: 10px;
}
.mini-row .row-name {
    flex: 1;
    font-weight: 800;
}
.mini-row b {
    color: var(--color-accent);
}
.mini-kit {
    height: 28px;
    margin-right: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-kit img {
    height: 100%;
    object-fit: contain;
}

/* â”€â”€ Gameweek Analytics (league portal) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.gw-analytics .card-section-header {
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.gw-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.gw-collapse-toggle > span:first-child {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.gw-collapse-toggle small {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 500;
}

.gw-collapse-toggle:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-accent) 60%, transparent);
    outline-offset: 0.35rem;
    border-radius: var(--radius-sm);
}

.gw-collapse-chevron {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s ease, stroke 0.18s ease;
}

.gw-collapse-toggle:hover .gw-collapse-chevron,
.gw-collapse-toggle:focus-visible .gw-collapse-chevron {
    stroke: var(--color-accent);
}

.gw-collapse-chevron.is-expanded {
    transform: rotate(180deg);
}

.gw-analytics-avg strong {
    color: var(--text-primary);
    font-weight: 700;
}

.gw-average-comparison-card {
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
}

.gw-average-comparison-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    width: 100%;
}

.gw-average-comparison-values > div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.gw-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: var(--space-2);
}

.gw-analytics-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    text-align: left;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
    color: inherit;
    cursor: default;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.gw-analytics-tile--up {
    border-left: 3px solid color-mix(in srgb, var(--color-accent) 55%, var(--border-color));
}

.gw-analytics-tile--wide {
    grid-column: span 2;
}


.gw-analytics-tile--down {
    border-left: 3px solid color-mix(in srgb, #f87171 50%, var(--border-color));
}

.gw-analytics-tile.is-interactive {
    cursor: pointer;
}

.gw-analytics-tile.is-interactive:hover,
.gw-analytics-tile.is-interactive:focus-visible {
    border-color: color-mix(in srgb, var(--color-accent) 40%, var(--border-color));
    background: color-mix(in srgb, var(--color-accent) 6%, var(--bg-card));
    transform: translateY(-1px);
    outline: none;
}

.gw-analytics-label {
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.gw-analytics-label--compact {
    font-size: 0.58rem;
    letter-spacing: 0.035em;
}

.gw-analytics-primary {
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.gw-analytics-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.35;
}

.h2h-analytics-grid .gw-analytics-tile {
    min-height: 7rem;
}

@media (max-width: 640px) {
    .gw-average-comparison-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .gw-average-comparison-card .gw-analytics-primary {
        font-size: 0.9rem;
    }

    .gw-average-comparison-card .gw-analytics-sub {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Insight cards use the side labels as their title; keep explanations quiet at the bottom. */
.league-v3-analytics-view .league-v3-a-eyebrow {
    display: none !important;
}

.league-v3-analytics-view .league-v3-carousel-intro h2 {
    margin: 0;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.1;
    text-transform: none;
}

.league-v3-analytics-view .league-v3-vs-card::after {
    display: block;
    margin-top: .55rem;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .64rem;
    line-height: 1.25;
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(1)::after {
    content: "Highest and lowest Gameweek scores in the league.";
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(2)::after {
    content: "Biggest rank movers in this Gameweek.";
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(3)::after {
    content: "Best captain return compared with the biggest miss.";
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(4)::after {
    content: "A perfect starting XI compared with points left on the bench.";
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(5)::after {
    content: "Highest and lowest player scores among league squads.";
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(6)::after {
    content: "Best low-owned return compared with transfer-hit risk.";
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(7)::after {
    content: "Ownership and transfer trends inside this league.";
}

.league-v3-analytics-view [aria-label="Head-to-head analytics carousel"] .league-v3-vs-card:nth-child(1)::after {
    content: "Teams with the strongest unbeaten and winning records.";
}

.league-v3-analytics-view [aria-label="Head-to-head analytics carousel"] .league-v3-vs-card:nth-child(2)::after {
    content: "Teams with the most losses and drawn matchups.";
}

.league-v3-analytics-view [aria-label="Head-to-head analytics carousel"] .league-v3-vs-card:nth-child(3)::after {
    content: "The largest score gap from a completed matchup.";
}

/* Final League polish: compact insight spacing, themed honours and readable standings. */
.league-v3-vs-card {
    min-height: 9.25rem;
}

.league-v3-vs-side b {
    margin-top: .25rem;
    padding-top: 0;
}

.league-v3-vs-side small {
    line-height: 1.2;
}

.league-v3-honour-strip--standalone {
    gap: .65rem;
    margin-bottom: 1rem;
}

.league-v3-honour-strip--standalone .league-v3-honour-card {
    min-height: 4.7rem;
    padding: .75rem .9rem;
    border: 1px solid var(--league-line) !important;
    border-left: 3px solid var(--color-accent) !important;
    border-radius: 1.05rem;
    background: linear-gradient(135deg, rgba(0, 255, 135, .09), var(--league-panel) 62%) !important;
    box-shadow: none;
}

.league-v3-honour-strip--standalone .league-v3-honour-card--purple {
    border-left-color: var(--color-primary-light) !important;
    background: linear-gradient(135deg, rgba(139, 107, 240, .1), var(--league-panel) 62%) !important;
}

.league-v3-honour-strip--standalone .league-v3-honour-icon {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border-radius: .8rem;
    background: rgba(0, 255, 135, .1);
    color: var(--color-accent);
}

.league-v3-honour-strip--standalone .league-v3-honour-card--purple .league-v3-honour-icon {
    background: rgba(139, 107, 240, .14);
    color: var(--color-primary-light);
}

.league-v3-honour-strip--standalone .league-v3-honour-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.league-v3-honour-strip--standalone .league-v3-honour-label {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.league-v3-honour-strip--standalone .league-v3-honour-card strong {
    margin-top: .12rem;
    font-size: .98rem;
    line-height: 1.1;
}

.league-v3-honour-strip--standalone .league-v3-honour-card small {
    margin-top: .12rem;
    font-size: .72rem;
    line-height: 1.15;
}

.league-v3-standings-view > .card {
    overflow: hidden;
    border-radius: 1.25rem !important;
    background: linear-gradient(160deg, var(--league-panel), var(--bg-primary)) !important;
    box-shadow: none;
}

.league-v3-standings-view .card-section-header {
    padding: .95rem .5rem .7rem;
}

.league-v3-standings-view .table-responsive {
    border-top-color: var(--league-line);
}

.league-v3-standings-view .standings-table {
    border-collapse: separate;
    border-spacing: 0;
}

.league-v3-standings-view .standings-table thead th {
    padding: .55rem .5rem !important;
    border-bottom: 1px solid var(--league-line);
    font-size: .64rem !important;
    font-weight: 700;
    letter-spacing: .09em;
}

.league-v3-standings-view .standings-classic-table .standings-score-column.is-primary {
    color: var(--color-accent) !important;
    font-weight: 800 !important;
}

.league-v3-standings-view .standings-classic-table tbody td.standings-score-column.is-primary {
    font-size: .76rem !important;
}

.league-v3-standings-view .standings-table tbody td {
    padding: .58rem .5rem !important;
    border-bottom: 1px solid color-mix(in srgb, var(--league-line) 72%, transparent);
    vertical-align: middle;
}

.league-v3-standings-view .standings-table tbody tr:last-child td {
    border-bottom: 0;
}

.league-v3-standings-view .standings-table th:first-child,
.league-v3-standings-view .standings-table td:first-child {
    width: 3.35rem !important;
}

.league-v3-standings-view .standings-classic-table th:nth-child(3),
.league-v3-standings-view .standings-classic-table td:nth-child(3),
.league-v3-standings-view .standings-classic-table th:nth-child(4),
.league-v3-standings-view .standings-classic-table td:nth-child(4) {
    width: 4.1rem !important;
}

.league-v3-standings-view .standings-h2h-table th:nth-child(3),
.league-v3-standings-view .standings-h2h-table td:nth-child(3) {
    width: 2.65rem !important;
}

.league-v3-standings-view .standings-h2h-table th:last-child,
.league-v3-standings-view .standings-h2h-table td:last-child {
    width: 4.25rem !important;
}

.league-v3-standings-view .standings-table tbody td:nth-child(2) .font-bold {
    display: block;
    overflow: hidden;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .76rem !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.league-v3-standings-view .standings-table tbody td:nth-child(2) .text-muted {
    display: block;
    margin-top: .12rem;
    overflow: hidden;
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: .62rem !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.league-v3-standings-view .standings-table tbody td:nth-child(n+3) {
    color: var(--league-text) !important;
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .72rem !important;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me {
    background: linear-gradient(90deg, rgba(0, 255, 135, .16), rgba(0, 255, 135, .05)) !important;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me td {
    border-top: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    background: transparent !important;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me td:first-child {
    border-left: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    border-top-left-radius: 1.1rem;
    border-bottom-left-radius: 1.1rem;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me td:last-child {
    border-right: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    border-top-right-radius: 1.1rem;
    border-bottom-right-radius: 1.1rem;
}

/* Compact league-table movement indicator: the arrow and places moved stay
   together without changing the position column width. */
.league-v3-standings-view .standings-table th:first-child,
.league-v3-standings-view .standings-table td:first-child {
    width: 3.8rem !important;
}

.standings-position-cell {
    width: 3.8rem !important;
    padding: .35rem .2rem !important;
    vertical-align: middle;
}

.standings-position-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    min-width: 2.8rem;
    line-height: 1;
}

.standings-position-stack--flat {
    flex-direction: column;
    gap: .12rem;
}

.standings-movement {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-width: 2.3rem;
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.standings-movement-icon {
    width: 0.72rem;
    height: 0.72rem;
    flex-shrink: 0;
    display: block;
    fill: currentColor;
}

.standings-movement--up {
    color: var(--color-success);
}

.standings-movement--down {
    color: var(--color-danger);
}

.standings-movement--flat {
    min-width: auto;
    color: var(--color-muted);
    font-size: .86rem;
}

.standings-movement--icon-only {
    min-width: 0.72rem;
}

.standings-rank {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: inline-block;
    flex-shrink: 0;
    min-width: 1.1rem;
    color: var(--league-text, var(--color-text));
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .86rem;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 640px) {
    .league-v3-vs-card {
        min-height: 8.75rem; /* legacy compact card sizing */
    }

    .league-v3-honour-strip--standalone {
        gap: .5rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-card {
        min-height: 4.35rem;
        padding: .65rem .75rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-icon {
        width: 2.15rem;
        height: 2.15rem;
        flex-basis: 2.15rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-card strong {
        font-size: .9rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-card small {
        font-size: .68rem;
    }

    .league-v3-standings-view .standings-table th:first-child,
    .league-v3-standings-view .standings-table td:first-child {
        width: 3.05rem !important;
    }

    .league-v3-standings-view .standings-classic-table th:nth-child(3),
    .league-v3-standings-view .standings-classic-table td:nth-child(3),
    .league-v3-standings-view .standings-classic-table th:nth-child(4),
    .league-v3-standings-view .standings-classic-table td:nth-child(4) {
        width: 3.65rem !important;
    }
}


/* League honours final pass: keep the cards compact and give standalone
   monthly modals their own theme variables (they render outside the
   analytics section, so they cannot inherit its league tokens). */
.league-v3-analytics-view > .league-v3-manager-month-card {
    box-sizing: border-box;
    width: auto;
    min-height: 4.6rem;
    margin: 0 1.125rem .55rem;
    padding: .72rem .9rem;
    border: 1px solid color-mix(in srgb, var(--color-primary-light) 42%, var(--border-color)) !important;
    border-left: 3px solid var(--color-primary-light) !important;
    border-radius: 18px;
    background: var(--league-panel, var(--bg-card)) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-manager-month-icon {
    width: 2.2rem;
    height: 2.2rem;
    flex-basis: 2.2rem;
}

.league-v3-manager-month-copy {
    gap: .08rem;
}

.league-v3-manager-month-copy strong {
    font-size: .96rem;
}

.league-v3-manager-month-copy small {
    font-size: .7rem;
}

.league-v3-analytics-view > .league-v3-records {
    margin: 0 1.125rem .6rem !important;
    border-radius: 18px;
    background: var(--league-panel, var(--bg-card)) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-analytics-view > .league-v3-pinned--comparison {
    margin: 0 1.125rem .6rem !important;
    padding: .72rem .9rem !important;
    background: var(--league-panel, var(--bg-card)) !important;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-analytics-view > .league-v3-pinned--comparison .league-v3-pinned-note {
    margin-top: .55rem;
    padding-top: .55rem;
}

.league-v3-analytics-insights {
    margin-top: 0;
}

.league-month-modal-backdrop {
    --league-panel: var(--bg-card, #171717);
    --league-panel-2: var(--bg-secondary, #202020);
    --league-line: var(--border-color, #343434);
    --league-text: var(--text-primary, #f4f4f4);
    --league-muted: var(--text-secondary, #a2a2a2);
    position: fixed !important;
    z-index: 2140 !important;
    inset: 0 !important;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 7, 5, .82) !important;
    backdrop-filter: blur(5px);
}

.league-month-modal {
    display: block !important;
    box-sizing: border-box;
    width: min(100%, 31rem) !important;
    max-height: min(80vh, 36rem);
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--league-line) !important;
    border-radius: 18px;
    background: var(--league-panel) !important;
    color: var(--league-text) !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .62), 0 0 0 1px rgba(0, 255, 135, .05);
}

.league-month-modal--top-three {
    width: min(100%, 25rem) !important;
}

.league-month-modal h2,
.league-month-modal-subtitle,
.league-month-modal-close,
.league-month-list-item,
.league-month-top-three-row {
    position: relative;
    z-index: 1;
}

.league-month-modal h2 {
    color: var(--league-text) !important;
}

.league-month-modal-subtitle {
    margin: .55rem 0 .75rem;
    color: var(--league-muted) !important;
}

.league-month-list,
.league-month-top-three {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: .5rem;
}

.league-month-list-item,
.league-month-top-three-row {
    box-sizing: border-box;
    min-height: 3.25rem;
    padding: .65rem .75rem;
    border: 1px solid var(--league-line) !important;
    border-radius: 13px;
    background: var(--league-panel-2) !important;
    color: var(--league-text) !important;
}

.league-month-list-item.is-current {
    border-color: color-mix(in srgb, var(--color-primary-light) 65%, var(--league-line)) !important;
    background: linear-gradient(90deg, rgba(139, 107, 240, .18), var(--league-panel-2)) !important;
}

.league-month-list-copy strong,
.league-month-manager-copy strong {
    color: var(--league-text) !important;
}

.league-month-list-copy small,
.league-month-manager-copy small {
    color: var(--league-muted) !important;
}

@media (max-width: 640px) {
    .league-v3-analytics-view > .league-v3-manager-month-card,
    .league-v3-analytics-view > .league-v3-records,
    .league-v3-analytics-view > .league-v3-pinned--comparison {
        margin-right: 16px !important;
        margin-left: 16px !important;
    }

    .league-month-modal-backdrop {
        align-items: flex-end;
        padding: .65rem;
    }

    .league-month-modal {
        width: 100% !important;
        max-height: 82vh;
        border-radius: 18px 18px 12px 12px;
    }
}

.league-v3-analytics-view {
    display: flex;
    flex-direction: column;
}

.league-v3-manager-month-card {
    display: flex;
    width: calc(100% - 2rem);
    align-items: center;
    gap: .8rem;
    margin: 0 1rem .9rem;
    padding: .8rem .9rem;
    border: 1px solid color-mix(in srgb, var(--color-primary-light) 42%, var(--league-line));
    border-left: 3px solid var(--color-primary-light);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(139, 107, 240, .12), var(--league-panel) 65%);
    color: var(--league-text);
    text-align: left;
    order: 1;
}

.league-v3-manager-month-card:hover,
.league-v3-manager-month-card:focus-visible {
    border-color: var(--color-primary-light);
    outline: none;
    box-shadow: 0 8px 24px rgba(139, 107, 240, .12);
}

.league-v3-manager-month-icon {
    display: flex;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    align-items: center;
    justify-content: center;
    border-radius: .75rem;
    background: rgba(139, 107, 240, .15);
    color: var(--color-primary-light);
}

.league-v3-manager-month-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.league-v3-manager-month-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .12rem;
}

.league-v3-manager-month-label {
    overflow: hidden;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.league-v3-manager-month-copy strong {
    overflow: hidden;
    color: var(--league-text);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 1rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-manager-month-copy small {
    overflow: hidden;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-manager-month-action {
    flex: 0 0 auto;
    color: var(--color-primary-light);
    font-family: 'Inter', var(--font-sans);
    font-size: .72rem;
    font-weight: 700;
}

.league-v3-analytics-view > .league-v3-pinned {
    order: 3;
}

.league-v3-analytics-view > .league-v3-records {
    order: 2;
}

.league-v3-analytics-insights {
    order: 4;
}

.league-month-modal-backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, .72);
}

.league-month-modal {
    width: min(100%, 31rem);
    max-height: min(80vh, 36rem);
    overflow: auto;
    padding: 1.15rem;
    border: 1px solid var(--league-line);
    border-radius: 1.2rem;
    background: var(--league-panel);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .45);
}

.league-month-modal--top-three {
    width: min(100%, 25rem);
}

.league-month-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.league-month-modal-eyebrow {
    color: var(--color-primary-light);
    font-family: 'Inter', var(--font-sans);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.league-month-modal h2 {
    margin: .2rem 0 0;
    color: var(--league-text);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 1.35rem;
}

.league-month-modal-close {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border: 1px solid var(--league-line);
    border-radius: 50%;
    background: transparent;
    color: var(--league-muted);
    font-size: 1.25rem;
    line-height: 1;
}

.league-month-modal-close:hover,
.league-month-modal-close:focus-visible {
    border-color: var(--color-primary-light);
    color: var(--league-text);
    outline: none;
}

.league-month-modal-subtitle {
    margin: .8rem 0 1rem;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .8rem;
}

.league-month-list,
.league-month-top-three {
    display: grid;
    gap: .55rem;
}

.league-month-list-item,
.league-month-top-three-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .75rem;
    padding: .72rem .8rem;
    border: 1px solid var(--league-line);
    border-radius: .85rem;
    background: var(--league-panel-2);
    color: var(--league-text);
    text-align: left;
    text-decoration: none;
}

.league-month-list-item:hover,
.league-month-list-item:focus-visible,
.league-month-top-three-row:hover,
.league-month-top-three-row:focus-visible {
    border-color: var(--color-primary-light);
    outline: none;
}

.league-month-list-item.is-current {
    border-color: color-mix(in srgb, var(--color-primary-light) 65%, var(--league-line));
    background: linear-gradient(90deg, rgba(139, 107, 240, .16), var(--league-panel-2));
}

.league-month-list-copy,
.league-month-manager-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .12rem;
}

.league-month-list-copy strong,
.league-month-manager-copy strong {
    overflow: hidden;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-month-list-copy small,
.league-month-manager-copy small {
    overflow: hidden;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-month-list-arrow {
    color: var(--color-primary-light);
    font-size: 1rem;
}

.league-month-top-three-row {
    gap: .65rem;
}

.league-month-rank {
    width: 1.5rem;
    flex: 0 0 1.5rem;
    color: var(--color-primary-light);
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.league-month-top-three-row > b {
    flex: 0 0 auto;
    color: var(--color-primary-light);
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .95rem;
}

.league-month-top-three-row > b small {
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .68rem;
    font-weight: 500;
}

@media (max-width: 640px) {
    .league-v3-manager-month-card {
        width: calc(100% - 1.5rem);
        margin-right: .75rem;
        margin-left: .75rem;
        padding: .7rem .75rem;
    }

    .league-v3-manager-month-action {
        font-size: .66rem;
    }
}

/* Shared reference tokens for every League v3 card. */
.league-v3-tabs,
.league-v3-analytics-view,
.league-v3-standings-view,
.league-v3-user-card {
    --league-panel: var(--bg-card);
    --league-panel-2: var(--bg-secondary);
    --league-line: var(--border-color);
    --league-text: var(--text-primary);
    --league-muted: var(--text-secondary);
    --league-faint: var(--text-muted);
    font-family: 'Inter', var(--font-sans);
}

.league-v3-tab,
.league-v3-user-card,
.league-v3-pinned--comparison,
.league-v3-vs-card,
.league-v3-honour-card,
.league-v3-records,
.league-v3-standings-view > .card {
    border-color: var(--league-line, var(--border-color));
    background-color: var(--league-panel, var(--bg-card));
    color: var(--league-text, var(--text-primary));
}

.league-v3-user-card {
    border: 1px solid color-mix(in srgb, var(--color-accent) 42%, var(--league-line));
    background: linear-gradient(140deg, rgba(0, 255, 135, .14), var(--league-panel) 72%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-tab {
    border: 0;
    font-family: 'Space Grotesk', var(--font-sans);
}

.league-v3-tab:not(.is-active) {
    color: var(--league-muted);
}

.league-v3-tab.is-active {
    color: var(--text-inverse, #04140d);
    background: var(--color-accent);
}

.league-v3-pinned--comparison {
    border: 1px solid color-mix(in srgb, var(--color-accent) 58%, var(--league-line));
    background: linear-gradient(140deg, rgba(0, 255, 135, .14), var(--league-panel) 72%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-pinned-card,
.league-v3-pinned-row .league-v3-pinned-card {
    color: var(--league-text);
}

.league-v3-pinned-label,
.league-v3-stat-tag,
.league-v3-a-eyebrow,
.league-v3-honour-label,
.league-v3-records-section-head h3 {
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
}

.league-v3-pinned-card strong,
.league-v3-vs-card strong,
.league-v3-honour-card strong,
.league-v3-records-heading strong,
.league-v3-carousel-intro h2,
.league-v3-records-section-head h3 {
    color: var(--league-text);
    font-family: 'Space Grotesk', var(--font-sans);
}

.league-v3-pinned-card strong {
    font-size: clamp(1.8rem, 5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -.035em;
}

.league-v3-pinned-card--accent strong,
.league-v3-vs-side b.is-positive,
.league-v3-record-row > b.is-positive,
.league-v3-pinned-note,
.league-v3-honour-icon,
.league-v3-records-icon {
    color: var(--color-accent);
}

.league-v3-pinned-note,
.league-v3-vs-side small,
.league-v3-honour-card small,
.league-v3-record-info small,
.league-v3-records-heading small {
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
}

.league-v3-pinned-note {
    color: var(--color-accent);
}

.league-v3-pinned-divider,
.league-v3-vs-divider,
.league-v3-vs-divider span {
    background-color: var(--league-line);
    border-color: var(--league-line);
}

.league-v3-vs-card {
    border: 1px solid var(--league-line);
    border-radius: 20px;
    background: var(--league-panel);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-vs-card:hover {
    border-color: color-mix(in srgb, var(--color-accent) 44%, var(--league-line));
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.league-v3-vs-side strong {
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 1.15rem;
    line-height: 1.22;
}

.league-v3-vs-side b,
.league-v3-record-row > b {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 600;
}

.league-v3-vs-side b.is-negative,
.league-v3-record-row > b.is-negative,
.league-v3-stat-tag.is-negative {
    color: var(--color-danger);
}

.league-v3-honour-card {
    border: 1px solid var(--league-line);
    border-left: 3px solid var(--color-accent);
    border-radius: 16px;
    background: var(--league-panel);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-honour-card--purple {
    border-left-color: var(--color-primary-light);
}

.league-v3-honour-card strong {
    font-size: 1.05rem;
}

.league-v3-records {
    border: 1px solid var(--league-line);
    border-radius: 18px;
    background: var(--league-panel);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-records-heading strong {
    font-size: 1.45rem;
}

.league-v3-record-switch,
.league-v3-record-row {
    border-color: var(--league-line);
    background: var(--league-panel-2);
}

.league-v3-record-row {
    border: 0;
}

.league-v3-record-info strong {
    color: var(--league-text);
    font-family: 'Space Grotesk', var(--font-sans);
}

.league-v3-standings-view .standings-table thead th {
    color: var(--league-faint);
    font-family: 'Inter', var(--font-sans);
}

.league-v3-standings-view .standings-table tbody td,
.league-v3-standings-view .standings-table tbody td .font-bold {
    color: var(--league-text);
}

.league-v3-standings-view .standings-table tbody td .text-muted {
    color: var(--league-muted);
}

/* League reference screen: compact live team banner, standings frame and records accordion. */
.league-v3-user-card {
    margin: .25rem 1.125rem 1rem;
    padding: .95rem 1.1rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 44%, var(--color-border));
    border-radius: 1rem;
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-accent) 15%, transparent), var(--bg-surface) 72%);
}

.league-v3-user-card .league-live-pill {
    margin-right: .2rem;
}

.league-v3-standings-view > .card {
    padding: 0;
    overflow: hidden;
    border-radius: 1.05rem;
    background: var(--bg-surface);
}

.league-v3-standings-view .card-section-header {
    align-items: center;
    padding: 1rem .5rem .7rem;
}

.league-v3-standings-view .standings-heading {
    gap: .45rem;
    font-size: 1.05rem;
}

.league-v3-standings-view .standings-live-dot {
    order: -1;
    width: .45rem;
    height: .45rem;
}

.league-v3-standings-view .standings-view-toggle {
    padding: .2rem;
    border-radius: 999px;
    background: var(--bg-surface-alt, var(--bg-surface));
}

.league-v3-standings-view .standings-view-toggle__button {
    min-height: 1.85rem;
    padding: .28rem .85rem;
    border-radius: 999px;
    font-size: .72rem;
}

.league-v3-standings-view .standings-view-toggle__button.is-active {
    color: var(--bg-base, #04140d);
    background: var(--color-accent);
}

.league-v3-standings-view .table-responsive {
    margin: 0;
    border-top: 1px solid var(--color-border);
}

.league-v3-standings-view .standings-table thead th {
    padding-top: .65rem;
    padding-bottom: .65rem;
    color: var(--color-muted);
    font-size: .66rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.league-v3-standings-view .standings-table tbody td {
    padding-top: .72rem;
    padding-bottom: .72rem;
}

.league-v3-standings-view .standings-row-me td {
    border-top-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
    border-bottom-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
    background: linear-gradient(90deg, color-mix(in srgb, var(--color-accent) 14%, transparent), color-mix(in srgb, var(--color-accent) 4%, transparent));
}

.league-v3-honour-strip {
    padding-top: .15rem;
    padding-bottom: .85rem;
}

.league-v3-records {
    margin: 1.35rem 1.125rem 1.5rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 1.2rem;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.league-v3-records-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.05rem;
    border: 0;
    background: transparent;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

.league-v3-records-toggle:hover,
.league-v3-records-toggle:focus-visible {
    background: color-mix(in srgb, var(--bg-surface-alt, var(--bg-surface)) 65%, transparent);
    outline: none;
}

.league-v3-records-icon {
    display: flex;
    width: 3.15rem;
    height: 3.15rem;
    flex: 0 0 3.15rem;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--bg-surface-alt, var(--bg-surface)) 80%, transparent);
    color: var(--color-accent);
}

.league-v3-records-icon svg {
    width: 1.65rem;
    height: 1.65rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.league-v3-records-heading {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .12rem;
}

.league-v3-records-heading strong {
    font-size: 1.3rem;
    line-height: 1.1;
}

.league-v3-records-heading small {
    overflow: hidden;
    color: var(--color-muted);
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-records-chevron {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    fill: none;
    stroke: var(--color-muted);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
    transition: transform .2s ease;
}

.league-v3-records-chevron.is-expanded {
    transform: rotate(180deg);
}

.league-v3-records-body {
    padding: .2rem 1.05rem 1.1rem;
}

.league-v3-records-section + .league-v3-records-section {
    margin-top: 1.35rem;
}

.league-v3-records-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .75rem;
}

.league-v3-records-section-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.league-v3-record-switch {
    display: flex;
    flex: 0 0 auto;
    gap: .15rem;
    padding: .2rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--bg-base, var(--bg-surface));
}

.league-v3-record-switch button {
    min-height: 1.9rem;
    padding: .25rem .8rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--color-muted);
    font: inherit;
    font-size: .73rem;
    font-weight: 800;
    cursor: pointer;
}

.league-v3-record-switch button.is-active {
    color: var(--bg-base, #04140d);
    background: var(--color-accent);
}

.league-v3-record-switch button.is-active.is-negative {
    color: var(--color-text);
    background: var(--color-danger);
}

.league-v3-record-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 4.25rem;
    margin-top: .55rem;
    padding: .8rem .9rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--bg-surface-alt, var(--bg-surface)) 80%, transparent);
}

.league-v3-record-rank {
    width: 1.55rem;
    flex: 0 0 1.55rem;
    color: var(--color-accent);
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
}

.league-v3-record-info {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .15rem;
}

.league-v3-record-info strong,
.league-v3-record-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-record-info strong {
    font-size: .98rem;
}

.league-v3-record-info small {
    color: var(--color-muted);
    font-size: .76rem;
}

.league-v3-record-row > b {
    flex: 0 0 auto;
    font-size: .84rem;
}

.league-v3-record-row > b.is-positive {
    color: var(--color-accent);
}

.league-v3-record-row > b.is-negative {
    color: var(--color-danger);
}

.league-v3-record-empty {
    padding: 1rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--bg-surface-alt, var(--bg-surface)) 80%, transparent);
    color: var(--color-muted);
    font-size: .8rem;
}

@media (max-width: 640px) {
    .league-v3-user-card {
        margin-right: .85rem;
        margin-left: .85rem;
    }

    .league-v3-records {
        margin-right: .85rem;
        margin-left: .85rem;
    }

    .league-v3-records-heading strong {
        font-size: 1.12rem;
    }

    .league-v3-records-heading small {
        font-size: .75rem;
    }

    .league-v3-records-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .league-v3-record-switch {
        align-self: stretch;
    }

    .league-v3-record-switch button {
        flex: 1 1 0;
    }
}

/* Final reference pass: compact honour cards and fluent, card-first analytics. */
.league-v3-pinned--comparison {
    border: 1px solid color-mix(in srgb, var(--color-accent) 52%, var(--color-border));
    box-shadow: 0 0 .9rem color-mix(in srgb, var(--color-accent) 8%, transparent);
}

.league-v3-pinned--comparison .league-v3-pinned-card {
    border: 0;
}

.league-v3-carousel-track {
    scroll-padding-inline: 1.125rem;
}

.league-v3-vs-card {
    min-height: 11.5rem;
    border-radius: 1.25rem;
    padding: 1.125rem;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.league-v3-vs-card:hover {
    border-color: color-mix(in srgb, var(--color-accent) 36%, var(--color-border));
    box-shadow: var(--shadow-md, var(--shadow-sm));
    transform: translateY(-1px);
}

.league-v3-vs-inner--neutral .league-v3-vs-side b {
    color: var(--color-text);
}

.league-v3-honour-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    padding: .8rem 1rem .25rem;
}

.league-v3-honour-card {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: .7rem;
    padding: .85rem .9rem;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--bg-surface);
}

.league-v3-honour-card--purple {
    border-color: color-mix(in srgb, var(--color-purple, #8b6bf0) 38%, var(--color-border));
}

.league-v3-honour-icon {
    display: flex;
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 2.2rem;
    align-items: center;
    justify-content: center;
    border-radius: .7rem;
    background: color-mix(in srgb, var(--color-accent) 14%, transparent);
    color: var(--color-accent);
    font-size: 1.15rem;
    font-weight: 800;
}

.league-v3-honour-card--purple .league-v3-honour-icon {
    background: color-mix(in srgb, var(--color-purple, #8b6bf0) 16%, transparent);
    color: var(--color-purple, #8b6bf0);
}

.league-v3-honour-card > div:last-child {
    min-width: 0;
}

.league-v3-honour-label {
    display: block;
    overflow: hidden;
    color: var(--color-muted);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.league-v3-honour-card strong,
.league-v3-honour-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-honour-card strong {
    margin-top: .22rem;
    color: var(--color-text);
    font-size: .86rem;
}

.league-v3-honour-card small {
    margin-top: .18rem;
    color: var(--color-muted);
    font-size: .69rem;
}

@media (max-width: 640px) {
    .league-v3-honour-strip {
        grid-template-columns: 1fr;
        gap: .55rem;
        padding-right: .8rem;
        padding-left: .8rem;
    }

    .league-v3-honour-card {
        padding: .72rem .8rem;
    }

    .league-v3-vs-card {
        min-height: 11rem;
        padding: 1rem;
    }
}

/* Reference layout refinements: segmented navigation, pinned comparison and VS carousel. */
.league-v3-tabs {
    gap: .5rem;
    margin-right: 1.125rem;
    margin-left: 1.125rem;
    padding: .25rem;
    border-radius: .82rem;
}

.league-v3-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    min-height: 2.55rem;
    padding: .58rem .75rem;
    border-radius: .58rem;
    font-size: .82rem;
}

.league-v3-tab svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.league-v3-tab.is-active {
    color: var(--bg-page, var(--bg-base, #04140d));
    background: var(--color-accent);
    box-shadow: none;
}

.league-v3-pinned--comparison {
    display: block;
    margin: .85rem 1.125rem .4rem;
    padding: .95rem 1rem .8rem;
    border-color: color-mix(in srgb, var(--color-accent) 36%, var(--color-border));
    border-radius: 1rem;
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-accent) 15%, transparent), var(--bg-surface) 68%);
}

.league-v3-pinned--comparison.is-above {
    border-color: color-mix(in srgb, var(--color-success) 55%, var(--color-border));
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-success) 16%, transparent), var(--bg-surface) 68%);
}

.league-v3-pinned--comparison.is-below {
    border-color: color-mix(in srgb, var(--color-danger) 55%, var(--color-border));
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-danger) 14%, transparent), var(--bg-surface) 68%);
}

.league-v3-pinned--comparison.is-above .league-v3-pinned-card--accent strong,
.league-v3-pinned--comparison.is-above .league-v3-pinned-note {
    color: var(--color-success);
}

.league-v3-pinned--comparison.is-below .league-v3-pinned-card--accent strong,
.league-v3-pinned--comparison.is-below .league-v3-pinned-note {
    color: var(--color-danger);
}

.league-v3-pinned-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.league-v3-pinned-row .league-v3-pinned-card {
    flex: 1 1 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.league-v3-pinned-card strong {
    margin-top: .25rem;
    font-size: 1.42rem;
}

.league-v3-pinned-divider {
    width: 1px;
    height: 2.2rem;
    flex: 0 0 1px;
    background: var(--color-border);
}

.league-v3-pinned-note {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .75rem;
    padding-top: .65rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-accent);
    font-size: .72rem;
    line-height: 1.35;
}

.league-v3-pinned-note-icon {
    font-size: .95rem;
    font-weight: 800;
}

.league-v3-carousel-intro {
    margin: 1.1rem 1.125rem .15rem;
    padding: 0;
}

.league-v3-carousel-intro h2 {
    font-size: 1.05rem;
    letter-spacing: -.01em;
}

.league-v3-eyebrow {
    font-size: .67rem;
}

.league-v3-carousel-track {
    display: flex;
    gap: .85rem;
    padding: .8rem 1.125rem .9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.league-v3-carousel-track::-webkit-scrollbar {
    display: none;
}

.league-v3-vs-card {
    display: flex;
    flex: 0 0 min(88vw, 22rem);
    flex-direction: column;
    min-height: 10.5rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 1.1rem;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    scroll-snap-align: center;
}

.league-v3-a-eyebrow {
    display: flex;
    align-items: center;
    min-height: 1rem;
    margin-bottom: .8rem;
    color: var(--color-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.league-v3-vs-inner {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
}

.league-v3-vs-side {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    gap: .38rem;
    padding: .15rem .55rem;
}

.league-v3-vs-side:first-child {
    padding-left: 0;
}

.league-v3-vs-side:last-child {
    padding-right: 0;
}

.league-v3-vs-side strong {
    overflow: hidden;
    color: var(--color-text);
    font-size: .92rem;
    line-height: 1.22;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-vs-side small {
    min-height: 1.05rem;
    overflow: hidden;
    color: var(--color-muted);
    font-size: .72rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-vs-side b {
    margin-top: auto;
    padding-top: .45rem;
    font-size: .84rem;
}

.league-v3-vs-divider {
    position: relative;
    width: 1px;
    flex: 0 0 1px;
    margin: 0 .2rem;
    background: var(--color-border);
}

.league-v3-vs-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--color-muted);
    font-size: .53rem;
    font-weight: 800;
    transform: translate(-50%, -50%);
}

.league-v3-stat-tag {
    color: var(--color-muted);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1.2;
    text-transform: uppercase;
}

.league-v3-stat-tag.is-positive,
.league-v3-vs-side b.is-positive {
    color: var(--color-accent);
}

.league-v3-stat-tag.is-negative,
.league-v3-vs-side b.is-negative {
    color: var(--color-danger);
}

@media (max-width: 640px) {
    .league-v3-tabs {
        margin-right: .85rem;
        margin-left: .85rem;
    }

    .league-v3-tab {
        gap: .25rem;
        min-height: 2.35rem;
        padding-right: .4rem;
        padding-left: .4rem;
        font-size: .75rem;
    }

    .league-v3-tab svg {
        width: .88rem;
        height: .88rem;
    }

    .league-v3-pinned--comparison {
        margin-right: .85rem;
        margin-left: .85rem;
        padding: .85rem .8rem .7rem;
    }

    .league-v3-pinned-card strong {
        font-size: 1.22rem;
    }

    .league-v3-carousel-intro {
        margin-right: .85rem;
        margin-left: .85rem;
    }

    .league-v3-carousel-track {
        padding-right: .85rem;
        padding-left: .85rem;
    }

    .league-v3-vs-card {
        flex-basis: min(88vw, 21rem);
        padding: .9rem;
    }
}

.h2h-analytics-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.1rem;
    padding: 0.3rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.h2h-analytics-row:hover strong,
.h2h-analytics-row:focus-visible strong,
.h2h-analytics-match-score button:hover,
.h2h-analytics-match-score button:focus-visible,
.h2h-analytics-rivalry button:hover,
.h2h-analytics-rivalry button:focus-visible {
    color: var(--color-accent);
}

.h2h-analytics-row strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--text-sm);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h2h-analytics-row span,
.h2h-analytics-rivalry small {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.h2h-analytics-match-score {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.h2h-analytics-match-score button,
.h2h-analytics-rivalry button {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.h2h-analytics-match-score button {
    display: flex;
    flex: 1;
    justify-content: space-between;
    gap: 0.35rem;
}

.h2h-analytics-match-score button strong {
    color: var(--color-accent);
}

.h2h-analytics-rivalry {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0.35rem 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.h2h-analytics-rivalry small {
    flex-basis: 100%;
}

.gw-honors-history {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-color);
}

.gw-honors-column {
    min-width: 0;
}

.gw-honors-heading {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: var(--space-2);
}

.gw-honor-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
    color: inherit;
    text-align: left;
}

.h2h-analytics-row strong,
.h2h-analytics-row span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .h2h-analytics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .h2h-analytics-grid .gw-analytics-tile--wide {
        grid-column: auto;
    }
}

.gw-honor-row + .gw-honor-row {
    margin-top: 0.4rem;
}

.gw-honor-row.is-interactive {
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.12s ease;
}

.gw-honor-row.is-interactive:hover,
.gw-honor-row.is-interactive:focus-visible {
    border-color: color-mix(in srgb, var(--color-accent) 45%, var(--border-color));
    transform: translateY(-1px);
    outline: none;
}

.gw-analytics-tile--down.is-interactive:hover,
.gw-analytics-tile--down.is-interactive:focus-visible {
    border-color: color-mix(in srgb, #f87171 50%, var(--border-color));
    background: color-mix(in srgb, #f87171 6%, var(--bg-card));
}

.gw-honor-row--down .gw-honor-points {
    color: #f87171;
}

.gw-honor-rank {
    flex: 0 0 1.35rem;
    color: var(--color-accent);
    font-weight: 800;
    text-align: center;
}

.gw-honor-manager {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.gw-honor-team,
.gw-honor-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gw-honor-team {
    font-size: var(--text-sm);
    font-weight: 700;
}

.gw-honor-meta {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.gw-honor-points {
    flex: 0 0 auto;
    color: var(--color-accent);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.gw-honors-tile-grid {
    margin-top: var(--space-3);
}

.gw-honors-tile {
    gap: 0.35rem;
    cursor: pointer;
}

.gw-honors-tile .gw-analytics-sub {
    font-size: 0.68rem;
}

.gw-honor-tile-list {
    display: grid;
    width: 100%;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

.gw-honor-tile-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.25rem 0.35rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-card) 70%, transparent);
}

.gw-honor-tile-rank {
    flex: 0 0 1rem;
    color: var(--color-accent);
    font-size: 0.68rem;
    font-weight: 800;
    text-align: center;
}

.gw-honor-tile-manager {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.05rem;
}

.gw-honor-tile-manager strong,
.gw-honor-tile-manager small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gw-honor-tile-manager strong {
    font-size: 0.7rem;
}

.gw-honor-tile-manager small {
    color: var(--text-muted);
    font-size: 0.62rem;
}

.gw-honor-tile-points {
    flex: 0 0 auto;
    color: var(--color-accent);
    font-size: 0.72rem;
}

.gw-analytics-tile--down .gw-honor-tile-points {
    color: #f87171;
}

.gw-honor-tile-hint {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.62rem;
}

.gw-honors-modal {
    width: min(620px, 100%);
}

.gw-honors-modal-list {
    display: grid;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.gw-honor-modal-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card-hover);
}

.gw-honor-modal-rank {
    flex: 0 0 2rem;
    color: var(--color-accent);
    font-size: var(--text-lg);
    font-weight: 800;
    text-align: center;
}

.gw-honor-modal-manager {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.15rem;
}

.gw-honor-modal-manager strong,
.gw-honor-modal-manager span,
.gw-honor-modal-stats strong,
.gw-honor-modal-stats span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gw-honor-modal-manager span,
.gw-honor-modal-stats span {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.gw-honor-modal-stats {
    display: grid;
    flex: 0 0 auto;
    gap: 0.15rem;
    text-align: right;
}

.gw-honor-modal-stats strong {
    color: var(--color-accent);
    font-size: var(--text-lg);
}

@media (max-width: 480px) {
    .gw-honor-modal-row {
        align-items: flex-start;
    }

    .gw-honor-modal-stats strong {
        font-size: var(--text-sm);
    }
}

.standings-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card-hover);
}

.standings-view-toggle__button {
    border: 0;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.standings-view-toggle__button.is-active {
    background: var(--color-accent);
    color: #06110b;
}

@media (max-width: 600px) {
    .gw-honors-history {
        grid-template-columns: 1fr;
    }
}

/* Legacy alias kept for any leftover markup */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: var(--space-2);
}

.stat-sub {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.dash-link-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.pl-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
    margin: 0 0 1.15rem;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--bg-card) 88%, transparent);
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.pl-tab {
    position: relative;
    min-width: 0;
    min-height: 2.55rem;
    padding: 0.4rem 0.3rem;
    border: 0;
    border-radius: calc(var(--radius-lg) - 0.2rem);
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: break-word;
    hyphens: manual;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.pl-tab:hover,
.pl-tab:focus-visible {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--bg-tertiary) 72%, transparent);
    outline: none;
}

.pl-tab.is-active {
    color: var(--text-primary);
    background: var(--bg-tertiary, color-mix(in srgb, var(--bg-card) 70%, #fff 6%));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border-color) 80%, transparent);
}

.pl-tabs--compact {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    width: fit-content;
    max-width: 100%;
}

.pl-tabs--compact .pl-tab {
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
}

.pl-tabs--compact.pl-tabs--fill {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pl-tabs--compact.pl-tabs--fill .pl-tab {
    flex: unset;
    width: 100%;
    min-width: 0;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    text-align: center;
    justify-content: center;
}

@media (min-width: 720px) {
    .pl-tabs:not(.pl-tabs--compact) {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
    .pl-tabs:not(.pl-tabs--compact) .pl-tab {
        font-size: 0.78rem;
        padding: 0.5rem 0.45rem;
        white-space: nowrap;
    }
}

.pl-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--space-3);
}

.pl-filter-row .pl-tabs--fill {
    flex: 1 1 100%;
}

.pl-team-select {
    min-width: 8rem;
    max-width: 100%;
    width: 100%;
    flex: 1 1 100%;
}

.fixture-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.fixture-day-sep {
    margin: 0.55rem 0 0.15rem;
    padding: 0.35rem 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
}

.fixture-day-sep:first-child {
    margin-top: 0;
}

.fixture-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 0.5rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-sm);
}

.fixture-row:last-child {
    border-bottom: none;
}

.fixture-home,
.fixture-away {
    display: grid;
    align-items: center;
    column-gap: 0.4rem;
    min-width: 0;
    max-width: 100%;
    font-weight: 600;
}

/* FDR stays on the outer edges so chips line up down the list */
.fixture-home {
    grid-template-columns: 1.4rem minmax(0, 1fr);
    justify-items: stretch;
    text-align: right;
}

.fixture-away {
    grid-template-columns: minmax(0, 1fr) 1.4rem;
    justify-items: stretch;
    text-align: left;
}

.fixture-home > .fdr-chip,
.fixture-away > .fdr-chip {
    justify-self: center;
    align-self: center;
}

.fixture-team-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}

.fixture-home .fixture-team-button {
    justify-content: flex-end;
}

.fixture-away .fixture-team-button {
    justify-content: flex-start;
}

.fixture-team-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fixture-team-badge {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: 0 0 22px;
}

.fixture-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    color: var(--text-muted);
    min-width: 4.5rem;
    padding: 0 0.15rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.fixture-score-button {
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    border-radius: 0.4rem;
}

.fixture-score-button:hover,
.fixture-score-button:focus-visible {
    color: var(--color-accent, #00ff87);
}

.fixture-kickoff { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; }
.pl-live-dot {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--accent, #00ff87);
}

.pl-modal-backdrop.fixture-match-backdrop {
    z-index: 1060;
    overflow: hidden;
    padding: 1rem;
    padding-bottom: calc(1rem + var(--app-bottom-chrome, 0px));
}

.pl-modal.fixture-match-modal {
    display: flex;
    flex-direction: column;
    width: min(36rem, 100%);
    max-height: calc(100vh - 2rem - var(--app-bottom-chrome, 0px));
    max-height: calc(100dvh - 2rem - var(--app-bottom-chrome, 0px));
    max-height: calc(100svh - 2rem - var(--app-bottom-chrome, 0px));
    min-height: 0;
    overflow: hidden;
    padding: 0;
    margin-bottom: 0;
}

.fixture-match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    flex: 0 0 auto;
    padding: var(--space-4) var(--space-4) 0;
}

.fixture-match-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 var(--space-4) var(--space-4);
}

.fixture-match-badges {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.fixture-match-ft {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.fixture-match-close {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-muted);
    cursor: pointer;
}

.fixture-match-loading {
    display: flex;
    justify-content: center;
    padding: 2rem var(--space-4);
}

.fixture-match-scoreline {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    margin: 0;
    padding: var(--space-3) var(--space-4);
}

.fixture-match-team {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.fixture-match-team--home {
    justify-content: flex-end;
    text-align: right;
}

.fixture-match-team--away {
    justify-content: flex-start;
}

.fixture-match-team strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fixture-match-badge {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: 0 0 28px;
}

.fixture-match-score {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 1.15rem;
    text-align: center;
    white-space: nowrap;
}

.fixture-match-empty-copy {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-align: center;
}

.fixture-match-section {
    margin-top: 0.85rem;
}

.fixture-match-section h3 {
    margin: 0 0 0.35rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
}

.fixture-match-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 1.5rem;
    position: relative;
}

.fixture-match-split::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: color-mix(in srgb, var(--text-primary) 55%, transparent);
    pointer-events: none;
}

.fixture-match-side {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.fixture-match-side span {
    overflow-wrap: anywhere;
}

.fixture-match-side--home {
    text-align: right;
    padding-right: 0.15rem;
}

.fixture-match-side--away {
    text-align: left;
    padding-left: 0.15rem;
}

.fixture-match-none {
    color: var(--text-muted);
}

.fdr-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 1.35rem;
    min-width: 1.35rem;
    max-width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}
.fdr-1 { background: #01fc7a; color: #0a1a12; }
.fdr-2 { background: #02eb6b; color: #0a1a12; }
.fdr-3 { background: #e6e60a; color: #1a1a0a; }
.fdr-4 { background: #ff1751; color: #fff; }
.fdr-5 { background: #80072d; color: #fff; }
.fdr-unknown { background: var(--bg-tertiary); color: var(--text-muted); }

.pl-summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: var(--space-3);
}
.pl-summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, var(--bg-card) 0%, rgba(0, 255, 135, 0.04) 100%);
    border: 1px solid var(--border-color);
}
.pl-summary-item-accent {
    border-color: color-mix(in srgb, var(--accent, #00ff87) 35%, var(--border-color));
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.06);
    grid-column: 1 / -1;
}
.pl-summary-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pl-summary-value {
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.2;
}
.pl-summary-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.3;
}
.pl-hub-gw-copy {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}
.pl-hub-gw-label {
    display: block;
    white-space: nowrap;
}
.pl-current-gw-pulse {
    display: inline-block;
    width: .52rem;
    height: .52rem;
    margin-left: .45rem;
    vertical-align: .12em;
    border-radius: 50%;
    background: var(--color-accent, #00ff87);
    box-shadow: 0 0 0 3px rgba(0, 255, 135, .12), 0 0 13px rgba(0, 255, 135, .75);
    animation: pl-current-gw-pulse 1.8s ease-in-out infinite;
}
@keyframes pl-current-gw-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.82); }
}
.pl-hub-deadline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .4rem;
}
.pl-hub-deadline-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.pl-deadline-count {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--color-accent, #00ff87);
}
.pl-deadline-count .pl-deadline-counter {
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .01em;
}
.pl-hub-live-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.pl-summary-markers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: var(--text-sm);
}
.pl-hub-cta {
    margin: 0;
}
.pl-hub-cta-link {
    color: var(--accent, #00ff87);
    font-weight: 600;
    text-decoration: none;
}
.pl-hub-cta-link:hover {
    text-decoration: underline;
}

/* â”€â”€ Hub Sync (always-visible on Premier League Home) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hub-sync {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    min-width: 0;
}
.hub-sync-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid color-mix(in srgb, var(--color-accent, #00ff87) 55%, transparent);
    background: linear-gradient(160deg, rgba(0, 255, 135, 0.12) 0%, rgba(0, 0, 0, 0.35) 100%);
    color: var(--color-accent, #00ff87);
    font-weight: 700;
    font-size: var(--text-sm, 0.875rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.08), 0 0 18px rgba(0, 255, 135, 0.08);
}
.hub-sync-btn:hover:not(:disabled) {
    border-color: var(--color-accent, #00ff87);
    background: linear-gradient(160deg, rgba(0, 255, 135, 0.22) 0%, rgba(0, 0, 0, 0.4) 100%);
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.18), 0 0 22px rgba(0, 255, 135, 0.16);
}
.hub-sync-btn:active:not(:disabled) {
    transform: translateY(1px);
}
.hub-sync-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.hub-sync-btn--busy {
    animation: hub-sync-pulse 1.2s ease-in-out infinite;
}
.hub-sync-btn--nolink {
    opacity: 0.85;
}
.hub-sync-btn-label {
    line-height: 1;
}
.hub-sync-meta {
    font-size: var(--text-xs, 0.75rem);
    color: var(--text-muted);
    text-align: right;
    max-width: 12rem;
    line-height: 1.3;
}
.hub-sync-time {
    color: color-mix(in srgb, var(--color-accent, #00ff87) 70%, var(--text-muted));
    font-variant-numeric: tabular-nums;
}
.hub-sync-hint {
    color: var(--text-muted);
}
.hub-sync-link {
    color: var(--color-accent, #00ff87);
    font-weight: 600;
    text-decoration: none;
}
.hub-sync-link:hover {
    text-decoration: underline;
}
.hub-sync-error {
    color: var(--color-danger, #ff4d6d);
}
@keyframes hub-sync-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.12), 0 0 12px rgba(0, 255, 135, 0.1); }
    50% { box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.35), 0 0 28px rgba(0, 255, 135, 0.28); }
}

/* Compact live Refresh (Hub strip / My Team title bar) */
.hub-live-refresh {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    min-width: 0;
}
.hub-live-refresh .hub-sync-meta {
    text-align: right;
    max-width: 11rem;
}
.hub-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    flex-shrink: 0;
    border-radius: var(--radius-md, 8px);
    border: 1px solid color-mix(in srgb, var(--border-color, #333) 85%, transparent);
    background: color-mix(in srgb, var(--surface-2, #141414) 88%, transparent);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.hub-refresh-btn svg {
    width: 15px;
    height: 15px;
}
.hub-refresh-btn:hover:not(:disabled) {
    color: var(--color-accent, #00ff87);
    border-color: color-mix(in srgb, var(--color-accent, #00ff87) 45%, var(--border-color, #333));
    background: color-mix(in srgb, var(--color-accent, #00ff87) 10%, transparent);
}
.hub-refresh-btn:active:not(:disabled) {
    transform: translateY(1px);
}
.hub-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.hub-refresh-btn--busy svg {
    animation: hub-refresh-spin 0.85s linear infinite;
}
.hub-refresh-btn--live:not(:disabled) {
    color: var(--color-accent, #00ff87);
    border-color: color-mix(in srgb, var(--color-accent, #00ff87) 50%, transparent);
    background: color-mix(in srgb, var(--color-accent, #00ff87) 8%, transparent);
    animation: hub-refresh-live-pulse 1.8s ease-in-out infinite;
}
.hub-refresh-btn--live.hub-refresh-btn--busy {
    animation: none;
}
@keyframes hub-refresh-spin {
    to { transform: rotate(360deg); }
}
@keyframes hub-refresh-live-pulse {
    0%, 100% {
        opacity: 0.72;
        box-shadow: 0 0 0 0 rgba(0, 255, 135, 0);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.22), 0 0 12px rgba(0, 255, 135, 0.18);
    }
}
@media (max-width: 480px) {
    .hub-sync {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-3, 0.75rem);
    }
    .hub-sync-meta {
        text-align: left;
        max-width: none;
        flex: 1;
        min-width: 0;
    }
    .hub-sync-btn {
        order: 2;
    }
    .hub-sync-page-btn {
        order: 2;
    }
    .hub-live-refresh {
        width: 100%;
        justify-content: flex-end;
    }
    .hub-live-refresh .hub-sync-meta {
        text-align: right;
        max-width: none;
        flex: 1;
    }
}
.pl-gw-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    max-width: 60%;
}
.pl-card-current {
    border-color: color-mix(in srgb, var(--accent, #00ff87) 40%, var(--border-color));
}
.pl-strength {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: var(--text-sm);
}
.pl-team-actions {
    white-space: nowrap;
    text-align: right;
}

.pl-standings {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
    overflow: hidden;
}

.pl-table-card {
    padding: 0.85rem 0.75rem 1rem;
    background: #0b0d12;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pl-table-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.35rem 0.85rem;
}

.pl-table-heading-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.pl-table-heading-logo {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.pl-table-heading-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
}

.pl-table-heading-sub {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pl-standings-header,
.pl-standings-row {
    display: grid;
    grid-template-columns: 0.28rem minmax(0, 1.5fr) repeat(4, 1.5rem) 2.6rem 2.2rem;
    column-gap: 0.35rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.pl-standings-header {
    padding: 0.2rem 0.35rem 0.55rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pl-standings-zone-label {
    margin: 0.55rem 0 0.15rem;
    padding-left: 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pl-standings-row {
    margin: 0;
    padding: 0.72rem 0.35rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pl-standings-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pl-standings-rail {
    width: 0.18rem;
    height: 1.35rem;
    border-radius: 999px;
    background: transparent;
    justify-self: center;
}

.pl-standings-row--cl .pl-standings-rail {
    background: #00c853;
}

.pl-standings-row--el .pl-standings-rail {
    background: #2979ff;
}

.pl-standings-row--rel .pl-standings-rail {
    background: #ff1744;
}

.pl-standings-team-cell {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.pl-standings-pos {
    width: 1.1rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    flex-shrink: 0;
}

.pl-standings-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-standings-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.86rem;
    color: var(--text-primary);
}

.pl-standings-header .pl-standings-col {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.pl-standings-col--team {
    text-align: left;
}

.pl-standings-col--gls {
    min-width: 0;
}

.pl-standings-col--pts {
    font-weight: 800;
}

.pl-standings-spacer {
    display: block;
}

.pl-team-modal-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.15rem 0.55rem;
    margin-top: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pl-team-modal-tabs::-webkit-scrollbar {
    display: none;
}

.pl-team-modal-tab {
    background: none;
    border: none;
    padding: 0 0 0.45rem;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}

.pl-team-modal-tab.is-active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

@media (max-width: 420px) {
    .pl-standings-header,
    .pl-standings-row {
        grid-template-columns: 0.28rem minmax(0, 1.35fr) repeat(4, 1.25rem) 2.3rem 1.9rem;
        column-gap: 0.25rem;
    }

    .pl-standings-name {
        font-size: 0.84rem;
    }

    .pl-standings-col {
        font-size: 0.78rem;
    }
}

.pl-team-actions .btn-xs {
    padding: 2px 6px;
    font-size: 0.7rem;
    min-height: 0;
}
.pl-player-cell {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}
.pl-players-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.pl-players-table {
    width: 100%;
    table-layout: fixed;
    min-width: 0;
}
.pl-players-table th,
.pl-players-table td {
    padding: 0.55rem 0.4rem;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.pl-players-table tbody tr {
    transition: background 0.15s ease;
}
.pl-players-table tbody tr:hover {
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 50%, transparent);
}
.pl-players-table th:first-child,
.pl-players-table td:first-child {
    width: 28%;
    white-space: normal;
    overflow: hidden;
}
.pl-players-table th:nth-child(2),
.pl-players-table td:nth-child(2) { width: 8%; }
.pl-players-table th:nth-child(3),
.pl-players-table td:nth-child(3) { width: 8%; }
.pl-players-table th:nth-child(4),
.pl-players-table td:nth-child(4) { width: 9%; }
.pl-players-table th:nth-child(5),
.pl-players-table td:nth-child(5) { width: 10%; }
.pl-players-table th:nth-child(6),
.pl-players-table td:nth-child(6),
.pl-players-table th:nth-child(7),
.pl-players-table td:nth-child(7) { width: 10%; }
.pl-players-table th:nth-child(8),
.pl-players-table td:nth-child(8) { width: 9%; }
.pl-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1.2;
}
.pl-sort-btn:hover {
    color: var(--color-accent, #00ff87);
}
.pl-sort-btn.is-active {
    color: var(--color-accent, #00ff87);
}
.pl-sort-ind {
    display: inline-block;
    min-width: 0.7em;
    font-size: 10px;
    line-height: 1;
}
.pl-player-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.pl-player-team {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.2;
}
.pl-status-chip {
    padding: 0 3px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    border-radius: 3px;
    flex-shrink: 0;
}
.player-availability-icon {
    display: inline-flex;
    width: .85rem;
    height: .85rem;
    margin-left: .2rem;
    vertical-align: -.12em;
    flex: 0 0 auto;
    color: var(--color-warning);
}
.player-availability-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.player-availability-injured { color: #ff6577; }
.player-availability-doubtful { color: var(--color-warning); }
.player-availability-unavailable { color: #c28cff; }
.player-availability-suspended { color: #ff9f43; }
.name .player-availability-icon,
.bench-name .player-availability-icon { width: .72rem; height: .72rem; margin-left: .12rem; vertical-align: -.08em; }
.player-modal-availability { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; max-width: 100%; margin-top: .3rem; color: var(--color-warning); font-size: .72rem; line-height: 1.25; }
.player-modal-availability .player-availability-icon { width: .9rem; height: .9rem; margin: 0; }
.player-modal-availability span:not(.player-availability-icon) { flex: 1 1 100%; min-width: 0; overflow: visible; padding-left: 1.25rem; color: var(--text-muted); overflow-wrap: anywhere; white-space: normal; }
.pl-empty {
    padding: var(--space-5) var(--space-2);
    text-align: center;
}
.pl-injury-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 100%;
    overflow: hidden;
}
.pl-injury-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 45%, transparent);
    overflow: hidden;
}
.pl-injury-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.pl-injury-identity {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.pl-injury-name {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.25;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-injury-sub {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pl-injury-chips {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
    white-space: nowrap;
}
.pl-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.35;
    white-space: nowrap;
    text-transform: uppercase;
    background: rgba(107, 107, 107, 0.18);
    color: #a8a8a8;
}
.pl-chip-chance {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    text-transform: none;
    min-width: 2.25rem;
}
.pl-chip-danger {
    background: rgba(233, 0, 82, 0.18);
    color: #ff4d7a;
}
.pl-chip-warning {
    background: rgba(245, 166, 35, 0.2);
    color: #f5a623;
}
.pl-chip-success {
    background: rgba(0, 255, 135, 0.12);
    color: #00ff87;
}
.pl-chip-info {
    background: rgba(4, 245, 255, 0.12);
    color: #04f5ff;
}
.pl-chip-muted {
    background: rgba(140, 140, 140, 0.22);
    color: #b0b0b0;
}
.pl-injury-news {
    margin: 0;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.mt-availability .badge {
    padding: 2px 6px;
    font-size: 10px;
    letter-spacing: 0.02em;
    border-radius: 4px;
    white-space: nowrap;
}

.pl-news-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 100%;
    overflow: hidden;
}
.pl-news-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 45%, transparent);
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.pl-news-row:hover {
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 72%, transparent);
    border-color: color-mix(in srgb, var(--border-color) 70%, var(--text-muted));
}
.pl-news-row:hover .pl-news-title { color: var(--text-primary); }
.pl-news-title {
    display: block;
    font-weight: 700;
    font-size: var(--text-sm);
    line-height: 1.4;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.pl-news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.mt-availability {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    vertical-align: middle;
}
.mt-availability-news {
    display: inline-block;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--text-muted);
}

.insight-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-sm);
}

.insight-row:last-child {
    border-bottom: none;
}

/* Premier League Hub — insight categories (inline accordion) */
.pl-insight-card {
    overflow: hidden;
}

.pl-insight-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 calc(var(--space-5) * -1) calc(var(--space-5) * -1);
    border-top: 1px solid var(--border-color);
    max-width: none;
    overflow: hidden;
}

.pl-insight-block {
    border-bottom: 1px solid var(--border-color);
    max-width: 100%;
    overflow: hidden;
}

.pl-insight-block:last-child {
    border-bottom: none;
}

.pl-insight-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 0.85rem var(--space-5);
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.18s ease;
}

.pl-insight-list-item:hover,
.pl-insight-list-item:focus-visible {
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 55%, transparent);
    outline: none;
}

.pl-insight-block.is-open > .pl-insight-list-item {
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 40%, transparent);
}

.pl-insight-list-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.pl-insight-list-item-title {
    font-weight: 700;
    font-size: var(--text-sm);
    letter-spacing: 0.01em;
}

.pl-insight-list-item-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-insight-list-item-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 60%, transparent);
    transition: transform 0.18s ease;
}

.pl-insight-block.is-open .pl-insight-list-item-chevron {
    transform: rotate(90deg);
}

.pl-insight-panel {
    padding: 0 var(--space-5) 0.85rem;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.pl-insight-panel .insight-row {
    padding: 0.55rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
    max-width: 100%;
    overflow: hidden;
}

.pl-insight-panel .insight-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pl-insight-panel .insight-row-top {
    min-width: 0;
    max-width: 100%;
}

.pl-insight-panel .insight-row-top .pl-player-link {
    flex: 1 1 auto;
    min-width: 0;
}

.pl-insight-panel .insight-row-stat {
    color: var(--text-primary);
    flex-shrink: 0;
}

.pl-insight-panel .text-muted.text-xs {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pl-insight-modal {
    width: min(480px, calc(100vw - 1.5rem));
}

.pl-insight-modal .insight-row {
    padding: var(--space-3) 0;
}

.insight-row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
}

.insight-row-stat {
    flex-shrink: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent, #00ff87);
    font-size: var(--text-sm);
}

@media (max-width: 480px) {
    .pl-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pl-summary-item-accent {
        grid-column: 1 / -1;
    }
    .pl-gw-badges {
        max-width: 100%;
        justify-content: flex-start;
        margin-top: var(--space-2);
    }
    .card-section-header {
        flex-wrap: wrap;
    }
}

.ai-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
}

.ai-usage-block {
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.settings-ai-usage-card .card-section-title {
    margin-bottom: 0;
}

/* Settings overview cards are action rows, not content panels. Keep them compact
   so the page reads like a settings menu instead of a stack of large cards. */
.settings-ai-usage-card {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
}

.settings-ai-usage-card.mb-4 {
    margin-bottom: 0.75rem !important;
}

.settings-ai-usage-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.settings-ai-usage-modal {
    width: min(560px, calc(100vw - 2rem));
    max-height: min(80dvh, 560px);
}

.settings-ai-usage-modal .ai-usage-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 520px) {
    .settings-ai-usage-modal .ai-usage-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* â”€â”€ Chip Tags â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.chip-tag {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    font-size: var(--text-sm);
    font-weight: 500;
}

@media (max-width: 768px) {
    .page-title {
        font-size: var(--text-lg);
    }

    .page-title-actions {
        width: 100%;
    }

    .page-title-actions .btn {
        flex: 1;
    }

    .portal-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .portal-layout {
        grid-template-columns: 1fr;
    }

    .team-stats,
    .analytics-grid,
    .gw-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2);
    }

    .league-list-item {
        padding: var(--space-3);
    }
}

@media (max-width: 480px) {
    .team-stats,
    .portal-stats {
        grid-template-columns: 1fr;
    }
}

/* â”€â”€ Auth Pages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: var(--space-4);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-logo {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 900;
    color: var(--color-primary);
}

.auth-logo-img {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    border-radius: 0;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.2));
}

.auth-logo-img--login {
    width: 112px;
    height: 112px;
}

.auth-title {
    font-size: var(--text-xl);
    font-weight: 800;
    margin-bottom: var(--space-2);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

@media (max-width: 480px) {
    .auth-card {
        padding: var(--space-5);
        border-radius: var(--radius-lg);
    }
}

/* â”€â”€ Admin â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.admin-request-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.admin-request-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

.admin-request-info {
    min-width: 0;
    flex: 1;
}

.admin-request-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.admin-compact-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-grid-shell {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    overflow: hidden;
}

.admin-grid-scroll {
    max-height: min(420px, 55vh);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.admin-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.admin-grid tbody td {
    padding: 10px 12px;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.admin-grid tbody tr:last-child td {
    border-bottom: none;
}

.admin-grid tbody tr:hover td {
    background: var(--bg-card-hover);
}

.admin-grid-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-plan-chip {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-grid-col-status {
    width: 88px;
}

.admin-grid-col-action {
    width: 84px;
    text-align: right;
}

.admin-grid-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.admin-grid-pager-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.admin-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

.admin-compact-main {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    flex: 1;
}

.admin-compact-name {
    font-weight: 600;
    font-size: var(--text-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Full-viewport modal â€” escapes content-body overflow by using fixed + overlay z-index */
.admin-modal-root {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.55);
    -webkit-overflow-scrolling: touch;
}

/* Nested confirm above an open admin detail modal */
.admin-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-nested);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.65);
}

.admin-modal {
    width: min(440px, calc(100vw - 2rem));
    max-height: min(80dvh, 640px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Usage is wider than the small admin dialogs so its tables do not turn into
   unreadable seven-column cards. The grid collapses naturally on phones. */
.admin-usage-modal {
    width: min(1080px, calc(100vw - 2rem));
    max-height: min(92dvh, 900px);
}

.admin-usage-modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding: 1.5rem;
}

.admin-usage-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0 0 var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.admin-usage-search {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.admin-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.admin-search-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
}

.admin-search-result {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    background: var(--bg-card);
    text-align: left;
    cursor: pointer;
    opacity: 1;
}

.admin-search-result:hover,
.admin-search-result:focus-visible {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    outline: none;
}

.admin-search-result small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.admin-log-new td {
    background: rgba(239, 68, 68, 0.06);
}

.admin-log-details {
    max-width: 32rem;
    max-height: 12rem;
    margin: 0.4rem 0 0;
    padding: 0.6rem;
    overflow: auto;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    font: inherit;
    font-size: 0.7rem;
}

.admin-usage-search .form-input {
    min-width: 0;
    flex: 1;
}

.admin-monitor-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}

.admin-monitor-heading h3,
.admin-monitor-panel-heading h4 {
    margin: 0;
    font-weight: 700;
}

.admin-monitor-heading p {
    margin: 0.25rem 0 0;
}

.admin-monitor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.admin-monitor-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.admin-monitor-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-monitor-panel-heading span {
    display: block;
    margin-top: 0.2rem;
}

.admin-monitor-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-monitor-table {
    min-width: 680px;
    table-layout: auto;
}

.admin-monitor-table thead th,
.admin-monitor-table tbody td {
    white-space: nowrap;
}

.admin-monitor-table thead th:nth-child(2),
.admin-monitor-table tbody td:nth-child(2) {
    min-width: 150px;
    white-space: normal;
}

.admin-monitor-table tbody td {
    vertical-align: top;
}

.admin-monitor-rank {
    width: 36px;
    color: var(--text-muted);
    font-weight: 700;
}

.admin-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    font-weight: 700;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.admin-sort-btn:hover,
.admin-sort-btn.is-active {
    color: var(--color-accent, #00ff87);
}

.admin-sort-ind {
    display: inline-block;
    min-width: 0.7em;
    font-size: 0.65rem;
    line-height: 1;
    opacity: 0.85;
}

.admin-metrics-grid.admin-usage-metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.admin-usage-grid {
    min-width: 780px;
    table-layout: auto;
}

.admin-usage-modal .admin-grid-scroll {
    max-height: min(360px, 42vh);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.admin-modal-heading {
    min-width: 0;
}

.admin-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-modal-body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    overflow-y: auto;
    min-height: 0;
    flex: 1;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.admin-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.admin-user-team-name {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.admin-user-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-user-actions {
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-user-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-user-actions-group--danger {
    margin-left: auto;
}

.admin-detail-backdrop {
    display: none;
}

.admin-detail-panel {
    display: none;
}

.admin-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.admin-detail-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-detail-body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.admin-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-detail-section {
    margin: 0.5rem 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

.admin-detail-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: 0.8rem;
}

.admin-detail-section-heading h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.admin-detail-section-heading p {
    margin: 0.2rem 0 0;
}

.admin-detail-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.admin-detail-metric-grid > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

.admin-detail-metric-grid span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.admin-detail-metric-grid strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: right;
}

.admin-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-top: 1px solid var(--border-color);
}

.admin-user-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.admin-user-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
}

.admin-user-card-identity {
    min-width: 0;
    flex: 1;
}

.admin-user-card-status {
    text-align: right;
    flex-shrink: 0;
}

.admin-user-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}

.admin-user-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.admin-user-card-meta .form-input {
    max-width: 140px;
    width: 100%;
}

.admin-user-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

@media (max-width: 768px) {
    .admin-request-card {
        flex-direction: column;
    }

    .admin-request-actions {
        width: 100%;
    }

    .admin-request-actions .btn {
        flex: none;
    }

    .admin-modal-root {
        padding: var(--space-3);
        align-items: center;
    }

    .admin-modal {
        width: 100%;
        max-height: min(85dvh, 100%);
    }

    .admin-usage-modal-body {
        padding: var(--space-3);
    }

    .admin-metrics-grid.admin-usage-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2);
    }

    .admin-usage-metrics-grid .admin-metric {
        padding: var(--space-3);
    }

    .admin-usage-summary-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-2);
    }

    .admin-user-card-meta {
        grid-template-columns: 1fr;
    }

    .admin-user-card-actions {
        justify-content: stretch;
    }

    .admin-user-card-actions .btn {
        flex: none;
    }

    .admin-user-card-meta .form-input {
        max-width: none;
    }

    .admin-detail-section {
        padding: 0.8rem;
    }

    .admin-detail-metric-grid {
        grid-template-columns: 1fr;
    }
}

/* Non-enabled leagues keep the live portal shell while previewing gated analytics. */
.league-request-community-btn {
    margin-top: 3px !important;
}

.league-v3-linked-team-controls--preview {
    justify-content: flex-start;
    min-height: 1.65rem;
    padding-top: .15rem;
}

.league-preview-request-btn {
    flex: 0 0 auto;
    min-height: 1.8rem;
    padding: .3rem .7rem;
    font-size: .72rem;
}

.league-v3-preview-summary .league-v3-linked-team-main {
    cursor: default;
}

.league-v3-preview-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: .15rem .5rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-muted);
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.league-v3-preview-analytics {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.league-v3-preview-analytics > .league-v3-preview-feature-card,
.league-v3-preview-analytics > .league-v3-analytics-insights,
.league-v3-preview-analytics > .league-v3-player-watch-group,
.league-v3-preview-analytics > .league-v3-watch-group {
    width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.league-v3-preview-feature-card {
    opacity: .96;
}

.league-v3-preview-feature-toggle {
    cursor: default;
}

.league-v3-preview-inline-label {
    color: var(--color-muted);
    font-size: .7rem;
    font-weight: 700;
}

.league-v3-preview-prompt {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--bg-surface) 92%, var(--color-accent) 8%);
}

.league-v3-preview-prompt strong {
    color: var(--color-text);
    font-size: .95rem;
}

.league-v3-preview-prompt span {
    flex: 1 1 18rem;
    color: var(--color-muted);
    font-size: .78rem;
}

.league-v3-preview-prompt small {
    flex-basis: 100%;
    font-size: .72rem;
}

.league-v3-preview-group-title {
    margin-top: .15rem;
    color: var(--color-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.league-v3-preview-group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.league-v3-preview-group-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 4.25rem;
    padding: .7rem .8rem;
    cursor: default;
}

.league-v3-preview-group-card > span:last-child {
    min-width: 0;
}

.league-v3-preview-group-card strong,
.league-v3-preview-group-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-preview-group-card strong {
    color: var(--color-text);
    font-size: .82rem;
}

.league-v3-preview-group-card small {
    margin-top: .2rem;
    color: var(--color-muted);
    font-size: .7rem;
}

@media (max-width: 640px) {
    .league-v3-preview-prompt {
        align-items: flex-start;
        gap: .45rem .65rem;
        padding: .72rem .78rem;
    }

    .league-v3-preview-prompt .btn {
        width: 100%;
    }

    .league-v3-preview-group-grid {
        gap: .55rem;
    }

    .league-v3-preview-group-card {
        min-height: 3.8rem;
        padding: .6rem .65rem;
    }

    .league-preview-request-btn {
        width: auto !important;
        flex: 0 0 auto !important;
    }
}

/* League page presentation: reference-inspired structure using the existing FPL Pals theme. */
.league-v3-tabs {
    display: flex;
    align-items: stretch;
    gap: .25rem;
    margin: 1rem 0 1.15rem;
    padding: .25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}

.league-v3-tab {
    position: relative;
    flex: 1 1 0;
    min-height: 2.65rem;
    padding: .65rem .9rem;
    border: 0;
    border-radius: calc(var(--radius-lg) - .2rem);
    background: transparent;
    color: var(--color-muted);
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.league-v3-tab:hover,
.league-v3-tab:focus-visible {
    color: var(--color-text);
    background: color-mix(in srgb, var(--bg-surface-alt) 72%, transparent);
    outline: none;
}

.league-v3-tab.is-active {
    color: var(--color-accent);
    background: var(--bg-surface-alt);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 32%, transparent), 0 0 .9rem color-mix(in srgb, var(--color-accent) 12%, transparent);
}

.league-v3-analytics-view {
    min-width: 0;
}

.league-v3-pinned {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    margin-bottom: 1.1rem;
}

.league-v3-pinned-card {
    min-width: 0;
    padding: .85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.league-v3-pinned-card--accent {
    border-color: color-mix(in srgb, var(--color-accent) 44%, var(--color-border));
}

.league-v3-pinned-card--muted {
    opacity: .84;
}

.league-v3-pinned-label,
.league-v3-eyebrow {
    display: block;
    color: var(--color-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.league-v3-pinned-card strong {
    display: block;
    overflow: hidden;
    margin-top: .35rem;
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-pinned-card--accent strong {
    color: var(--color-accent);
}

.league-v3-pinned-card small {
    display: block;
    margin-top: .22rem;
    overflow: hidden;
    color: var(--color-muted);
    font-size: .74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-carousel-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: .4rem 0 .55rem;
}

.league-v3-carousel-intro h2 {
    margin: .2rem 0 0;
    font-size: 1.15rem;
}

.league-v3-carousel-hint {
    flex: 0 0 auto;
    color: var(--color-muted);
    font-size: .74rem;
}

.league-v3-analytics-shell {
    min-width: 0;
}

.league-v3-analytics-shell > .gw-analytics {
    margin-bottom: 0;
    border-color: var(--color-border);
    background: transparent;
    box-shadow: none;
}

.league-v3-analytics-shell .gw-analytics-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: .75rem;
    margin-right: -.15rem;
    margin-left: -.15rem;
    padding: .15rem .15rem .8rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.league-v3-analytics-shell .gw-analytics-grid::-webkit-scrollbar {
    height: .35rem;
}

.league-v3-analytics-shell .gw-analytics-grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--color-border-strong, var(--color-border));
}

.league-v3-analytics-shell .gw-analytics-tile,
.league-v3-analytics-shell .gw-analytics-tile--wide {
    flex: 0 0 min(82vw, 20rem);
    min-height: 8.5rem;
    grid-column: auto;
    scroll-snap-align: start;
}

.league-v3-analytics-shell .h2h-analytics-grid .gw-analytics-tile {
    flex-basis: min(78vw, 19rem);
}

.league-v3-analytics-shell .gw-analytics > .card-section-header {
    margin-top: .4rem;
}

.league-v3-analytics-shell .gw-collapse-toggle {
    padding-right: .1rem;
    padding-left: .1rem;
}

.league-v3-analytics-shell .h2h-analytics-match-score {
    gap: .5rem;
}

.league-v3-standings-view {
    margin-top: 0;
}

@media (max-width: 640px) {
    .league-v3-tabs {
        margin-top: .7rem;
        margin-bottom: .8rem;
    }

    .league-v3-tab {
        min-height: 2.35rem;
        padding: .52rem .45rem;
        font-size: .78rem;
    }

    .league-v3-pinned {
        grid-auto-columns: minmax(9.25rem, 1fr);
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: .2rem;
        scrollbar-width: none;
    }

    .league-v3-pinned::-webkit-scrollbar {
        display: none;
    }

    .league-v3-pinned-card {
        padding: .72rem .78rem;
    }

    .league-v3-carousel-intro h2 {
        font-size: 1rem;
    }

    .league-v3-analytics-shell .gw-analytics-grid {
        gap: .55rem;
    }

    .league-v3-analytics-shell .gw-analytics-tile,
    .league-v3-analytics-shell .gw-analytics-tile--wide,
    .league-v3-analytics-shell .h2h-analytics-grid .gw-analytics-tile {
        flex-basis: min(84vw, 18.5rem);
    }
}

/* â”€â”€ Settings â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.settings-toggle-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.settings-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: var(--text-sm);
    transition: background var(--transition-fast);
    min-height: 44px;
}

.settings-toggle:hover {
    background: var(--bg-card-hover);
}

.settings-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}

.notification-preferences-modal {
    width: min(640px, calc(100vw - 2rem));
    max-height: min(84dvh, 680px);
}

.notification-preferences-modal .admin-modal-header {
    padding: 0.85rem 1rem;
}

.notification-preferences-body {
    overflow-y: auto;
    padding: 0.65rem 1rem 0.8rem;
    gap: 0;
    font-size: 0.82rem;
}

.notification-preference-columns,
.notification-preference-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 46px;
    align-items: center;
    gap: var(--space-2);
}

.notification-preference-columns {
    padding: 0 0.35rem 0.25rem;
    color: var(--text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.notification-preference-channel {
    text-align: center;
}

.notification-preference-row {
    padding: 0.28rem 0.35rem;
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent;
    font-size: 0.82rem;
}

.notification-preference-row p {
    line-height: 1.2;
    margin-top: 0.15rem !important;
}

.notification-preference-row-live {
    border-bottom: 0;
    padding-bottom: 0;
}

.notification-preference-row input[type="checkbox"],
.notification-preference-inline-toggles input[type="checkbox"] {
    width: 19px;
    height: 19px;
    justify-self: center;
    accent-color: var(--color-accent);
}

.notification-preference-details {
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent;
    overflow: hidden;
}

.notification-preference-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0.38rem 0.35rem;
    font-size: 0.82rem;
    cursor: pointer;
    list-style: none;
}

.notification-preference-details summary::-webkit-details-marker {
    display: none;
}

.notification-details-chevron {
    color: var(--text-muted);
    font-size: 1rem;
    transition: transform var(--transition-fast);
}

.notification-preference-details[open] .notification-details-chevron {
    transform: rotate(180deg);
}

.notification-preference-details-body {
    padding: 0 0.35rem 0.55rem 0.85rem;
}

.notification-event-columns,
.notification-event-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    align-items: center;
    gap: var(--space-2);
}

.notification-event-columns {
    padding: 0.28rem 0;
    color: var(--text-muted);
    font-size: 0.62rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.notification-event-columns span:first-child {
    text-align: left;
}

.notification-event-row {
    min-height: 24px;
    border-top: 1px solid var(--border-light);
    font-size: 0.74rem;
}

.notification-event-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    justify-self: center;
    accent-color: var(--color-accent);
}

.notification-preference-inline-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.notification-preference-inline-toggles label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-base);
    font-size: var(--text-sm);
}

@media (max-width: 520px) {
    .notification-preference-columns,
    .notification-preference-row {
        grid-template-columns: minmax(0, 1fr) 44px 44px;
        gap: var(--space-2);
    }

    .notification-preference-row {
        padding: 0.28rem 0.2rem;
    }

    .notification-event-columns,
    .notification-event-row {
        grid-template-columns: minmax(0, 1fr) 40px 40px;
    }
}

.settings-sub-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}

.admin-metric {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

.admin-metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.admin-metric-value {
    font-size: 1.15rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .admin-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.settings-sub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
}

.settings-sub-info {
    min-width: 0;
    flex: 1;
}

.settings-sub-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .settings-toggle-list {
        grid-template-columns: 1fr;
    }

    .settings-sub-item {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-sub-actions {
        margin-top: var(--space-2);
    }
}

/* â”€â”€ Notifications â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.notif-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast);
}

.notif-item:hover {
    border-color: var(--text-muted);
}

.notif-info {
    min-width: 0;
    flex: 1;
}

.notif-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.notifications-page {
    width: min(100%, 860px);
}

.notification-category + .notification-category {
    margin-top: var(--space-6);
}

.notification-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
    padding: 0 var(--space-1);
}

.notification-category-title {
    margin: 0;
    color: var(--text-base);
    font-size: var(--text-lg);
    font-weight: 700;
}

.notification-category-description {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.notification-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.4rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 55%, var(--border-color));
    border-radius: 999px;
    color: var(--color-accent);
    font-size: var(--text-xs);
    font-weight: 700;
}

.notif-item-clickable {
    position: relative;
    cursor: pointer;
}

.notif-item-clickable:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--color-accent) 55%, var(--border-color));
}

.notif-item-clickable:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.notification-item-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: 0.35rem;
}

.notification-type-label {
    color: var(--color-accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.notification-time {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.notification-mark-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    margin-top: 0.1rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.notification-mark-read svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.notification-mark-read:hover,
.notification-mark-read:focus-visible {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
    color: var(--color-accent);
    outline: none;
}

@media (max-width: 520px) {
    .notification-category + .notification-category {
        margin-top: var(--space-5);
    }

    .notification-category-header {
        gap: var(--space-2);
        padding: 0;
    }

    .notification-category-title {
        font-size: var(--text-base);
    }

    .notification-category-description {
        max-width: 28rem;
        line-height: 1.35;
    }

    .notif-item {
        gap: var(--space-2);
        padding: var(--space-3);
    }

    .notification-item-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.1rem;
    }
}

/* â”€â”€ Animations â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Soft fade kept for non-layout nodes. Do NOT apply opacity animation to
   .content-body â€” it creates a stacking context that traps position:fixed
   overlays under .content-header / .bottom-nav. */
@keyframes fade-in-soft {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
    animation: fade-in 0.4s ease-out forwards;
}

/* No animation: opacity/animation on .content-body traps fixed modals under chrome */
.content-body.animate-fade-in {
    animation: none;
}

.animate-scale-in {
    animation: scale-in 0.3s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

/* â”€â”€ Hamburger Button (visible only on mobile) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

/* â”€â”€ Sidebar Overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: calc(var(--z-sticky) - 1);
}

/* â”€â”€ Floating Action Button (Chat) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fab-chat {
    position: fixed;
    bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
    right: calc(var(--space-6) + env(safe-area-inset-right, 0px));
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(145deg, rgba(42, 42, 48, 0.96) 0%, rgba(16, 16, 20, 0.94) 52%, rgba(30, 30, 36, 0.95) 100%);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 255, 135, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    z-index: var(--z-fab);
    transition: background var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    isolation: isolate;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.48),
        0 0 10px rgba(0, 255, 135, 0.09),
        0 0 0 1px rgba(0, 255, 135, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fab-chat-breathe 4.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.fab-chat::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(0, 255, 135, 0.14) 0%, rgba(0, 255, 135, 0.05) 42%, transparent 70%);
    opacity: 0.62;
    pointer-events: none;
    z-index: -1;
    animation: fab-chat-breathe-halo 4.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes fab-chat-breathe {
    0%, 100% {
        border-color: rgba(0, 255, 135, 0.14);
        box-shadow:
            0 10px 28px rgba(0, 0, 0, 0.48),
            0 0 9px rgba(0, 255, 135, 0.08),
            0 0 0 1px rgba(0, 255, 135, 0.13),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        border-color: rgba(0, 255, 135, 0.22);
        box-shadow:
            0 11px 30px rgba(0, 0, 0, 0.5),
            0 0 14px rgba(0, 255, 135, 0.13),
            0 0 0 1px rgba(0, 255, 135, 0.19),
            inset 0 1px 0 rgba(255, 255, 255, 0.11);
    }
}

@keyframes fab-chat-breathe-halo {
    0%, 100% {
        opacity: 0.52;
        transform: scale(1);
    }
    50% {
        opacity: 0.78;
        transform: scale(1.035);
    }
}

.fab-chat svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.fab-chat:hover {
    color: #ffffff;
    border-color: rgba(0, 255, 135, 0.32);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(0, 255, 135, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.fab-chat.is-dragging {
    cursor: grabbing;
    transition: none;
    animation: none;
    z-index: calc(var(--z-fab) + 2);
    border-color: rgba(0, 255, 135, 0.45);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.58),
        0 0 0 1px rgba(0, 255, 135, 0.22);
}

.fab-chat.is-dragging::before {
    animation: none;
    opacity: 0.35;
}

.fab-chat--open {
    animation: none;
    background: linear-gradient(145deg, rgba(28, 28, 32, 0.98) 0%, rgba(12, 12, 16, 0.96) 100%);
    color: var(--color-accent);
    border: 1px solid rgba(0, 255, 135, 0.38);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(0, 255, 135, 0.15);
}

.fab-chat--open::before {
    animation: none;
    opacity: 0.45;
}

@media (prefers-reduced-motion: reduce) {
    .fab-chat,
    .fab-chat::before {
        animation: none !important;
    }
}

.fab-chat.is-positioned {
    right: auto;
    bottom: auto;
}

button.fab-chat {
    cursor: grab;
}

.fab-chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    background: var(--color-magenta);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--bg-primary);
}

/* â”€â”€ Discord-style Chat Shell â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.chat-shell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-shrink: 0;
    min-height: 52px;
}

.chat-shell-header--conversation {
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    min-height: 58px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 96%, #fff 4%), var(--bg-card));
}

.chat-shell-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.chat-shell-back:hover {
    background: rgba(255, 255, 255, 0.09);
}

.chat-shell-back svg {
    width: 1.2rem;
    height: 1.2rem;
}

.chat-shell-identity {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex: 1 1 auto;
    color: inherit;
    text-decoration: none;
    border-radius: 12px;
    padding: 0.15rem 0.35rem 0.15rem 0.1rem;
    margin-right: 0.15rem;
    -webkit-tap-highlight-color: transparent;
}

.chat-shell-identity:hover {
    color: inherit;
    background: rgba(255, 255, 255, 0.04);
}

.chat-shell-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border-radius: 999px;
    background: var(--chat-avatar-bg, var(--color-accent));
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

.chat-shell-identity-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.chat-shell-header-meta {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.chat-shell-eyebrow {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    line-height: 1.15;
}

.chat-shell-title {
    font-size: clamp(0.88rem, 3.8vw, 1.05rem);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.2;
}

.chat-shell-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    min-width: max-content;
}

.chat-messages {
    position: relative;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
}

.chat-messages-empty {
    margin-top: auto;
    margin-bottom: auto;
    flex: 0 0 auto;
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
}

.chat-messages-empty strong {
    color: var(--text-secondary);
}

.chat-load-older {
    flex: 0 0 auto;
    text-align: center;
    padding: var(--space-2) 0 var(--space-3);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.chat-jump-pill {
    position: absolute;
    bottom: var(--space-3);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: 0 var(--space-4);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.chat-jump-pill:hover {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

/* Message rows (Discord-style) */
.chat-msg {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: var(--space-3);
    padding: 2px var(--space-2);
    border-radius: var(--radius-lg);
    animation: chat-msg-in 180ms ease;
}

.chat-msg:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chat-msg-own {
    background: rgba(0, 255, 135, 0.04);
}

.chat-msg-own:hover {
    background: rgba(0, 255, 135, 0.07);
}

.chat-msg-bot {
    background: rgba(55, 0, 60, 0.18);
}

.chat-msg-bot:hover {
    background: rgba(55, 0, 60, 0.28);
}

.chat-msg-grouped {
    grid-template-columns: 36px 1fr;
    padding-top: 0;
    padding-bottom: 0;
}

.chat-msg-grouped .chat-msg-avatar-slot {
    visibility: hidden;
}

.chat-msg-avatar-slot {
    padding-top: 2px;
}

.chat-msg-body {
    position: relative;
    min-width: 0;
}

.chat-msg-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: 2px;
    padding-right: 28px;
}

.chat-msg-author {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.chat-msg-author-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.chat-msg-team {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.chat-msg-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.chat-msg-edited {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-style: italic;
}

.chat-msg-content {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-primary);
}

.demo-chat-live-guide {
    margin: 0 0 .75rem;
    padding: .75rem .9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: .78rem;
}

.demo-chat-live-guide__title {
    color: var(--text-primary);
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.demo-chat-live-guide p {
    margin: 0;
    line-height: 1.45;
}

.demo-chat-live-guide__link {
    display: inline-block;
    margin-top: .4rem;
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Admin dashboard refresh: keep the existing actions/data, but give the
   workspace enough room to be scanned comfortably on desktop and mobile. */
.admin-dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: var(--space-4) !important;
    margin-bottom: var(--space-5) !important;
}

.admin-dashboard-grid > .card {
    position: relative;
    min-height: 128px;
    align-items: flex-start !important;
    justify-content: space-between !important;
    text-align: left !important;
    padding: 1.25rem !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.admin-dashboard-alert {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-danger);
}

.admin-dashboard-grid > .card h3 {
    margin-bottom: 0.6rem !important;
}

.admin-dashboard-grid > .card .text-2xl {
    font-size: 1.75rem;
    line-height: 1;
    flex: 0 0 1.35rem;
}

.pl-fixture-select {
    min-width: 72px;
    width: auto;
}

.admin-usage-modal {
    width: min(1220px, calc(100vw - 2rem));
    max-height: min(94dvh, 980px);
}

.admin-usage-modal .admin-modal-header {
    padding: 1.1rem 1.5rem;
    background: var(--bg-secondary);
}

.admin-usage-modal .admin-modal-title {
    font-size: 1.25rem;
}

.admin-usage-modal-body {
    padding: 1.5rem 1.75rem 2rem;
    gap: 1.25rem;
}

.admin-usage-modal .card-section-header {
    margin-top: 0.75rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-usage-modal .card-section-title {
    font-size: 1.05rem;
}

.admin-usage-modal .admin-metrics-grid {
    gap: var(--space-3);
}

.admin-usage-modal .admin-metric {
    min-height: 104px;
    border: 1px solid var(--border-light);
    box-shadow: none;
}

.admin-usage-modal .admin-grid-shell {
    background: var(--bg-secondary);
}

.admin-usage-modal .admin-grid-scroll {
    max-height: min(390px, 42vh);
}

.admin-usage-modal .admin-grid thead th {
    padding-top: 12px;
    padding-bottom: 12px;
}

.admin-usage-modal .admin-grid tbody td {
    padding-top: 13px;
    padding-bottom: 13px;
}

@media (max-width: 1100px) {
    .admin-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .admin-usage-modal {
        width: min(960px, calc(100vw - 1.5rem));
    }
}

@media (max-width: 768px) {
    .admin-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: var(--space-2) !important;
    }

    .admin-dashboard-grid > .card {
        min-height: 112px;
        padding: 1rem !important;
    }

    .admin-dashboard-grid > .card .text-2xl {
        font-size: 1.45rem;
    }

    .admin-usage-modal {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: var(--radius-md);
    }

    .admin-usage-modal .admin-modal-header {
        padding: 1rem;
    }

    .admin-usage-modal .admin-modal-title {
        font-size: 1.05rem;
    }

    .admin-usage-modal-body {
        padding: 1rem;
        gap: 1rem;
    }

    .admin-usage-modal .admin-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2);
    }

    .admin-usage-modal .admin-metric {
        min-height: 96px;
        padding: 0.85rem;
    }

    .admin-usage-modal .admin-metric-label {
        font-size: 0.68rem;
    }

    .admin-usage-modal .admin-metric-value {
        font-size: 1.05rem;
    }

    .admin-usage-modal .admin-grid-scroll {
        max-height: 45vh;
    }

    .admin-usage-modal .card-section-header {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .admin-monitor-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-2);
    }

    .admin-monitor-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .admin-monitor-panel-heading {
        padding: 0.85rem 0.9rem;
    }
}

@media (max-width: 430px) {
    .admin-dashboard-grid > .card {
        min-height: 104px;
        padding: 0.85rem !important;
    }

    .admin-dashboard-grid > .card h3 {
        font-size: 0.78rem;
    }

    .admin-usage-modal .admin-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.chat-bot-rich-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-primary);
}

.chat-bot-section-title {
    margin-top: 5px;
    color: var(--accent, #00ff87);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chat-bot-fact-row {
    display: grid;
    grid-template-columns: 5px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
}

.chat-bot-fact-mark {
    width: 4px;
    height: 4px;
    margin-top: 0.45em;
    border-radius: 50%;
    background: var(--accent, #00ff87);
    box-shadow: 0 0 7px color-mix(in srgb, var(--accent, #00ff87) 55%, transparent);
}

.chat-bot-rich-content strong {
    color: var(--text-primary);
    font-weight: 750;
}

.chat-bot-underlined {
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent, #00ff87) 70%, transparent);
    text-underline-offset: 2px;
}

.chat-bot-rich-paragraph {
    margin: 0;
}

.chat-msg-content-deleted {
    color: var(--text-muted);
    font-style: italic;
}

.chat-upgrade-cta-link {
    display: inline;
    margin-top: var(--space-2);
    padding: 0;
    border: none;
    background: none;
    color: var(--accent, #00ff87);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.chat-upgrade-cta-link:hover {
    filter: brightness(1.12);
}

.chat-upgrade-section-title {
    margin: 0 0 var(--space-2);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chat-upgrade-tier-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.chat-upgrade-tier-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: var(--space-2);
    align-items: baseline;
    font-size: 0.85rem;
}

.chat-upgrade-tier-name {
    font-weight: 700;
}

.chat-upgrade-tier-price {
    color: var(--accent, #00ff87);
    font-weight: 600;
}

.chat-upgrade-tier-tag {
    color: var(--text-muted);
}

.chat-upgrade-status {
    color: var(--accent, #00ff87);
}

/* Messenger-style message layout: identity stays outside the message bubble. */
.chat-msg {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 4px var(--space-2);
    background: transparent;
}

.chat-msg:hover,
.chat-msg-own,
.chat-msg-own:hover,
.chat-msg-bot,
.chat-msg-bot:hover {
    background: transparent;
}

.chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: min(760px, 86%);
}

.chat-msg-meta {
    width: 100%;
    margin-bottom: 4px;
    padding-right: 0;
}

.chat-msg-avatar-slot {
    padding-top: 22px;
}

.chat-msg-grouped .chat-msg-avatar-slot {
    padding-top: 0;
}

.chat-msg-content,
.chat-msg-body > .chat-bot-rich-content {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 9px 13px;
    border-radius: 4px 18px 18px 18px;
    background: var(--bg-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.chat-msg-content {
    line-height: 1.42;
}

.chat-msg-own {
    grid-template-columns: minmax(0, 1fr);
    justify-items: end;
}

.chat-msg-own .chat-msg-avatar-slot {
    display: none;
}

.chat-msg-own .chat-msg-body {
    align-items: flex-end;
    max-width: min(760px, 86%);
}

.chat-msg-own .chat-msg-meta {
    justify-content: flex-end !important;
    text-align: right;
}

.chat-msg-own .chat-msg-author-block {
    display: none !important;
}

.chat-msg-own .chat-msg-content,
.chat-msg-own .chat-msg-body > .chat-bot-rich-content {
    border-radius: 18px 4px 18px 18px;
    background: color-mix(in srgb, var(--color-accent) 22%, var(--bg-card));
}

.chat-msg-grouped .chat-msg-content,
.chat-msg-grouped .chat-msg-body > .chat-bot-rich-content {
    border-top-left-radius: 8px;
}

.chat-msg-own.chat-msg-grouped .chat-msg-content,
.chat-msg-own.chat-msg-grouped .chat-msg-body > .chat-bot-rich-content {
    border-top-left-radius: 18px;
    border-top-right-radius: 8px;
}

.chat-msg-reactions,
.chat-upgrade-cta-link,
.chat-msg-body > .chat-msg-reply-quote {
    max-width: 100%;
}

@media (max-width: 640px) {
    .chat-msg-body,
    .chat-msg-own .chat-msg-body {
        max-width: 92%;
    }

    .chat-msg-content,
    .chat-msg-body > .chat-bot-rich-content {
        padding: 8px 11px;
    }
}

.chat-msg-reply-quote {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 var(--space-2);
    padding: 6px 10px;
    border: none;
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-sans);
    overflow: hidden;
    box-sizing: border-box;
}

.chat-msg-reply-quote:hover {
    background: rgba(255, 255, 255, 0.08);
}

.chat-msg-reply-quote-author {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.chat-msg-reply-quote-text {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.chat-msg-actions {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-2);
    opacity: 0;
    transition: opacity var(--transition-fast);
    margin-top: 2px;
}

.chat-msg:hover .chat-msg-actions,
.chat-msg:focus-within .chat-msg-actions,
.chat-msg-picker-open .chat-msg-actions {
    opacity: 1;
}

.chat-msg-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.chat-reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 24px;
    padding: 0 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    line-height: 1;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.chat-reaction-chip:hover {
    background: rgba(0, 255, 135, 0.08);
    border-color: rgba(0, 255, 135, 0.28);
    color: var(--text-primary);
}

.chat-reaction-chip-mine {
    background: rgba(0, 255, 135, 0.12);
    border-color: rgba(0, 255, 135, 0.4);
    color: var(--text-primary);
}

.chat-reaction-emoji {
    font-size: 13px;
    line-height: 1;
}

.chat-reaction-count {
    font-variant-numeric: tabular-nums;
}

.chat-reaction-picker {
    /* Fixed tray â€” escapes chat-messages overflow + sits above header/footer */
    position: fixed;
    left: 50%;
    bottom: calc(var(--app-bottom-chrome, 0px) + 4.75rem);
    transform: translateX(-50%);
    z-index: calc(var(--z-overlay) + 1);
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(18, 22, 28, 0.96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    max-width: calc(100vw - 2rem);
    flex-wrap: wrap;
    justify-content: center;
}

.chat-reaction-picker-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.chat-reaction-picker-btn:hover,
.chat-reaction-picker-btn.is-selected {
    background: rgba(0, 255, 135, 0.12);
    transform: scale(1.08);
}

.chat-reaction-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    background: rgba(0, 0, 0, 0.35);
}

.chat-msg-reply-btn {
    min-height: 28px;
    padding: 0 var(--space-2);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}

.chat-msg-reply-btn:hover {
    color: var(--color-accent);
    background: rgba(0, 255, 135, 0.08);
}

.chat-msg-delete-btn:hover {
    color: var(--color-danger);
    background: rgba(233, 0, 82, 0.12);
}

.chat-msg-x {
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    padding: 0;
    transition: opacity var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.chat-msg-x svg {
    width: 14px;
    height: 14px;
}

.chat-msg:hover .chat-msg-x,
.chat-msg:focus-within .chat-msg-x {
    opacity: 1;
}

.chat-msg-x:hover {
    color: var(--color-danger);
    background: rgba(233, 0, 82, 0.12);
}

.chat-msg-flash {
    animation: chat-msg-flash 1.1s ease;
}

@keyframes chat-msg-flash {
    0%, 100% { background: transparent; }
    35% { background: rgba(0, 255, 135, 0.12); }
}

.chat-dialog-backdrop {
    position: fixed;
    inset: 0;
    /* Above app chrome (--z-sticky) and FABs (--z-fab) */
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Keep dialog in the gap between app chrome (header + mobile bottom nav) */
    --chat-dialog-pad-top: calc(var(--app-header-offset) + var(--space-2));
    --chat-dialog-pad-bottom: max(var(--space-4), calc(var(--app-bottom-chrome) + var(--space-2)));
    /* % max-height ignores padding; explicit height so the shell fits the padded area */
    --chat-dialog-max-height: calc(100dvh - var(--chat-dialog-pad-top) - var(--chat-dialog-pad-bottom));
    padding:
        var(--chat-dialog-pad-top)
        max(var(--space-4), env(safe-area-inset-right, 0px))
        var(--chat-dialog-pad-bottom)
        max(var(--space-4), env(safe-area-inset-left, 0px));
    overflow: hidden;
    box-sizing: border-box;
}

.chat-dialog {
    width: min(360px, 100%);
    max-height: var(--chat-dialog-max-height, min(90dvh, 720px));
    min-height: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.chat-dialog-title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-lg);
    font-weight: 800;
}

.chat-dialog-text {
    margin: 0 0 var(--space-4);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.chat-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

.push-prompt-backdrop {
    z-index: calc(var(--z-modal) + 2);
}

.push-prompt-dialog {
    position: relative;
    width: min(20.5rem, 100%);
    padding: 1rem 1rem 0.85rem;
    text-align: center;
}

.push-prompt-close {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.push-prompt-close svg {
    width: 0.9rem;
    height: 0.9rem;
}

.push-prompt-close:hover {
    background: var(--bg-card-hover, rgba(255, 255, 255, 0.06));
    color: var(--text-primary);
}

.push-prompt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0.1rem auto 0.55rem;
    border-radius: 999px;
    color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.push-prompt-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.push-prompt-title {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.push-prompt-copy {
    margin: 0 0 0.85rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.35;
}

.push-prompt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.push-prompt-actions .btn {
    width: 100%;
    min-height: 40px;
    padding: 0.65rem 0.75rem;
}

.push-prompt-mute {
    display: inline-flex;
    margin: 0.55rem auto 0;
    padding: 0.15rem;
    border: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.push-prompt-mute:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Soft alert notice â€” reuses chat-dialog shell, avoids harsh red banners */
.notice-dialog-backdrop {
    z-index: var(--z-modal);
}

.notice-dialog {
    border-color: rgba(245, 166, 35, 0.35);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(245, 166, 35, 0.12);
}

.notice-dialog .chat-dialog-title {
    color: var(--text-primary);
}

.notice-dialog .chat-dialog-text {
    color: var(--text-secondary);
    line-height: var(--leading-normal);
}

.btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(1.08);
}

.chat-reply-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.55rem 0.55rem 0.35rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.035);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.chat-reply-bar-accent {
    width: 3px;
    align-self: stretch;
    border-radius: 999px;
    background: var(--color-accent);
    flex: 0 0 3px;
}

.chat-reply-bar-body {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.chat-reply-bar-meta {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-reply-bar-meta strong {
    color: var(--color-accent);
    font-weight: 800;
}

.chat-reply-bar-preview {
    display: block;
    font-size: 0.78rem;
    color: color-mix(in srgb, var(--text-primary) 70%, var(--text-muted));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.chat-reply-bar-clear {
    width: 1.85rem;
    height: 1.85rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex: 0 0 1.85rem;
}

.chat-reply-bar-clear svg {
    width: 0.85rem;
    height: 0.85rem;
}

.chat-reply-bar-clear:hover {
    color: var(--color-danger);
    background: rgba(233, 0, 82, 0.14);
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-avatar-bot {
    padding: 0;
    border-width: 2px;
    background: transparent;
}

.chat-avatar-bot--banter { border-color: #ff8a3d; }
.chat-avatar-bot--analyst { border-color: #4aa3d9; }
.chat-avatar-bot--recap { border-color: #2ec4a0; }
.chat-avatar-bot--assistant { border-color: #00ff87; }
.chat-avatar-bot--advisor { border-color: #6fcf6f; }
.chat-avatar-bot--default { border-color: #5a1060; }

.chat-bot-face {
    width: 100%;
    height: 100%;
    display: block;
}

.chat-bot-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: var(--color-accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.6;
    vertical-align: middle;
}

.chat-role-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.6;
    vertical-align: middle;
}

.chat-role-pro {
    background: rgba(0, 255, 135, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(0, 255, 135, 0.35);
}

.chat-role-admin {
    background: rgba(4, 245, 255, 0.12);
    color: var(--color-info);
    border: 1px solid rgba(4, 245, 255, 0.35);
}

.plan-picker-dialog {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    width: min(480px, 100%);
    /* Inherit chrome-aware height from backdrop; cap desktop tallness */
    max-height: min(720px, var(--chat-dialog-max-height, 90dvh));
    min-height: 0;
    overflow: hidden; /* shell clips; inner .plan-tier-list scrolls */
}

/* Chat upgrade options â€” after .chat-dialog / .plan-picker so padding & height win */
.chat-upgrade-options-backdrop {
    /* Same temporary-overlay tier as other modals */
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.55);
    outline: none;
}

.chat-dialog.plan-picker-dialog.chat-upgrade-options-dialog {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    width: min(480px, 100%);
    max-height: min(90dvh, var(--chat-dialog-max-height, 90dvh));
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.chat-upgrade-options-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-4) var(--space-3);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-upgrade-options-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 0;
}

.chat-upgrade-options-close {
    flex-shrink: 0;
    line-height: 1;
}

.chat-upgrade-options-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: var(--space-4);
}

.chat-upgrade-options-dialog .chat-upgrade-section {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-upgrade-options-dialog .chat-upgrade-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.chat-upgrade-options-dialog .plan-picker-cancel {
    margin-top: var(--space-3);
}

.plan-picker-header {
    flex-shrink: 0;
}

.plan-picker-lede {
    margin-bottom: var(--space-3);
}

.plan-picker-cancel {
    flex-shrink: 0;
    margin-top: var(--space-3);
}

.plan-tier-card-form {
    display: contents;
}

.plan-tier-card-form .plan-tier-card {
    width: 100%;
}

.plan-tier-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Scroll the tier cards when the picker is taller than the chrome-aware area */
.plan-picker-dialog > .plan-tier-list,
.plan-picker-dialog > .personal-pro-upgrade > .plan-tier-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.plan-picker-dialog > .personal-pro-upgrade {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* Keep header / cancel / pending CTA out of the scroll region */
.plan-picker-dialog > .personal-pro-upgrade > :not(.plan-tier-list) {
    flex-shrink: 0;
}

.plan-tier-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font-family: var(--font-sans);
}

.plan-tier-card:hover:not(:disabled) {
    border-color: var(--color-accent);
}

.plan-tier-card-featured {
    border-color: rgba(0, 255, 135, 0.45);
    background: linear-gradient(160deg, rgba(0, 255, 135, 0.08), var(--bg-tertiary) 55%);
}

.plan-tier-card-selected,
.plan-tier-card-selected.plan-tier-card-featured {
    border-color: rgba(0, 255, 135, 0.75);
    box-shadow:
        0 0 0 1px rgba(0, 255, 135, 0.35),
        0 0 22px rgba(0, 255, 135, 0.18);
    background: linear-gradient(160deg, rgba(0, 255, 135, 0.12), var(--bg-tertiary) 55%);
}

.plan-tier-card:focus-visible {
    outline: 2px solid rgba(0, 255, 135, 0.55);
    outline-offset: 2px;
}

.plan-tier-pay-btn {
    margin-top: var(--space-2);
    align-self: stretch;
}

.plan-tier-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    width: 100%;
}

.plan-tier-name {
    font-weight: 800;
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.plan-tier-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-inverse);
    background: var(--color-accent);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.plan-tier-price {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.plan-tier-price-note {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
}

.plan-tier-tagline {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.plan-tier-bullets {
    margin: var(--space-1) 0 0;
    padding-left: 1.1rem;
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-tier-bullets li {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.4;
}

.plan-tier-cta {
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-accent);
}

.payment-confirm-backdrop {
    z-index: var(--z-modal-nested);
}

.payment-confirm-dialog {
    max-width: 360px;
}

.payment-confirm-plan {
    font-weight: 700;
    color: var(--text-primary);
}

.payment-confirm-price {
    font-weight: 700;
    color: var(--color-accent);
}

.plan-tier-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Inherits .chat-dialog-backdrop z-index (--z-modal); keep class for targeting */
.personal-pro-upgrade-dialog {
    max-width: 420px;
}

.personal-pro-tier-card {
    cursor: pointer;
}

.personal-pro-tier-card[aria-disabled="true"] {
    cursor: default;
    pointer-events: none;
}

.personal-pro-tier-card .plan-tier-price {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
}

.personal-pro-tier-card .plan-tier-bullets {
    width: 100%;
}

/* Keep legacy sell helpers for any remaining surfaces */
.personal-ai-sell {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.personal-ai-sell-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.personal-ai-sell-amount {
    font-size: clamp(2rem, 8vw, 2.75rem);
    font-weight: 900;
    line-height: 1;
    color: var(--color-accent);
}

.personal-ai-sell-once {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.personal-ai-sell-headline {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
}

.personal-ai-sell-subhead {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.personal-ai-sell-bullets {
    margin: 0;
    padding-left: 1.1rem;
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.personal-ai-sell-bullets li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

.personal-ai-sell-cta {
    width: 100%;
}

.personal-pro-sell .personal-ai-sell-amount {
    font-size: 2.25rem;
}

.personal-ai-log {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-height: 360px;
    overflow-y: auto;
}

.personal-ai-turn {
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.personal-ai-turn-user {
    border-left: 3px solid var(--color-accent);
}

.personal-ai-turn-assistant {
    border-left: 3px solid var(--color-info);
}

.personal-ai-role {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.personal-ai-text {
    font-size: var(--text-sm);
    line-height: 1.5;
    white-space: pre-wrap;
}

.personal-ai-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.personal-ai-rivals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding: var(--space-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}

.personal-ai-rival {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

.personal-ai-rival input {
    margin-top: 3px;
}

.personal-ai-focus-bar {
    flex-shrink: 0;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    max-height: 40%;
    overflow-y: auto;
}

.personal-ai-rivals--compact {
    max-height: 100px;
}

.personal-ai-msg-content {
    white-space: pre-wrap;
}

.chat-shell--personal .chat-shell-identity {
    cursor: default;
    pointer-events: none;
}

.chat-shell-compose {
    flex-shrink: 0;
    min-width: 0;
    width: 100%;
}

@media (max-width: 640px) {
    .personal-ai-focus-bar {
        max-height: 36%;
    }
}

/* Composer */
.chat-compose {
    position: relative;
    z-index: 20;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 88%, transparent), var(--bg-card));
    padding: 0.7rem 0.85rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    box-sizing: border-box;
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}

.chat-compose-status {
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
}

.chat-compose-row {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.chat-bot-picker {
    position: relative;
    flex-shrink: 0;
}

.chat-icon-btn {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}

.chat-icon-btn svg {
    width: 1.15rem;
    height: 1.15rem;
}

.chat-icon-btn:hover:not(:disabled) {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.09);
}

.chat-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-bot-add-btn.is-open {
    background: color-mix(in srgb, var(--color-accent) 16%, transparent);
    border-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
    color: var(--color-accent);
    transform: rotate(45deg);
}

.chat-compose-field {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.55rem;
    display: flex;
    align-items: center;
    border-radius: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chat-compose-field:focus-within {
    border-color: color-mix(in srgb, var(--color-accent) 42%, rgba(255, 255, 255, 0.1));
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 0 0 3px color-mix(in srgb, var(--color-accent) 14%, transparent);
}

.chat-bot-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    min-width: 220px;
    max-width: min(280px, 70vw);
    max-height: min(360px, 45vh);
    overflow-y: auto;
    padding: var(--space-2);
    border-radius: 16px;
    background: var(--bg-card) !important; background-color: #161616 !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    z-index: var(--z-dropdown);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-bot-menu-title {
    padding: 6px 10px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.chat-bot-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-sans);
    transition: background var(--transition-fast);
}

.chat-bot-menu-item:hover:not(:disabled) {
    background: var(--bg-card-hover);
}

.chat-bot-menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-bot-menu-item .chat-avatar {
    width: 32px;
    height: 32px;
}

.chat-bot-menu-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.chat-bot-menu-name {
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.2;
}

.chat-bot-menu-handle {
    font-size: 11px;
    color: var(--text-muted);
}

.chat-input-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.chat-mention-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    max-height: min(280px, 40vh);
    overflow-y: auto;
    padding: var(--space-2);
    border-radius: 16px;
    background: var(--bg-card) !important; background-color: #161616 !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    z-index: var(--z-dropdown);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-bot-menu-item.is-active,
.chat-mention-menu .chat-bot-menu-item:hover {
    background: var(--bg-card-hover);
}

.chat-bot-menu-item.is-locked {
    opacity: 0.85;
}

.chat-bot-plan-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #011e26;
    background: #00ff87;
}

.chat-upgrade-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(0, 255, 135, 0.2);
    background: linear-gradient(90deg, rgba(0, 255, 135, 0.1), transparent);
}

@media (max-width: 640px) {
    .chat-upgrade-banner {
        flex-direction: column;
        align-items: stretch;
    }
}

.chat-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    resize: none;
    box-sizing: border-box;
    min-height: 2.55rem;
    max-height: 7.5rem;
    border: 0 !important;
    border-radius: 1.35rem;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-primary);
    padding: 0.65rem 0.95rem;
    line-height: 1.25;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    outline: none;
}

.chat-input::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.chat-input:disabled {
    opacity: 0.55;
}

.chat-send-btn {
    flex: 0 0 2.55rem;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.chat-send-btn.is-ready:not(:disabled) {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.chat-send-btn.is-ready:hover:not(:disabled) {
    background: color-mix(in srgb, var(--color-accent) 88%, #fff);
    border-color: color-mix(in srgb, var(--color-accent) 88%, #fff);
    color: var(--color-primary);
}

.chat-send-btn:hover:not(:disabled):not(.is-ready) {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.09);
}

.chat-send-busy {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

/* Typing indicator */
.chat-typing-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: var(--space-3);
    padding: var(--space-2);
    align-items: center;
}

.chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
}

.chat-typing-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-left: var(--space-2);
}

.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: #c080cc;
    animation: chat-typing-bounce 1.4s infinite ease-in-out;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes chat-msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 1024px) {
    .hamburger-btn {
        display: flex;
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.5rem;
        --app-header-offset: calc(56px + var(--safe-area-top));
        --bottom-nav-height: 62px;
        --app-bottom-chrome: var(--bottom-nav-offset);
    }

    html.bottom-nav-compact {
        --bottom-nav-height: 46px;
    }

    .bottom-nav {
        display: flex;
    }

    /* Chat conversation: full-screen — hide floating chrome; in-chat back returns. */
    .page-wrapper:has(.chat-shell) .content-header,
    .page-wrapper:has(.chat-shell) .bottom-nav {
        display: none !important;
    }

    .main-content:has(.chat-shell) {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
    }

    .page-wrapper:has(.chat-shell) {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
    }

    .hamburger-btn {
        display: none !important;
    }

    .content-header {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        gap: 8px;
        min-height: calc(56px + var(--safe-area-top));
        padding-top: calc(8px + var(--safe-area-top));
        padding-left: calc(12px + var(--safe-area-left));
        padding-right: calc(12px + var(--safe-area-right));
        padding-bottom: 8px;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: var(--z-sticky);
        background: transparent;
        border-bottom: none;
        pointer-events: none;
    }

    .content-header a,
    .content-header button,
    .content-header details,
    .content-header summary {
        pointer-events: auto;
    }

    .header-cluster--main,
    .header-cluster--actions {
        display: contents;
    }

    .header-avatar-wrap,
    a.header-home-pill {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;
    }

    a.header-login-pill {
        display: flex;
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .header-avatar-wrap .header-context-menu {
        left: 0;
        right: auto;
    }

    .header-brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        align-self: center;
        width: max-content;
        max-width: 100%;
        gap: 6px;
        padding: 4px 12px 4px 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: none;
        backdrop-filter: blur(10px) saturate(1.1);
        -webkit-backdrop-filter: blur(10px) saturate(1.1);
    }

    .header-brand--guest-home {
        background: rgba(0, 255, 135, 0.14);
        border-color: rgba(0, 255, 135, 0.62);
        box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.2), 0 0 16px rgba(0, 255, 135, 0.2);
        animation: header-brand-guest-home-pulse 2.4s ease-in-out infinite;
    }

    .header-brand--guest-home:hover,
    .header-brand--guest-home:focus-visible {
        background: rgba(0, 255, 135, 0.2);
        border-color: rgba(0, 255, 135, 0.9);
        box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.35), 0 0 22px rgba(0, 255, 135, 0.32);
    }

    @keyframes header-brand-guest-home-pulse {
        0%, 100% {
            box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.2), 0 0 14px rgba(0, 255, 135, 0.16);
        }
        50% {
            box-shadow: 0 0 0 2px rgba(0, 255, 135, 0.45), 0 0 22px rgba(0, 255, 135, 0.3);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .header-brand--guest-home {
            animation: none;
        }
    }

    .header-login-desktop,
    .header-more-wrap {
        display: none !important;
    }

    .header-actions .header-notif-wrap {
        display: flex;
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .header-actions .header-icon-btn.header-notif-btn {
        width: 40px;
        height: 40px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: none;
        backdrop-filter: blur(10px) saturate(1.1);
        -webkit-backdrop-filter: blur(10px) saturate(1.1);
        color: var(--text-primary);
    }

    .header-actions .header-notif-btn.has-unread {
        color: var(--color-magenta);
        border-color: rgba(233, 0, 82, 0.45);
        background: rgba(255, 255, 255, 0.08);
    }

    .content-body {
        padding: var(--space-4);
        padding-top: calc(var(--app-header-offset) + var(--space-2));
        padding-bottom: calc(var(--space-4) + var(--bottom-nav-offset) + 80px);
    }

    .content-body:has(.home-landing) {
        padding-top: var(--app-header-offset);
    }

    .main-content {
        position: relative;
    }

    .content-body:has(.chat-shell) {
        padding: 0;
        overflow: hidden;
        height: 100%;
        max-height: 100%;
    }

    .content-body:has(.chat-shell) .chat-shell {
        margin-top: 0;
    }

    .chat-shell {
        border-bottom: 1px solid var(--border-color);
    }

    .chat-compose {
        padding: 0.65rem 0.7rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    .chat-compose-row {
        align-items: center;
    }

    .card {
        padding: var(--space-4);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-value {
        font-size: var(--text-2xl);
    }

    .hero-features {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .plan-picker-dialog {
        padding: var(--space-3);
        /* Stay within chrome-aware --chat-dialog-max-height from backdrop */
        max-height: var(--chat-dialog-max-height, 100dvh);
    }

    .chat-dialog.plan-picker-dialog.chat-upgrade-options-dialog {
        padding: 0;
        max-height: min(90dvh, var(--chat-dialog-max-height, 100dvh));
    }

    .chat-upgrade-options-header {
        padding: var(--space-3) var(--space-3) var(--space-2);
    }

    .chat-upgrade-options-body {
        padding: var(--space-3);
    }

    .plan-picker-lede {
        margin-bottom: var(--space-2);
    }

    .plan-picker-cancel {
        margin-top: var(--space-2);
    }

    .plan-picker-dialog .plan-tier-list {
        gap: var(--space-2);
    }

    .plan-picker-dialog .plan-tier-card {
        padding: var(--space-3);
        gap: 4px;
    }

    .plan-picker-dialog .plan-tier-price {
        font-size: var(--text-xl);
    }

    .plan-picker-dialog .plan-tier-tagline {
        font-size: var(--text-xs);
    }

    .home-tease-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .home-cta .btn,
    .home-chat-actions .btn,
    .home-featured-cta {
        width: 100%;
        justify-content: center;
    }

    .home-hero {
        min-height: auto;
        padding: var(--space-2) 0 0;
        margin-bottom: calc(var(--space-3) - var(--space-8));
    }

    .home-prompt-card,
    .home-prompt-card--featured {
        padding: var(--space-5);
    }

    .home-prompt-chip {
        font-size: var(--text-xs);
    }

    .breadcrumb-text {
        display: none;
    }

    .username-text {
        display: none;
    }

    .header-actions {
        gap: var(--space-2);
    }

    .brand-subtitle--header {
        display: none;
    }

    .brand-wordmark--header {
        font-size: 0.85rem;
    }

    .header-brand-logo {
        width: 28px;
        height: 28px;
    }

    .chat-shell-header {
        flex-wrap: nowrap;
    }

    .chat-shell-header-meta {
        flex: 1 1 auto;
        min-width: 0;
    }

    .chat-shell-actions {
        margin-left: auto;
        flex: 0 0 auto;
    }

    .chat-shell-header {
        gap: var(--space-2);
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }

    .chat-shell-header--conversation {
        padding: 0.65rem 0.7rem;
        min-height: 54px;
    }

    .chat-shell-title {
        font-size: clamp(0.82rem, 3.6vw, 0.98rem);
    }

    .chat-shell-actions .btn {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .chat-compose-row {
        align-items: center;
    }

    .page-wrapper:has(.chat-shell) .chat-shell-header {
        padding-top: calc(var(--space-3) + var(--safe-area-top));
    }

    .page-wrapper:has(.chat-shell) .chat-shell-header--conversation {
        padding-top: calc(0.65rem + var(--safe-area-top));
    }

    .fab-chat {
        /* Sit just above the bottom tab bar, viewport-fixed */
        bottom: calc(var(--bottom-nav-offset) + var(--space-3));
        right: calc(var(--space-4) + env(safe-area-inset-right, 0px));
        width: 56px;
        height: 56px;
    }

    .fab-chat svg {
        width: 26px;
        height: 26px;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .standings-table {
        display: table;
        min-width: 100%;
    }

    .hide-mobile {
        display: none !important;
    }

    .sidebar-brand {
        display: none;
    }
}

@media (max-width: 480px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.25rem;
    }

    .content-body {
        padding: var(--space-3);
        padding-top: calc(var(--app-header-offset) + var(--space-2));
        padding-bottom: calc(var(--space-3) + var(--bottom-nav-offset) + 80px);
    }

    .content-body:has(.chat-shell) {
        padding: 0;
    }

    .card {
        padding: var(--space-3);
        border-radius: var(--radius-md);
    }

    .btn-lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }
}

/* â”€â”€ Reduced Motion â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* â”€â”€ Scrollbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* â”€â”€ Utility Classes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-primary { color: var(--text-primary); }
.font-mono { font-family: 'Courier New', monospace; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.p-4 { padding: var(--space-4); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.w-full { width: 100%; }
.guest-preview-banner-inline {
    background: linear-gradient(135deg, rgba(23, 198, 113, 0.1) 0%, rgba(13, 153, 255, 0.1) 100%);
    border: 1px solid rgba(23, 198, 113, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.guest-preview-banner-inline-copy {
    display: flex;
    align-items: center;
}

.guest-preview-banner-text {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.guest-preview-banner-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
    transition: all 0.2s ease;
}

.guest-preview-banner-arrow:hover {
    background: var(--primary);
    color: white;
}.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.min-h-\[80vh\] { min-height: 80vh; }
.min-h-\[96px\] { min-height: 96px; }
.h-64 { height: 16rem; }
.h-\[70vh\] { height: 70vh; }
.hidden { display: none; }
.shrink-0 { flex-shrink: 0; }
.overflow-y-auto { overflow-y: auto; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.rounded-md { border-radius: var(--radius-md); }
.rounded-xl { border-radius: var(--radius-lg); }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-3 > * + * { margin-top: var(--space-3); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.tracking-wider { letter-spacing: 0.05em; }
.border { border: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }

/* Grid utilities */
.grid { display: grid; }
.md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.lg\:grid-cols-\[1\.5fr_1fr\] { grid-template-columns: 1.5fr 1fr; }
.lg\:grid-cols-\[2fr_1fr\] { grid-template-columns: 2fr 1fr; }
.pr-2 { padding-right: var(--space-2); }

/* Alert surfaces */
.bg-danger\/10 { background: rgba(233, 0, 82, 0.1); }
.border-danger\/20 { border-color: rgba(233, 0, 82, 0.2); }
.bg-success\/10 { background: rgba(0, 255, 135, 0.1); }
.border-success\/20 { border-color: rgba(0, 255, 135, 0.2); }
.bg-white\/5 { background: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-primary\/30 { border-color: rgba(55, 0, 60, 0.3); }
.bg-primary\/10 { background: rgba(55, 0, 60, 0.1); }

@media (max-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: 1fr; }
    .lg\:grid-cols-\[1\.5fr_1fr\] { grid-template-columns: 1fr; }
    .lg\:grid-cols-\[2fr_1fr\] { grid-template-columns: 1fr; }
}

/* WASM hybrid boot splash (removed after first paint) */
.wasm-boot {
  position: fixed;
  inset: 0;
  z-index: var(--z-boot);
  display: grid;
  place-items: center;
  background: #0a0a0a;
  color: #f0f0f0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.wasm-boot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  opacity: 0.9;
}
.wasm-boot-hidden { opacity: 0; }
.wasm-boot-reload {
  margin-top: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  background: #1a1a1a;
  color: #f0f0f0;
  font-size: 0.9rem;
  cursor: pointer;
}
.wasm-boot-reload:hover { border-color: #00ff87; }

/* Live FPL status strip (Hub / My Team) */
.pl-live-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid color-mix(in srgb, var(--border-color, #333) 80%, transparent);
    background: color-mix(in srgb, var(--surface-2, #141414) 90%, transparent);
}
.pl-live-strip-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.pl-live-status {
    font-weight: 700;
    font-size: var(--text-sm, 0.875rem);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pl-live-status--on {
    color: var(--color-accent, #00ff87);
}
.pl-live-sync .hub-sync-meta,
.hub-live-refresh .hub-sync-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pl-dream-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.pl-dream-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    border: 1px solid var(--border-color, #333);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: var(--text-xs, 0.75rem);
}
.pl-dream-chip:hover {
    border-color: var(--color-accent, #00ff87);
}
.pl-dream-pts {
    font-weight: 700;
    color: var(--color-accent, #00ff87);
}
.pl-dream-card .card-section-header {
    align-items: flex-start;
    gap: 1rem;
}
.dream-team-view-picker {
    flex: 0 0 auto;
    min-width: 9.5rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-color, #333);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-surface, #151515);
    color: var(--text-primary, #f5f5f5);
    font-size: var(--text-xs, 0.75rem);
    font-weight: 700;
}
.dream-team-pitch-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 0.85rem 0 0.35rem;
    padding: 0 0.85rem;
    color: var(--text-muted, #999);
    font-size: var(--text-xs, 0.75rem);
}
.dream-team-pitch-summary strong {
    color: var(--color-accent, #00ff87);
    font-size: var(--text-sm, 0.875rem);
    letter-spacing: 0.04em;
}
.pl-dream-card > .pitch-view {
    margin-top: 0.35rem;
}
@media (max-width: 560px) {
    .pl-dream-card .card-section-header {
        gap: 0.5rem;
    }
    .dream-team-view-picker {
        min-width: 8.5rem;
        max-width: 45vw;
    }
}
.pl-tabs--compact.pl-tabs--fill.pl-setpiece-kind-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
}

.pl-tabs--compact.pl-tabs--fill.pl-setpiece-kind-tabs .pl-tab {
    font-size: 0.72rem;
    white-space: nowrap;
}

.pl-setpiece-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.pl-setpiece-item {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-tertiary, #1a1a1a) 45%, transparent);
}
.pl-setpiece-team {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
}
.pl-setpiece-short {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
.pl-setpiece-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pl-setpiece-lines {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.pl-setpiece-line {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
}
.pl-setpiece-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(140, 140, 140, 0.2);
    color: #c0c0c0;
    white-space: nowrap;
}
.pl-setpiece-label--pen {
    background: rgba(0, 255, 135, 0.14);
    color: #00ff87;
}
.pl-setpiece-label--cor {
    background: rgba(4, 245, 255, 0.14);
    color: #04f5ff;
}
.pl-setpiece-label--fk {
    background: rgba(245, 166, 35, 0.18);
    color: #f5a623;
}
.pl-setpiece-value {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    min-width: 0;
}
.pl-player-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.pl-player-link:hover {
    color: var(--color-accent, #00ff87);
    text-decoration: underline;
}
.pl-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    /* Keep sheet above bottom nav on mobile */
    padding-bottom: calc(1rem + var(--app-bottom-chrome, 0px));
}
.pl-modal {
    width: min(36rem, 100%);
    max-height: min(80vh, 40rem);
    overflow: auto;
    margin-bottom: 1rem;
}
.pl-upcoming-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-muted);
}
@media (min-width: 640px) {
    .pl-modal-backdrop {
        align-items: center;
    }
}

/* â”€â”€ Guest preview + demo chat â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.guest-demo-league-item {
    cursor: default;
    opacity: 0.92;
}

/* Legacy demo-chat panel styles kept unused; demo chat now uses .chat-shell */

.home-hub-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin: var(--space-5) 0;
}

@media (min-width: 640px) {
    .home-hub-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.home-hub-tile {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.home-hub-tile:hover {
    border-color: rgba(0, 255, 135, 0.35);
    transform: translateY(-1px);
}

.home-hub-tile-label {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.home-hub-tile-value {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--text-primary);
}

.home-hub-tile-sub {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.35;
}

.home-cta--section {
    justify-content: flex-start;
}

@media (max-width: 520px) {
    .home-hub-tiles {
        grid-template-columns: 1fr;
    }
}
/* Scoped layout styles    kept minimal since app.css handles the design system */



#blazor-error-ui {

    background: var(--bg-card);

    bottom: var(--bottom-nav-offset, 0);

    box-shadow: var(--shadow-md);

    display: none;

    left: 0;

    padding: 0.6rem 1.25rem 0.7rem 1.25rem;

    position: fixed;

    width: 100%;

    z-index: var(--z-system);

    color: var(--color-danger);

    border-top: 1px solid var(--border-color);

}



#blazor-error-ui .dismiss {

    cursor: pointer;

    position: absolute;

    right: 0.75rem;

    top: 0.5rem;

}

html.fpl-updating #blazor-error-ui {
    display: none !important;
}

/* WASM pages use prerender:false — show a spinner until the island renders. */
html:not(.fpl-wasm-ready) .content-body:empty {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

html:not(.fpl-wasm-ready) .content-body:empty::before {
    content: "";
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-color, #333);
    border-top-color: var(--color-accent, #00ff87);
    border-radius: 50%;
    animation: fpl-wasm-spin 0.7s linear infinite;
}

@keyframes fpl-wasm-spin {
    to { transform: rotate(360deg); }
}


.pitch-formation-label {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 5;
}

/* Planning */
.squad-header-actions { display: inline-flex; align-items: center; gap: .75rem; }
.planning-entry-button { position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .65rem; border: 1px solid color-mix(in srgb, var(--color-accent) 55%, var(--border-color)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); font-size: var(--text-xs); font-weight: 800; text-decoration: none; white-space: nowrap; }
.planning-entry-button:hover { border-color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 18%, transparent); color: var(--color-accent); }
.planning-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: #e53935; color: #fff; font-size: .68rem; line-height: 1; }
.planning-entry-button .planning-count-badge { position: absolute; top: -.55rem; right: -.75rem; }
.planning-page-title > .btn { position: relative; }
.planning-first-gw-callout { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--border-color)); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.planning-page-title { align-items: center; }
.planning-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.planning-plan-list, .planning-editor { min-width: 0; }
.planning-card-heading, .planning-editor-header, .planning-editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.planning-plan-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem .75rem; color: var(--text-primary); border: 0; border-top: 1px solid var(--border-color); background: transparent; text-align: left; cursor: pointer; }
.planning-plan-row:hover, .planning-plan-row.is-selected { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.planning-plan-row.is-outdated { opacity: .55; }
.planning-plan-row small, .planning-plan-status { display: block; color: var(--text-muted); font-size: .72rem; margin-top: .2rem; }
.planning-cap-note { margin-top: .8rem; padding: .75rem; border-radius: var(--radius-md); color: var(--text-muted); background: var(--bg-surface); font-size: .78rem; }
.planning-outdated-action { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem .75rem; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: .76rem; }
.planning-create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.planning-field { display: grid; gap: .35rem; color: var(--text-muted); font-size: .78rem; font-weight: 700; }
.planning-plan-name {
    width: 100%;
    min-height: 3rem;
    padding: .7rem .85rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 42%, var(--border-color));
    border-radius: var(--radius-md);
    outline: none;
    background: var(--bg-surface);
    color: var(--text-primary);
    font: inherit;
    font-size: .95rem;
    font-weight: 650;
    line-height: 1.2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.planning-plan-name::placeholder { color: color-mix(in srgb, var(--text-muted) 78%, transparent); }
.planning-plan-name:hover { border-color: color-mix(in srgb, var(--color-accent) 65%, var(--border-color)); }
.planning-plan-name:focus {
    border-color: var(--color-accent);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent), 0 0 .9rem color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.planning-search-input { min-height: 2.65rem; font-size: .85rem; font-weight: 550; }
.planning-field:focus-within > span { color: var(--color-accent); }
.planning-empty-state { text-align: center; padding: 2rem; }
.planning-empty-icon { width: 3rem; height: 3rem; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 50%; color: var(--color-accent); border: 1px solid var(--color-accent); font-size: 1.7rem; }
.planning-editor-header { align-items: flex-start; margin-bottom: 1rem; }
.planning-editor-header > div:first-child { min-width: 0; }
.planning-editor-header .card-section-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-editor-header-right { display: grid; justify-items: end; gap: .55rem; }
.planning-editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.planning-icon-action { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; padding: 0; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); background: var(--bg-surface); cursor: pointer; }
.planning-icon-action svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.planning-icon-action:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.planning-icon-action:disabled { cursor: not-allowed; opacity: .45; }
.planning-reset-action { color: var(--color-warning); }
.planning-reset-action:hover:not(:disabled) { border-color: var(--color-warning); color: var(--color-warning); }
.planning-delete-action { color: var(--color-danger); }
.planning-delete-action:hover:not(:disabled) { border-color: var(--color-danger); color: var(--color-danger); }
.planning-unsaved-indicator { align-self: center; color: var(--color-warning); font-size: .68rem; font-weight: 700; }
.planning-transfer-warning { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: -.35rem 0 .8rem; padding: .5rem .7rem; border: 1px solid color-mix(in srgb, var(--color-warning) 45%, var(--border-color)); border-radius: var(--radius-md); color: var(--color-warning); background: color-mix(in srgb, var(--color-warning) 8%, var(--bg-surface)); font-size: .72rem; }
.planning-transfer-warning span { color: var(--text-muted); }
.planning-eyebrow { color: var(--color-accent); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.planning-financials { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; color: var(--text-muted); font-size: .76rem; }
.planning-financials strong { color: var(--text-primary); }
.planning-financials-row {
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    margin: -.35rem 0 .8rem;
    padding: .35rem .1rem;
    overflow-x: auto;
    white-space: nowrap;
}
.planning-financials-row span { flex: 0 0 auto; }
.demo-planning-preview { overflow: hidden; }
.demo-planning-preview__intro { max-width: 62rem; margin: .65rem 0 .8rem; }
.demo-planning-preview__metrics { justify-content: flex-start; margin-bottom: .55rem; }
.demo-planning-preview__tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.demo-planning-preview__tools span { padding: .28rem .55rem; border: 1px solid color-mix(in srgb, var(--color-accent) 28%, var(--border-color)); border-radius: 999px; color: var(--text-muted); font-size: .68rem; }
.demo-planning-preview__footer { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: .7rem; color: var(--text-muted); font-size: .75rem; }
.demo-planning-preview__footer strong { color: var(--color-accent); }
.planning-pitch-wrap { display: grid; gap: .75rem; }
.planning-pitch-frame { position: relative; }
.planning-pitch-detail-toggle {
    position: absolute;
    top: 2.55rem;
    left: .75rem;
    z-index: 8;
}
.planning-pitch-detail-select {
    min-height: 1.85rem;
    max-width: 7.5rem;
    padding: .2rem .35rem;
    border: 1px solid color-mix(in srgb, #ffffff 72%, var(--border-color));
    border-radius: .45rem;
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
    color: var(--text-primary);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}
.planning-pitch-detail-select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}
.pitch-footer-slot {
    position: absolute;
    top: 2.55rem;
    right: .75rem;
    z-index: 8;
}
.planning-pitch-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.planning-pitch-save {
    position: static;
}
.planning-pitch-save.is-pending {
    border-color: var(--color-warning);
    color: var(--color-warning);
    background: color-mix(in srgb, var(--color-warning) 16%, var(--bg-surface));
    box-shadow: 0 0 .45rem color-mix(in srgb, var(--color-warning) 70%, transparent),
                0 0 1.1rem color-mix(in srgb, var(--color-warning) 28%, transparent);
    animation: planning-save-pulse 1.8s ease-in-out infinite;
}
@keyframes planning-save-pulse {
    0%, 100% { box-shadow: 0 0 .35rem color-mix(in srgb, var(--color-warning) 55%, transparent); }
    50% { box-shadow: 0 0 .8rem color-mix(in srgb, var(--color-warning) 90%, transparent), 0 0 1.35rem color-mix(in srgb, var(--color-warning) 30%, transparent); }
}
.planning-empty-player img { opacity: .55; filter: grayscale(.45); }
.planning-action-bar, .planning-search-panel { margin-top: 1rem; padding: .85rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-surface); }
.planning-action-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.planning-action-bar strong { margin-right: auto; }
.planning-swap-select { width: auto; min-width: 150px; max-width: 210px; }
.planning-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: .5rem; margin: .75rem 0; }
.planning-player-results { display: grid; gap: .35rem; max-height: 320px; overflow-y: auto; }
.planning-player-result { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem .75rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: transparent; color: var(--text-primary); text-align: left; cursor: pointer; }
.planning-player-result:hover { border-color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.planning-player-result small, .planning-xpoints small { display: block; color: var(--text-muted); font-size: .72rem; margin-top: .15rem; }
.planning-xpoints { text-align: right; color: var(--color-accent); }
.planning-editor-footer { margin-top: 1rem; justify-content: flex-end; }
.planning-alert-dialog { position: fixed; top: 1rem; right: 1rem; z-index: 2200; display: flex; align-items: flex-start; gap: .75rem; width: min(420px, calc(100vw - 2rem)); padding: .8rem .85rem; border: 2px solid var(--color-danger); border-radius: var(--radius-md); background: var(--bg-secondary); box-shadow: var(--shadow-lg), 0 0 18px color-mix(in srgb, var(--color-danger) 18%, transparent); }
.planning-alert-dialog > div { display: grid; gap: .2rem; min-width: 0; }
.planning-alert-dialog strong { color: var(--color-danger); font-size: .78rem; }
.planning-alert-dialog span { color: var(--text-primary); font-size: .76rem; line-height: 1.35; }
.planning-info-dialog { position: fixed; top: 1rem; right: 1rem; z-index: 2199; display: flex; align-items: center; gap: .65rem; width: max-content; max-width: min(360px, calc(100vw - 2rem)); padding: .65rem .75rem; border: 1px solid color-mix(in srgb, var(--color-accent) 45%, var(--border-color)); border-radius: var(--radius-md); color: var(--text-primary); background: var(--bg-secondary); box-shadow: var(--shadow-lg); }
.planning-info-dialog span { font-size: .76rem; line-height: 1.35; }
.planning-alert-close { flex: 0 0 auto; border: 0; color: var(--text-muted); background: transparent; font-size: 1.15rem; line-height: 1; cursor: pointer; }
.planning-alert-close:hover { color: var(--text-primary); }
.planning-chip-select { max-width: 180px; }
.player-expected-points-card { padding: .9rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-tertiary); }
.player-expected-points-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.player-expected-points-grid div { display: grid; gap: .15rem; text-align: center; }
.player-expected-points-grid span { color: var(--text-muted); font-size: .7rem; }
.player-expected-points-grid strong { color: var(--color-accent); font-size: 1.1rem; }
.player-expected-stat { display: grid; flex: 1; gap: .08rem; min-width: 60px; padding: 0 .25rem; border: 0; border-left: 1px solid var(--border-color); color: var(--text-primary); background: transparent; cursor: pointer; text-align: center; }
.player-expected-stat:hover strong, .player-expected-stat:focus-visible strong { color: var(--color-accent); }
.player-expected-stat span { color: var(--text-muted); font-size: 9px; text-transform: none; letter-spacing: .04em; }
.player-expected-stat small { color: var(--text-muted); font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.player-expected-stat strong { font-size: 12px; }
.player-expected-stat small { color: var(--color-accent); text-transform: none; letter-spacing: 0; }
.player-expected-breakdown { margin: 0 0 1.25rem; padding: .8rem; border: 1px solid color-mix(in srgb, var(--color-accent) 28%, var(--border-color)); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-accent) 5%, var(--bg-tertiary)); }
.player-expected-breakdown-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.player-expected-breakdown-heading div { display: grid; gap: .15rem; }
.player-expected-breakdown-heading strong { font-size: .78rem; }
.player-expected-breakdown-heading span { color: var(--text-muted); font-size: .68rem; }
.player-expected-breakdown-heading > span { color: var(--text-muted); font-size: .65rem; white-space: nowrap; }
.player-expected-projections { display: grid; gap: .35rem; }
.player-expected-projection { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .65rem; align-items: center; padding: .55rem .6rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-surface); }
.player-expected-projection > div { display: grid; gap: .15rem; min-width: 0; }
.player-expected-projection > div strong { font-size: .72rem; }
.player-expected-projection > div span { overflow: hidden; color: var(--text-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.player-fdr { padding: .2rem .35rem; border-radius: .3rem; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.player-expected-value { color: var(--color-accent); font-size: .75rem; white-space: nowrap; }
@media (max-width: 800px) {
    .planning-layout, .planning-create-grid { grid-template-columns: 1fr; }
    .planning-editor-header, .planning-first-gw-callout { align-items: flex-start; flex-direction: column; }
    .planning-editor-header-right { width: 100%; justify-items: start; }
    .planning-editor-actions { justify-content: flex-start; }
    .planning-financials { justify-content: flex-start; }
    .planning-search-controls { grid-template-columns: 1fr; }
    .planning-editor-footer { flex-wrap: wrap; }
    .planning-chip-select { max-width: none; flex: 1 1 100%; }
}

/* Planning refresh: keep the field identical to My Team and move secondary
   actions into compact, focused overlays. */
.planning-context-pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .45rem; }
.planning-context-pills span, .planning-list-count { padding: .25rem .55rem; border: 1px solid var(--border-color); border-radius: 999px; color: var(--text-muted); font-size: .72rem; }
.planning-create-backdrop, .planning-picker-backdrop { position: fixed; inset: 0; z-index: 1040; display: grid; place-items: center; padding: 1rem; background: rgba(0, 0, 0, .7); }
.planning-create-modal, .planning-player-picker, .planning-sub-picker { width: min(760px, 100%); max-height: min(88vh, 760px); overflow-y: auto; padding: 1.25rem; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); box-shadow: var(--shadow-lg); color: var(--text-primary); }
.planning-confirm-modal { width: min(460px, 100%); padding: 1.25rem; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); box-shadow: var(--shadow-lg); color: var(--text-primary); }
.planning-delete-confirm-warning { display: grid; gap: .3rem; margin: .75rem 0; padding: .7rem .8rem; border: 1px solid color-mix(in srgb, var(--color-danger) 45%, var(--border-color)); border-radius: var(--radius-md); color: var(--text-muted); background: color-mix(in srgb, var(--color-danger) 8%, var(--bg-surface)); font-size: .78rem; line-height: 1.35; }
.planning-delete-confirm-warning strong { color: var(--color-danger); }
.planning-confirm-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--border-color); }
.planning-player-picker { width: min(900px, 100%); }
.planning-sub-picker { width: min(460px, 100%); }
.planning-modal-heading, .planning-source-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.planning-modal-heading { margin-bottom: 1.1rem; }
.planning-icon-button { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--border-color); border-radius: 50%; color: var(--text-muted); background: transparent; font-size: 1.25rem; cursor: pointer; }
.planning-icon-button:hover { color: var(--text-primary); border-color: var(--color-accent); }
.planning-source-heading { margin: 1.2rem 0 .55rem; color: var(--text-muted); font-size: .78rem; font-weight: 700; }
.planning-source-heading strong { color: var(--color-accent); }
.planning-source-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.planning-source-option { display: flex; align-items: center; gap: .65rem; padding: .7rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); background: var(--bg-surface); text-align: left; cursor: pointer; }
.planning-source-option:hover, .planning-source-option.is-selected { border-color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 10%, var(--bg-surface)); }
.planning-source-option small { display: block; margin-top: .15rem; color: var(--text-muted); font-size: .7rem; }
.planning-source-icon { display: grid; place-items: center; min-width: 2rem; height: 2rem; border-radius: 50%; color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 14%, transparent); font-size: .7rem; font-weight: 800; }
.planning-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.planning-chip-panel { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: .75rem; align-items: center; margin-bottom: 1rem; padding: .7rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-surface); }
.planning-chip-heading { display: grid; gap: .15rem; min-width: 0; }
.planning-chip-heading strong { font-size: .82rem; }
.planning-chip-toggles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.planning-chip-toggle { display: grid; justify-items: center; gap: .1rem; padding: .3rem .2rem; border: 1px solid transparent; border-radius: var(--radius-md); color: var(--text-muted); background: transparent; cursor: pointer; }
.planning-chip-toggle:hover, .planning-chip-toggle.is-active { border-color: var(--color-accent); color: var(--text-primary); background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.planning-chip-toggle.is-unavailable { opacity: .45; filter: grayscale(.35); }
.planning-chip-toggle.is-unavailable small { color: var(--text-muted); }
.planning-chip-toggle:disabled { cursor: not-allowed; opacity: .5; }
.planning-chip-toggle img { width: 23px; height: 23px; object-fit: contain; }
.planning-chip-toggle span { font-size: .62rem; font-weight: 700; line-height: 1.1; text-align: center; }
.planning-chip-toggle small { font-size: .58rem; color: var(--color-accent); }
.planning-formation-status { position: static; z-index: 5; display: flex; width: max-content; max-width: calc(100% - 1rem); gap: .5rem; align-items: center; margin: .65rem auto .15rem; padding: .25rem .55rem; border: 1px solid var(--border-color); border-radius: 999px; background: rgba(0, 0, 0, .58); white-space: nowrap; font-size: .65rem; }
.planning-formation-status span { color: var(--text-muted); }
.planning-formation-status.is-valid strong { color: var(--color-success); }
.planning-formation-status.is-pending strong { color: var(--color-warning); }
.planning-picker-filters { display: grid; grid-template-columns: minmax(180px, 1.6fr) repeat(4, minmax(105px, 1fr)); gap: .65rem; margin-bottom: .7rem; }
.planning-filter-field { display: grid; gap: .3rem; min-width: 0; }
.planning-filter-field span { color: var(--text-muted); font-size: .64rem; font-weight: 700; letter-spacing: .02em; }
.planning-picker-filters .form-control { min-width: 0; width: 100%; max-width: 100%; min-height: 2.35rem; padding: .4rem .55rem; border-color: color-mix(in srgb, var(--border-color) 85%, var(--color-accent)); background: var(--bg-surface); color: var(--text-primary); font-size: .78rem; box-shadow: none; }
.planning-picker-filters select.form-control { min-inline-size: 0; padding-right: 1.65rem; overflow: hidden; text-overflow: ellipsis; }
.planning-picker-filters .form-control:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent); }
.planning-picker-filters .form-control::placeholder { color: color-mix(in srgb, var(--text-muted) 78%, transparent); }
.planning-picker-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-bottom: .9rem; }
.planning-player-results { max-height: 54vh; }
.planning-player-result > span:first-child { min-width: 0; }
.planning-market-stats { display: grid; justify-items: end; gap: .15rem; min-width: 210px; }
.planning-market-stats b { color: var(--color-accent); font-size: .78rem; }
.planning-market-stats small { color: var(--text-muted); font-size: .68rem; white-space: nowrap; }
.planning-sub-list { display: grid; gap: .45rem; }
.planning-sub-option { display: flex; justify-content: space-between; gap: .75rem; padding: .7rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); background: var(--bg-surface); text-align: left; cursor: pointer; }
.planning-sub-option:hover { border-color: var(--color-accent); }
.planning-sub-option small { color: var(--text-muted); }
.player-modal-planning-actions { display: grid; gap: .65rem; padding: .8rem 1rem; border-top: 1px solid var(--border-color); background: var(--bg-surface); }
.player-modal-primary-actions { display: flex; align-items: stretch; gap: .5rem; width: 100%; }
.player-modal-primary-actions .btn { flex: 1 1 0; width: auto; min-width: 0; }
.player-modal-add-action { width: 100%; }
.player-modal-role-checkboxes { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: .55rem .1rem .1rem; border-top: 1px solid var(--border-color); }
.player-modal-role-checkbox { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-muted); font-size: .72rem; cursor: pointer; user-select: none; }
.player-modal-role-checkbox input { width: .9rem; height: .9rem; margin: 0; accent-color: var(--color-accent); cursor: pointer; }
.player-modal-role-checkbox input:checked + span { color: var(--color-accent); font-weight: 700; }
.player-modal-planning-hint { flex: 1 1 100%; color: var(--color-warning); font-size: .72rem; text-align: right; }
.player-form-title { margin: 0 0 .65rem; color: var(--text-primary); font-size: .85rem; font-weight: 800; }
.player-form-table { overflow: hidden; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-tertiary); }
.player-form-header,
.player-form-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1.5fr) 4.3rem 3.8rem 2.8rem; align-items: center; gap: .35rem; }
.player-form-header { padding: .7rem .75rem .45rem; color: var(--text-muted); font-size: .65rem; font-weight: 700; }
.player-form-header span:nth-child(n+3),
.player-form-row > :nth-child(n+3) { text-align: center; }
.player-form-row-group + .player-form-row-group { border-top: 1px solid var(--border-color); }
.player-form-row { min-height: 3.1rem; padding: .45rem .75rem; color: var(--text-primary); font-size: .75rem; }
.player-form-gw { color: var(--text-muted); font-weight: 700; text-align: center; }
.player-form-opponent { display: inline-flex; min-width: 0; align-items: center; gap: .4rem; overflow: hidden; border: 0; padding: 0; background: transparent; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.player-form-opponent img { width: 1.35rem; height: 1.35rem; flex: 0 0 auto; object-fit: contain; }
.player-form-opponent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-form-result { display: inline-flex; min-width: 3.25rem; justify-content: center; border-radius: .35rem; padding: .3rem .25rem; font-weight: 800; }
button.player-form-result-button { border: 0; font: inherit; cursor: pointer; }
button.player-form-result-button:hover,
button.player-form-result-button:focus-visible { filter: brightness(1.08); }
.player-form-result--win { background: #35b85a; color: #fff; }
.player-form-result--draw { background: #b58a32; color: #fff; }
.player-form-result--loss { background: #88405a; color: #fff; }
.player-form-result--unknown { background: var(--bg-surface); color: var(--text-muted); }
.player-form-points { white-space: nowrap; font-size: .8rem; }
.player-form-more { display: inline-grid; width: 2rem; height: 2rem; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-primary); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.player-form-more:hover { background: color-mix(in srgb, var(--text-primary) 10%, transparent); }
.player-form-empty { grid-column: 1 / -1; margin: 0; padding: .8rem; color: var(--text-muted); font-size: .72rem; }
.player-match-detail { margin: 0 .55rem .55rem; padding: .85rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-surface); }
.player-match-detail-meta { margin-bottom: .7rem; color: var(--text-muted); font-size: .68rem; text-align: center; }
.player-match-stat-section { overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-tertiary); }
.player-match-stat-section + .player-match-stat-section { margin-top: .75rem; }
.player-match-stat-section h4 { margin: 0; padding: .65rem .7rem .4rem; color: var(--text-primary); font-size: .75rem; }
.player-match-stat-header,
.player-match-stat-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 4rem 4rem; align-items: center; gap: .35rem; padding: .45rem .7rem; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: .68rem; }
.player-match-stat-header { color: var(--text-muted); font-size: .62rem; font-weight: 700; }
.player-match-stat-row strong { color: var(--text-primary); font-weight: 700; text-align: right; }
.player-match-stat-row--two { grid-template-columns: minmax(0, 1fr) 4rem; }
.player-match-stats-toggle { display: flex; width: 100%; align-items: center; justify-content: center; gap: .4rem; margin-top: .7rem; border: 0; padding: .45rem; background: transparent; color: var(--text-primary); font-size: .7rem; cursor: pointer; }
.player-match-stats-toggle:hover { color: var(--color-accent); }
@media (max-width: 800px) {
    .planning-source-options, .planning-chip-panel { grid-template-columns: 1fr; }
    .planning-editor-header { align-items: flex-start; flex-direction: row; }
    .planning-editor-header-right { width: auto; justify-items: end; }
    .planning-financials-row { justify-content: space-between; gap: .55rem; font-size: .68rem; }
    .pitch-footer-slot { top: 2.55rem; right: .55rem; }
    .planning-chip-toggles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .planning-chip-panel { gap: .3rem; margin-bottom: .7rem; padding: .5rem; }
    .planning-chip-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
    .planning-chip-heading strong { font-size: .72rem; }
    .planning-picker-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .planning-filter-search, .planning-picker-actions { grid-column: span 2; }
    .planning-picker-actions { margin-bottom: .55rem; }
    .planning-picker-actions .btn { padding: .4rem .6rem; font-size: .7rem; }
    .planning-market-stats { min-width: 0; max-width: 58%; }
    .planning-market-stats small { white-space: normal; line-height: 1.2; text-align: right; }
    .planning-modal-footer { align-items: stretch; flex-direction: column; }
    .demo-planning-preview__footer { flex-wrap: wrap; }
}

@media (max-width: 520px) {
    .player-form-header,
    .player-form-row { grid-template-columns: 2rem minmax(0, 1.35fr) 3.6rem 3.2rem 2.4rem; gap: .2rem; }
    .player-form-header { padding-inline: .5rem; font-size: .58rem; }
    .player-form-row { padding-inline: .5rem; font-size: .68rem; }
    .player-form-opponent img { width: 1.1rem; height: 1.1rem; }
    .player-form-result { min-width: 2.7rem; padding-inline: .15rem; }
    .player-form-points { font-size: .7rem; }
    .player-match-detail { margin-inline: .35rem; padding: .65rem; }
    .player-match-stat-header,
    .player-match-stat-row { grid-template-columns: minmax(0, 1.2fr) 3.2rem 3.4rem; padding-inline: .55rem; }
    .player-match-stat-row--two { grid-template-columns: minmax(0, 1fr) 3.4rem; }
}

/* Initial-based avatar color picker */
.settings-avatar-preferences {
    padding: .85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-card) 78%, transparent);
}

.settings-avatar-color-list {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.settings-avatar-color {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: var(--avatar-choice-color);
    color: #45505c;
    font-size: .8rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(70, 80, 92, .18);
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.settings-avatar-color:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(70, 80, 92, .24), 0 2px 8px rgba(0, 0, 0, .18);
}

.settings-avatar-color.is-selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--text-primary);
}

.settings-avatar-color:disabled {
    cursor: wait;
    opacity: .65;
}

.account-modal {
    width: min(420px, calc(100vw - 1.5rem));
    max-height: min(88dvh, 640px);
}

.account-modal-header {
    align-items: center;
    padding-bottom: 0.35rem;
}

.account-modal-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--avatar-choice-color, var(--color-accent));
    color: #2b333c;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    object-fit: cover;
    overflow: hidden;
}

.account-modal-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0.7rem 1rem 0;
    padding: 4px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.account-modal-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.account-modal-tabs button {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 0.75rem;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.account-modal-tabs button.is-active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.account-modal-body {
    padding-top: 0.85rem;
}

.account-modal-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.account-modal-lead {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.account-modal-form {
    margin: 0;
}

.account-linked-team {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.account-linked-team .account-modal-form-actions {
    margin-top: 0;
}

.account-signin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-signin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-card) 78%, transparent);
}

.account-signin-row .badge {
    flex-shrink: 0;
}

.account-modal .settings-avatar-preferences {
    margin: 0 0 1rem;
}

.account-modal .settings-avatar-color {
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    overflow: hidden;
}

.account-modal .settings-avatar-color--photo {
    padding: 0;
    background: var(--bg-tertiary);
}

.account-modal .settings-avatar-color--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    pointer-events: none;
}

.account-modal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Compact H2H analytics: keep every insight readable on narrow screens. */
.h2h-analytics {
    overflow: hidden;
}

.league-live-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-width: 0;
    margin-left: auto;
}

.league-live-controls > .form-select {
    flex: 0 0 auto;
    width: auto;
}

.league-gameweek-select {
    min-width: 76px;
    width: auto;
    flex: 0 0 auto;
}

.league-live-controls .hub-live-refresh {
    margin-left: auto;
}

@media (max-width: 768px) {
    .page-title-actions {
        flex-wrap: wrap;
    }

    .league-live-controls {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .league-live-controls .hub-live-refresh {
        flex: 0 1 auto;
        width: auto;
        max-width: 100%;
        min-width: 0;
        margin-left: auto;
    }

    .league-live-controls .hub-sync-meta {
        min-width: 0;
        max-width: min(9rem, 38vw);
        overflow: hidden;
    }

    .league-gameweek-select {
        min-width: 72px;
    }

    .league-live-controls .hub-sync-time,
    .league-live-controls .hub-sync-hint {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.h2h-analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: .55rem;
}

.h2h-analytics-grid .gw-analytics-tile {
    min-height: 0;
    padding: .75rem;
    gap: .3rem;
}

.h2h-analytics-grid .gw-analytics-tile--wide {
    grid-column: span 2;
}

.h2h-analytics-grid .gw-analytics-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h2h-analytics-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: .45rem;
    padding: .38rem 0 0;
    margin-top: .08rem;
    border-top: 1px solid color-mix(in srgb, var(--border-color) 65%, transparent);
}

.h2h-analytics-row strong {
    min-width: 0;
    font-size: .86rem;
}

.h2h-analytics-row span {
    white-space: nowrap;
    font-size: .68rem;
}

.h2h-analytics-match-score {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .45rem;
    width: 100%;
    margin-top: .25rem;
}

.h2h-analytics-match-score button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: .35rem;
    padding: .35rem .45rem;
    border: 1px solid color-mix(in srgb, var(--border-color) 75%, transparent);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-card) 55%, transparent);
}

.h2h-analytics-match-score button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h2h-analytics-vs {
    color: var(--text-muted);
    font-size: .7rem;
}

.h2h-analytics-rivalry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .35rem;
    padding: .35rem 0;
    border-top: 1px solid color-mix(in srgb, var(--border-color) 65%, transparent);
}

.h2h-analytics-rivalry button {
    min-width: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: .82rem;
    font-weight: 700;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h2h-analytics-rivalry > span {
    color: var(--text-muted);
    font-size: .68rem;
}

.h2h-analytics-rivalry small {
    grid-column: 1 / -1;
    font-size: .68rem;
}

@media (max-width: 768px) {
    .h2h-analytics-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: .5rem;
    }

    .h2h-analytics-grid .gw-analytics-tile--wide {
        grid-column: auto;
    }

    .h2h-analytics-grid .gw-analytics-tile {
        padding: .65rem .7rem;
    }
}

/* League v3 final cascade: keep the reference treatment after the global component rules. */
.league-v3-analytics-view,
.league-v3-standings-view,
.league-v3-user-card,
.league-v3-tabs {
    --league-panel: var(--bg-card);
    --league-panel-2: var(--bg-secondary);
    --league-line: var(--border-color);
    --league-text: var(--text-primary);
    --league-muted: var(--text-secondary);
    --league-faint: var(--text-muted);
    font-family: 'Inter', var(--font-sans);
}

.league-v3-user-card {
    margin: .25rem 1.125rem 1rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 42%, var(--league-line)) !important;
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(0, 255, 135, .14), var(--league-panel) 72%) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-tab {
    border: 0 !important;
    border-radius: 9px;
    color: var(--league-muted) !important;
    font-family: 'Space Grotesk', var(--font-sans);
}

.league-v3-tab.is-active {
    color: var(--text-inverse, #04140d) !important;
    background: var(--color-accent) !important;
    box-shadow: none !important;
}

.league-v3-pinned--comparison {
    display: block !important;
    margin: .85rem 1.125rem .4rem;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--color-accent) 58%, var(--league-line)) !important;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(0, 255, 135, .14), var(--league-panel) 68%) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-pinned--comparison.is-above {
    border-color: color-mix(in srgb, var(--color-success) 70%, var(--league-line)) !important;
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-success) 18%, transparent), var(--league-panel) 68%) !important;
}

.league-v3-pinned--comparison.is-below {
    border-color: color-mix(in srgb, var(--color-danger) 70%, var(--league-line)) !important;
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-danger) 16%, transparent), var(--league-panel) 68%) !important;
}

.league-v3-pinned--comparison.is-above .league-v3-pinned-card--accent strong,
.league-v3-pinned--comparison.is-above .league-v3-pinned-note {
    color: var(--color-success) !important;
}

.league-v3-pinned--comparison.is-below .league-v3-pinned-card--accent strong,
.league-v3-pinned--comparison.is-below .league-v3-pinned-note {
    color: var(--color-danger) !important;
}

.league-v3-pinned-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.league-v3-pinned-row .league-v3-pinned-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.league-v3-pinned-label {
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: 10.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.league-v3-pinned-card strong {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 24px !important;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-pinned-card--accent strong {
    color: var(--color-accent) !important;
}

.league-v3-pinned-divider {
    width: 1px;
    height: 34px;
    flex: 0 0 1px;
    background: var(--league-line) !important;
}

.league-v3-pinned-note {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--league-line) !important;
    color: var(--color-accent) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: 11.5px;
    line-height: 1.35;
}

.league-v3-carousel-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 20px 18px 2px;
}

.league-v3-eyebrow,
.league-v3-a-eyebrow {
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.league-v3-carousel-intro h2 {
    margin: 0 0 3px;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 19px;
}

.league-v3-carousel-hint {
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: 11px;
}

.league-v3-carousel-track {
    display: flex !important;
    gap: 14px;
    padding: 14px 18px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.league-v3-carousel-track::-webkit-scrollbar {
    display: none;
}

.league-v3-vs-card {
    display: flex;
    min-width: 88%;
    min-height: 0;
    flex: 0 0 88%;
    flex-direction: column;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--league-line) !important;
    border-radius: 20px;
    background: var(--league-panel) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    scroll-snap-align: center;
}

.league-v3-vs-card:hover {
    border-color: var(--league-line) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    transform: none;
}

.league-v3-a-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: .06em;
}

.league-v3-vs-inner {
    display: flex !important;
    align-items: stretch;
    flex: 1 1 auto;
}

.league-v3-vs-side {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    gap: 7px;
    padding: 4px 10px;
}

.league-v3-vs-side:first-child { padding-left: 0; }
.league-v3-vs-side:last-child { padding-right: 0; }

.league-v3-vs-side strong {
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 15px;
    line-height: 1.25;
}

.league-v3-vs-side small {
    min-height: 0;
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: 11.5px;
}

.league-v3-vs-side b {
    margin-top: auto;
    padding-top: 8px;
    color: var(--league-text);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
}

.league-v3-vs-side b.is-positive { color: var(--color-accent) !important; }
.league-v3-vs-side b.is-negative { color: var(--color-danger) !important; }

.league-v3-stat-tag {
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.league-v3-stat-tag.is-positive { color: var(--color-accent) !important; }
.league-v3-stat-tag.is-negative { color: var(--color-danger) !important; }

.league-v3-vs-divider {
    position: relative;
    width: 1px;
    flex: 0 0 1px;
    margin: 0 4px;
    background: var(--league-line) !important;
}

.league-v3-vs-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--league-line) !important;
    border-radius: 50%;
    background: var(--league-panel) !important;
    color: var(--league-muted) !important;
    font-size: 9px;
    font-weight: 700;
    transform: translate(-50%, -50%);
}

.league-v3-honour-card,
.league-v3-records,
.league-v3-standings-view > .card {
    border-color: var(--league-line) !important;
    background: var(--league-panel) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-honour-card {
    border-left: 3px solid var(--color-accent) !important;
    border-radius: 16px;
}

.league-v3-honour-card--purple {
    border-left-color: var(--color-primary-light) !important;
}

.league-v3-honour-label,
.league-v3-records-heading small,
.league-v3-record-info small {
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
}

.league-v3-honour-card strong,
.league-v3-records-heading strong,
.league-v3-record-info strong,
.league-v3-records-section-head h3 {
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
}

.league-v3-records {
    border-radius: 18px;
}

.league-v3-record-row {
    border: 0;
    background: var(--league-panel-2) !important;
}

.league-v3-record-switch {
    border-color: var(--league-line) !important;
    background: var(--bg-primary) !important;
}

.league-v3-standings-view .standings-table thead th {
    color: var(--league-faint) !important;
    font-family: 'Inter', var(--font-sans);
}

@media (max-width: 640px) {
    .league-v3-user-card,
    .league-v3-pinned--comparison,
    .league-v3-records {
        margin-right: 16px;
        margin-left: 16px;
    }

    .league-v3-pinned--comparison {
        padding: 16px 18px;
    }

    .league-v3-pinned-card strong {
        font-size: 24px !important;
    }

    .league-v3-carousel-track {
        padding-right: 18px;
        padding-left: 18px;
    }

    .league-v3-vs-card {
        flex-basis: 88%;
    }
}

.league-v3-honour-strip--standalone {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin: 0 0 .85rem;
    padding: 0;
}

.league-v3-honour-strip--standalone .league-v3-honour-card {
    min-height: 5.65rem;
}

@media (max-width: 640px) {
    .league-v3-honour-strip--standalone {
        grid-template-columns: 1fr;
        gap: .55rem;
        margin-right: 16px;
        margin-left: 16px;
    }
}

.league-v3-honour-strip--standalone .league-v3-honour-card {
    background: var(--bg-tertiary, #1e1e1e) !important;
}

.league-v3-honour-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.league-v3-honour-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.league-v3-honour-card--purple .league-v3-honour-icon {
    color: var(--color-primary-light, #8b6bf0);
}

/* Interactive insight cards: keep names readable and make the whole card actionable. */
.league-v3-vs-card.is-clickable {
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.league-v3-vs-card.is-clickable:hover,
.league-v3-vs-card.is-clickable:focus-visible {
    border-color: var(--league-accent) !important;
    box-shadow: 0 12px 30px rgba(0, 255, 153, .12);
    transform: translateY(-2px);
    outline: none;
}

.league-v3-vs-card.is-clickable:focus-visible {
    outline: 2px solid var(--league-accent);
    outline-offset: 3px;
}

.league-v3-a-eyebrow {
    min-height: 2.25em;
    line-height: 1.2;
    white-space: normal;
}

.league-v3-vs-inner {
    align-items: stretch;
}

.league-v3-vs-side {
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
}

.league-v3-vs-side strong {
    display: -webkit-box;
    min-height: 2.35em;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: clamp(.98rem, 1.35vw, 1.18rem);
    line-height: 1.18;
}

.league-v3-vs-side small {
    min-height: 2.15em;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.3;
}

.league-v3-vs-side b {
    margin-top: auto;
    font-family: 'JetBrains Mono', var(--font-mono);
    letter-spacing: -.02em;
}

@media (max-width: 640px) {
    .league-v3-vs-card {
        min-height: 11.75rem;
    }

    .league-v3-vs-side strong {
        font-size: 1rem;
    }
}

/* Keep the insight cards compact; only names carry navigation. */
.league-v3-vs-card {
    min-height: 10.25rem;
    padding: .8rem 1rem;
}

.league-v3-a-eyebrow {
    min-height: 1.2em;
    margin-bottom: .4rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.25;
}

.league-v3-vs-side {
    gap: 3px;
    padding: 2px 8px;
}

.league-v3-vs-side strong,
.league-v3-insight-link {
    display: -webkit-box;
    min-height: 2.1em;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: clamp(.96rem, 1.25vw, 1.12rem);
    font-weight: 700;
    line-height: 1.16;
}

.league-v3-insight-link {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--league-text) !important;
    text-align: left;
    text-decoration: none;
}

.league-v3-insight-link[href],
.league-v3-insight-link--player {
    cursor: pointer;
}

.league-v3-insight-link[href]:hover,
.league-v3-insight-link[href]:focus-visible,
.league-v3-insight-link--player:hover,
.league-v3-insight-link--player:focus-visible {
    color: var(--league-accent) !important;
    text-decoration: underline;
    text-underline-offset: .18em;
    outline: none;
}

.league-v3-vs-side .league-v3-stat-tag.league-v3-insight-link {
    display: block;
    min-height: 0;
    margin-bottom: .35rem;
    font-family: 'Inter', var(--font-sans);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
}

.league-v3-vs-side small {
    min-height: 1.35em;
}

.league-v3-vs-side b {
    padding-top: 3px;
}

@media (max-width: 640px) {
    .league-v3-vs-card {
        min-height: 9.75rem;
        padding: .75rem .9rem;
    }

    .league-v3-a-eyebrow {
        margin-bottom: .35rem;
        font-size: .66rem;
    }

    .league-v3-vs-side strong,
    .league-v3-insight-link {
        font-size: .98rem;
    }
}

/* Final League visual pass: keep the compact spacing after the shared cascade. */

/* Final honours override: full-width cards, green accents and readable copy. */
.league-v3-tabs {
    margin-top: 0 !important;
    border: 1px solid rgba(150, 150, 150, .32) !important;
}

.league-v3-standings-view {
    /* This view renders one standings/fixtures card. Keep it fluid instead of
       leaving an empty second grid track on wider screens. */
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
}

.league-v3-standings-view > .card {
    box-sizing: border-box;
    width: auto !important;
    margin-right: 0;
    margin-left: 0;
}

.league-v3-standings-view .card-section-header {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
}

.league-v3-standings-view .standings-title-group {
    flex: 1 1 auto;
    flex-wrap: nowrap;
}

.league-v3-standings-view .standings-heading {
    flex: 0 0 auto;
    white-space: nowrap;
}

.league-v3-standings-view .standings-view-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}

.league-v3-linked-team-card {
    align-self: center;
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.league-v3-gameweek-analytics-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: calc(100% - 2.25rem);
    align-self: center;
    margin: .1rem 0 .55rem;
    order: 3;
}

.league-v3-gameweek-analytics-heading h2 {
    min-width: 0;
    margin: 0;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.1;
}

.league-v3-analytics-view > .league-v3-pinned {
    order: 4 !important;
}

.league-v3-analytics-view > .league-v3-analytics-insights {
    order: 5 !important;
}

.league-v3-linked-team-card {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
    margin: .65rem 1.125rem 1rem !important;
    padding: .78rem .9rem !important;
}

.league-v3-linked-team-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: inherit;
    text-decoration: none;
}

.league-v3-linked-team-identity,
.league-v3-linked-team-points {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.league-v3-linked-team-identity:hover,
.league-v3-linked-team-identity:focus-visible,
.league-v3-linked-team-points:hover,
.league-v3-linked-team-points:focus-visible {
    color: inherit;
    outline: none;
}

.league-v3-linked-team-score {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
    flex: 0 0 auto;
    text-align: right;
}

.league-v3-linked-team-score .my-team-hero-live-pill {
    flex: 0 0 auto;
}

.league-v3-linked-team-main > div {
    min-width: 0;
}

.league-v3-linked-team-main .font-bold {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-linked-team-controls {
    flex: 0 0 auto;
    width: auto;
    margin-left: 0;
}

.league-v3-linked-team-controls .hub-live-refresh {
    width: auto;
}

.standings-title-group {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .65rem;
}

.league-standings-gameweek-select {
    min-width: 8.2rem;
    max-width: 10rem;
    min-height: 2rem;
    padding: .35rem 1.8rem .35rem .7rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--border-color)) !important;
    border-radius: 999px;
    background: var(--bg-surface, var(--bg-card)) !important;
    color: var(--text-primary) !important;
    font-size: .74rem;
    font-weight: 700;
}

.league-standings-gameweek-select:focus {
    border-color: var(--color-accent) !important;
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 16%, transparent);
}

.league-v3-analytics-view > .league-v3-manager-month-card {
    align-self: center;
    box-sizing: border-box;
    width: calc(100% - 2.25rem) !important;
    min-height: 4.35rem;
    margin: 0 0 .55rem !important;
    padding: .68rem .85rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 48%, var(--league-line)) !important;
    border-left: 3px solid var(--color-accent) !important;
    border-radius: 18px;
    background: var(--league-panel) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.league-v3-manager-month-card:hover,
.league-v3-manager-month-card:focus-visible {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 .1rem color-mix(in srgb, var(--color-accent) 12%, transparent) !important;
}

.league-v3-manager-month-icon {
    width: 1.95rem !important;
    height: 1.95rem !important;
    flex-basis: 1.95rem !important;
    border-radius: .65rem;
    background: color-mix(in srgb, var(--color-accent) 13%, transparent) !important;
    color: var(--color-accent) !important;
}

.league-v3-manager-month-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.league-v3-manager-month-copy {
    gap: .06rem;
}

.league-v3-manager-month-label,
.league-v3-manager-month-copy strong,
.league-v3-manager-month-copy small {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

.league-v3-manager-month-label {
    color: var(--league-muted) !important;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .18rem;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.15;
}

.league-v3-manager-month-period {
    color: var(--color-accent) !important;
    font-size: .86rem;
    font-weight: 700;
}

.league-v3-manager-month-copy strong {
    font-size: .94rem;
    line-height: 1.12;
}

.league-v3-manager-month-copy small {
    font-size: .68rem;
    line-height: 1.15;
}

.league-v3-manager-month-action {
    color: var(--color-accent) !important;
    font-size: .66rem;
}

.league-v3-analytics-view > .league-v3-records {
    box-sizing: border-box;
    width: calc(100% - 2.25rem);
    align-self: center;
    margin: 0 0 .55rem !important;
    border-radius: 18px;
    background: var(--league-panel) !important;
}

.league-v3-records-toggle {
    gap: .65rem;
    padding: .72rem .85rem;
}

.league-v3-records-icon {
    width: 2.15rem !important;
    height: 2.15rem !important;
    flex-basis: 2.15rem !important;
    border-radius: .7rem;
}

.league-v3-records-icon svg {
    width: 1.2rem;
    height: 1.2rem;
}

.league-v3-records-heading strong {
    font-size: 1.12rem !important;
    line-height: 1.12;
}

.league-v3-records-heading small {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    font-size: .72rem;
    line-height: 1.18;
}

.league-v3-analytics-view > .league-v3-pinned--comparison {
    box-sizing: border-box;
    width: calc(100% - 2.25rem);
    align-self: center;
    margin: 0 0 .55rem !important;
    padding: .68rem .85rem !important;
    border-radius: 18px;
    background: var(--league-panel) !important;
}

.league-month-modal-eyebrow,
.league-month-list-arrow,
.league-month-rank,
.league-month-top-three-row > b {
    color: var(--color-accent) !important;
}

.league-month-list-item.is-current {
    border-color: color-mix(in srgb, var(--color-accent) 65%, var(--league-line)) !important;
    background: linear-gradient(90deg, rgba(0, 255, 135, .13), var(--league-panel-2)) !important;
}

@media (max-width: 640px) {
    .league-v3-analytics-view > .league-v3-manager-month-card,
    .league-v3-analytics-view > .league-v3-records,
    .league-v3-analytics-view > .league-v3-pinned--comparison {
        width: calc(100% - 2rem) !important;
    }

    .league-v3-standings-view .card-section-header {
        gap: .3rem;
        padding-right: .5rem;
        padding-left: .5rem;
    }

    .league-v3-standings-view > .card {
        width: auto !important;
        margin-right: 0;
        margin-left: 0;
    }

    .league-v3-standings-view .standings-title-group {
        gap: .3rem;
    }

    .league-v3-standings-view .standings-heading {
        font-size: .92rem;
    }

    .league-v3-standings-view .league-standings-gameweek-select {
        min-width: 8.1rem;
        max-width: 9.4rem;
        padding-right: 1.45rem;
        padding-left: .55rem;
        font-size: .64rem;
    }

    .league-v3-standings-view .standings-view-toggle {
        padding: .15rem;
    }

    .league-v3-standings-view .standings-view-toggle__button {
        min-height: 1.65rem;
        padding-right: .42rem;
        padding-left: .42rem;
        font-size: .61rem;
    }

    .league-v3-gameweek-analytics-heading {
        width: calc(100% - 2rem);
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .league-v3-gameweek-analytics-heading h2 {
        font-size: .98rem;
    }

    .league-v3-linked-team-card {
        align-items: center;
        flex-wrap: nowrap;
        gap: .65rem;
        width: calc(100% - 2rem) !important;
        margin-right: 16px !important;
        margin-left: 16px !important;
    }

    .league-v3-linked-team-main {
        flex-basis: auto;
        width: 100%;
    }

    .league-v3-linked-team-controls {
        width: 100%;
        padding-top: .55rem;
        border-top: 1px solid var(--league-line);
    }

    .league-v3-linked-team-controls .hub-live-refresh {
        justify-content: flex-end;
    }

}

.league-v3-vs-card {
    min-height: 9.25rem;
}

.league-v3-vs-side b {
    margin-top: .25rem;
    padding-top: 0;
}

.league-v3-vs-side small {
    line-height: 1.2;
}

.league-v3-honour-strip--standalone {
    gap: .65rem;
    margin-bottom: 1rem;
}

.league-v3-honour-strip--standalone .league-v3-honour-card {
    min-height: 4.7rem;
    padding: .75rem .9rem;
    border: 1px solid var(--league-line) !important;
    border-left: 3px solid var(--color-accent) !important;
    border-radius: 1.05rem;
    background: linear-gradient(135deg, rgba(0, 255, 135, .09), var(--league-panel) 62%) !important;
    box-shadow: none;
}

.league-v3-honour-strip--standalone .league-v3-honour-card--purple {
    border-left-color: var(--color-primary-light) !important;
    background: linear-gradient(135deg, rgba(139, 107, 240, .1), var(--league-panel) 62%) !important;
}

.league-v3-honour-strip--standalone .league-v3-honour-icon {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border-radius: .8rem;
    background: rgba(0, 255, 135, .1);
    color: var(--color-accent);
}

.league-v3-honour-strip--standalone .league-v3-honour-card--purple .league-v3-honour-icon {
    background: rgba(139, 107, 240, .14);
    color: var(--color-primary-light);
}

.league-v3-honour-strip--standalone .league-v3-honour-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.league-v3-honour-strip--standalone .league-v3-honour-label {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.league-v3-honour-strip--standalone .league-v3-honour-card strong {
    margin-top: .12rem;
    font-size: .98rem;
    line-height: 1.1;
}

.league-v3-honour-strip--standalone .league-v3-honour-card small {
    margin-top: .12rem;
    font-size: .72rem;
    line-height: 1.15;
}

.league-v3-standings-view > .card {
    overflow: hidden;
    border-radius: 1.25rem !important;
    background: linear-gradient(160deg, var(--league-panel), var(--bg-primary)) !important;
    box-shadow: none;
}

.league-v3-standings-view .card-section-header {
    padding: .95rem .5rem .7rem;
}

.league-v3-standings-view .standings-table {
    border-collapse: separate;
    border-spacing: 0;
}

.league-v3-standings-view .standings-table thead th {
    padding: .55rem .5rem !important;
    border-bottom: 1px solid var(--league-line);
    font-size: .64rem !important;
    font-weight: 700;
    letter-spacing: .09em;
}

.league-v3-standings-view .standings-table tbody td {
    padding: .58rem .5rem !important;
    border-bottom: 1px solid color-mix(in srgb, var(--league-line) 72%, transparent);
    vertical-align: middle;
}

.league-v3-standings-view .standings-table tbody tr:last-child td {
    border-bottom: 0;
}

.league-v3-standings-view .standings-table th:first-child,
.league-v3-standings-view .standings-table td:first-child {
    width: 3.35rem !important;
}

.league-v3-standings-view .standings-classic-table th:nth-child(3),
.league-v3-standings-view .standings-classic-table td:nth-child(3),
.league-v3-standings-view .standings-classic-table th:nth-child(4),
.league-v3-standings-view .standings-classic-table td:nth-child(4) {
    width: 4.1rem !important;
}

.league-v3-standings-view .standings-h2h-table th:nth-child(3),
.league-v3-standings-view .standings-h2h-table td:nth-child(3) {
    width: 2.65rem !important;
}

.league-v3-standings-view .standings-h2h-table th:last-child,
.league-v3-standings-view .standings-h2h-table td:last-child {
    width: 4.25rem !important;
}

.league-v3-standings-view .standings-table tbody td:nth-child(2) .font-bold {
    display: block;
    overflow: hidden;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .76rem !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.league-v3-standings-view .standings-table tbody td:nth-child(2) .text-muted {
    display: block;
    margin-top: .12rem;
    overflow: hidden;
    color: var(--league-muted) !important;
    font-family: 'Inter', var(--font-sans);
    font-size: .62rem !important;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.league-v3-standings-view .standings-table tbody td:nth-child(n+3) {
    color: var(--league-text) !important;
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .72rem !important;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me {
    background: linear-gradient(90deg, rgba(0, 255, 135, .16), rgba(0, 255, 135, .05)) !important;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me td {
    border-top: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    background: transparent !important;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me td:first-child {
    border-left: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    border-top-left-radius: 1.1rem;
    border-bottom-left-radius: 1.1rem;
}

.league-v3-standings-view .standings-table tbody tr.standings-row-me td:last-child {
    border-right: 1px solid color-mix(in srgb, var(--color-accent) 38%, var(--league-line));
    border-top-right-radius: 1.1rem;
    border-bottom-right-radius: 1.1rem;
}

@media (max-width: 640px) {
    .league-v3-vs-card {
        min-height: 8.75rem;
    }

    .league-v3-honour-strip--standalone {
        gap: .5rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-card {
        min-height: 4.35rem;
        padding: .65rem .75rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-icon {
        width: 2.15rem;
        height: 2.15rem;
        flex-basis: 2.15rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-card strong {
        font-size: .9rem;
    }

    .league-v3-honour-strip--standalone .league-v3-honour-card small {
        font-size: .68rem;
    }

    .league-v3-standings-view .standings-table th:first-child,
    .league-v3-standings-view .standings-table td:first-child {
        width: 3.05rem !important;
    }

    .league-v3-standings-view .standings-classic-table th:nth-child(3),
    .league-v3-standings-view .standings-classic-table td:nth-child(3),
    .league-v3-standings-view .standings-classic-table th:nth-child(4),
    .league-v3-standings-view .standings-classic-table td:nth-child(4) {
        width: 3.65rem !important;
    }
}

/* Final responsive alignment for the active league portal. */
.league-v3-standings-view .standings-table th:first-child,
.league-v3-standings-view .standings-table td:first-child {
    width: 2.8rem !important;
}

.league-v3-standings-view .standings-position-cell {
    width: 2.8rem !important;
    padding: .35rem .12rem !important;
    text-align: left !important;
}

.league-v3-standings-view .standings-position-stack,
.league-v3-standings-view .standings-position-stack--flat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: .08rem;
    min-width: 0;
    text-align: left;
}

.league-v3-standings-view .standings-movement {
    min-width: 0;
    justify-content: flex-start;
    font-size: .64rem;
    text-align: left;
}

.league-v3-standings-view .standings-movement--flat {
    min-width: 1.05rem;
    font-size: .8rem;
}

.league-v3-standings-view .standings-rank {
    min-width: .9rem;
    text-align: left;
}

.league-v3-standings-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .7rem;
    padding: .35rem .15rem 0;
    color: var(--league-muted);
    font-size: .72rem;
}

.league-v3-standings-pager__actions {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
}

.league-v3-standings-pager__actions .btn {
    min-width: 2rem;
    padding: .2rem .5rem;
    line-height: 1.1;
}

@media (max-width: 640px) {
    .league-v3-standings-pager {
        align-items: flex-start;
        flex-direction: column;
        gap: .35rem;
    }
}

@media (max-width: 640px) {
    .league-v3-standings-view .standings-table th:first-child,
    .league-v3-standings-view .standings-table td:first-child,
    .league-v3-standings-view .standings-position-cell {
        width: 2.8rem !important;
    }

    .league-v3-standings-view .standings-movement {
        min-width: 0;
        font-size: .6rem;
    }
}

.league-v3-page-title-bar {
    margin-bottom: var(--space-4) !important;
}

.league-v3-page-title-bar > div:first-child > .flex {
    margin-bottom: 0 !important;
    gap: .25rem !important;
}

.league-v3-page-title-main {
    min-width: 0;
}

.league-v3-page-title-bar .page-title {
    margin: 0 !important;
    line-height: 1.05 !important;
}

.league-v3-page-title-bar .page-title + p {
    margin-top: 0 !important;
    line-height: 1.15 !important;
}

/* Long FPL league names must wrap without pushing the back control off-screen. */
.league-v3-page-heading {
    display: flex !important;
    min-width: 0;
    align-items: flex-start !important;
    gap: 0.5rem !important;
}

.league-v3-page-heading > .favorite-toggle {
    margin-left: auto;
}

.league-v3-page-title-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.league-v3-page-heading > .league-v3-page-title-text,
.league-v3-page-heading > .league-v3-page-title-stack {
    min-width: 0;
    flex: 1 1 auto;
}

.league-v3-page-title-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.05;
}

.league-v3-page-title-sub {
    margin: 0;
    padding: 0;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.15;
    color: var(--text-muted);
}

.entry-page-title-bar {
    margin-bottom: var(--space-5);
}

.entry-page-title-bar .page-title {
    margin: 0;
}

.league-v3-page-heading > a,
.league-v3-page-heading > button,
.league-v3-page-heading > .favorite-toggle,
.league-v3-page-heading > .league-v3-back-btn {
    flex: 0 0 auto;
    margin-top: .05rem;
}

/* League / team back control — brighter icon-only pill, not faded ghost gray. */
.league-v3-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 100%);
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px) saturate(1.15);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.league-v3-back-btn:hover,
.league-v3-back-btn:focus-visible {
    border-color: rgba(255, 255, 255, 0.42);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.1) 100%);
    color: #ffffff;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    outline: none;
}

.league-v3-back-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.22));
}

/* The league portal uses the full content rail; keep only a compact gutter
   around the title and portal sections. */
.content-body:has(.league-v3-page-title-bar) {
    padding: 1.25rem 1.25rem calc(1.25rem + var(--bottom-nav-offset) + 60px);
}

@media (max-width: 768px) {
    .content-body:has(.league-v3-page-title-bar) {
        padding-top: calc(var(--app-header-offset) + var(--space-2));
    }
}

.league-v3-linked-team-card {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

@media (max-width: 640px) {
    /* Keep the subtitle and the first page section close together on mobile. */
    .hub-page-title-bar,
    .my-team-page-title-bar,
    .leagues-page-title-bar,
    .chat-page-title-bar {
        gap: .2rem !important;
        margin-bottom: .3rem !important;
    }

    .hub-page-title-bar > div:first-child,
    .my-team-page-title-bar > div:first-child,
    .leagues-page-title-bar > div:first-child,
    .chat-page-title-bar > div:first-child {
        min-width: 0;
    }

    .hub-page-title-bar .page-title,
    .my-team-page-title-bar .page-title,
    .leagues-page-title-bar .page-title,
    .chat-page-title-bar .page-title {
        margin: 0 !important;
        line-height: 1.05 !important;
    }

    .hub-page-title-bar > div:first-child > p,
    .my-team-page-title-bar > div:first-child > p,
    .leagues-page-title-bar > div:first-child > p,
    .chat-page-title-bar > div:first-child > p {
        margin-top: .05rem !important;
        margin-bottom: 0 !important;
        line-height: 1.1 !important;
    }

    .content-body:has(.league-v3-page-title-bar) {
        padding: .65rem .55rem calc(.65rem + var(--bottom-nav-offset) + 60px);
        padding-top: calc(var(--app-header-offset) + .65rem);
    }

    /* Breathing room below back / favorite row before tabs or content cards. */
    .league-v3-page-title-bar {
        gap: 0 !important;
        margin-bottom: var(--space-3) !important;
    }

    .entry-page-title-bar.league-v3-page-title-bar {
        margin-bottom: var(--space-4) !important;
    }

    .league-v3-page-title-bar > div:first-child {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 0 !important;
    }

    .league-v3-page-title-bar > div:first-child > .flex {
        flex-wrap: nowrap !important;
        gap: .2rem !important;
    }

    .league-v3-page-title-bar > div:first-child > .flex .badge {
        flex: 0 0 auto;
        padding: .14rem .38rem;
        font-size: .56rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .league-v3-page-title-bar .page-title {
        padding: 0 !important;
        margin: 0 !important;
        min-width: 0;
        font-size: clamp(.98rem, 5.5vw, 1.3rem) !important;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .league-v3-page-title-bar .page-title + p {
        margin: 0 !important;
        padding: 0 !important;
        font-size: .68rem !important;
        line-height: 1.1 !important;
        white-space: normal;
    }

    .league-v3-page-title-bar ~ .league-v3-tabs {
        margin-top: .3rem !important;
    }

    .league-v3-linked-team-card {
        width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .league-v3-standings-view .league-standings-gameweek-select {
        min-width: 8.1rem;
        max-width: 9.4rem;
        padding-right: 1.35rem;
        padding-left: .5rem;
        font-size: .64rem;
    }
}

.league-v3-global-honors-heading {
    align-self: center;
    width: 100%;
    margin: .1rem 0 .35rem;
    order: 0;
}

.league-v3-global-honors-heading h2,
.league-v3-gameweek-analytics-heading h2 {
    margin: 0;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.1;
    text-transform: none;
}

.league-v3-gameweek-analytics-heading {
    align-items: center !important;
    width: 100%;
}

.league-v3-analytics-view > .league-v3-manager-month-card,
.league-v3-analytics-view > .league-v3-records,
.league-v3-analytics-view > .league-v3-pinned--comparison {
    width: 100% !important;
}

@media (max-width: 640px) {
    .league-v3-analytics-view > .league-v3-manager-month-card {
        width: 100% !important;
    }

    .league-v3-gameweek-analytics-heading {
        flex-wrap: nowrap !important;
    }

    .league-v3-carousel-intro {
        width: calc(100% - 2rem);
        margin-right: auto;
        margin-left: auto;
    }

    .league-v3-carousel-track {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .league-v3-carousel-track .league-v3-vs-card {
        flex-basis: 100%;
        min-width: 100%;
    }
}

/* Final analytics alignment: every section follows the tab group's gutter. */
.league-v3-analytics-view > .league-v3-global-honors-heading,
.league-v3-analytics-view > .league-v3-gameweek-analytics-heading,
.league-v3-analytics-view > .league-v3-manager-month-card,
.league-v3-analytics-view > .league-v3-records,
.league-v3-analytics-view > .league-v3-pinned--comparison,
.league-v3-analytics-view .league-v3-carousel-intro,
.league-v3-analytics-view .league-v3-carousel-track {
    align-self: center;
    width: 100% !important;
}

.league-v3-analytics-view .league-v3-carousel-intro {
    margin-right: 0;
    margin-left: 0;
}

.league-v3-analytics-view .league-v3-carousel-track {
    padding-right: 0;
    padding-left: 0;
}

/* Match Manager Watch card width (peek next card on swipe). */
.league-v3-analytics-view .league-v3-carousel-track:not(.league-v3-player-watch-track) .league-v3-vs-card {
    flex: 0 0 min(88%, 25rem);
    min-width: 0;
    max-width: min(88%, 25rem);
}

.league-v3-analytics-view > .league-v3-manager-month-card {
    border: 1px solid var(--league-line) !important;
    background: var(--league-panel) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4) !important;
}

.league-season-records-modal .league-v3-records-section + .league-v3-records-section {
    margin-top: 1.1rem;
}

.league-season-records-modal .league-v3-records-section-head {
    align-items: center;
    flex-direction: row;
}

.league-season-records-modal .league-v3-records-section-head h3 {
    color: var(--league-text) !important;
    font-size: 1rem;
    font-weight: 700;
}

.league-season-records-modal .league-v3-record-row,
.league-v3-records-section .league-v3-record-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 0;
    margin-top: .4rem;
    padding: .5rem .65rem;
    border-radius: .85rem;
    color: inherit;
    text-decoration: none;
}

a.league-v3-record-row:hover,
a.league-v3-record-row:focus-visible {
    background: color-mix(in srgb, var(--color-accent) 10%, var(--league-panel-2, var(--bg-surface)));
    outline: none;
}

.league-season-records-modal .league-v3-record-rank,
.league-v3-records-section .league-v3-record-rank {
    width: 1.15rem;
    flex-basis: 1.15rem;
    font-size: .8rem;
}

.league-season-records-modal .league-v3-record-info strong,
.league-v3-records-section .league-v3-record-info strong {
    font-size: .76rem !important;
    font-weight: 700;
    line-height: 1.2;
}

.league-season-records-modal .league-v3-record-info small,
.league-v3-records-section .league-v3-record-info small {
    font-size: .62rem !important;
    line-height: 1.2;
}

.league-v3-record-gw {
    flex: 0 0 auto;
    padding: .1rem .38rem;
    border: 1px solid var(--league-line, var(--color-border));
    border-radius: 999px;
    color: var(--league-muted, var(--color-muted));
    font-family: 'Inter', var(--font-sans);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
    white-space: nowrap;
}

.league-season-records-modal .league-v3-record-row > b,
.league-v3-records-section .league-v3-record-row > b {
    font-size: .84rem !important;
    font-weight: 800;
    line-height: 1.1;
}

.league-season-records-modal .league-v3-record-row > b.is-positive,
.league-v3-records-section .league-v3-record-row > b.is-positive {
    color: var(--color-accent) !important;
}

.league-season-records-modal .league-v3-record-row > b.is-negative,
.league-v3-records .league-v3-record-row > b.is-negative {
    color: var(--color-danger, #ff4d7a);
}

.league-v3-chip-group-label {
    margin: 0.65rem 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.league-v3-chip-group-label:first-child {
    margin-top: 0.15rem;
}
.league-v3-records-section .league-v3-record-row > b.is-negative {
    color: var(--color-danger) !important;
}

@media (max-width: 640px) {
    .league-v3-analytics-view > .league-v3-global-honors-heading,
    .league-v3-analytics-view > .league-v3-gameweek-analytics-heading,
    .league-v3-analytics-view > .league-v3-manager-month-card,
    .league-v3-analytics-view > .league-v3-records,
    .league-v3-analytics-view > .league-v3-pinned--comparison,
    .league-v3-analytics-view .league-v3-carousel-intro,
    .league-v3-analytics-view .league-v3-carousel-track {
        width: 100% !important;
    }
}

/* Insight card copy: the side labels identify each metric; the footer explains it. */
.league-v3-analytics-view .league-v3-a-eyebrow {
    display: none !important;
}

.league-v3-analytics-view .league-v3-carousel-intro h2 {
    margin: 0 !important;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: -.01em;
    line-height: 1.1;
    text-transform: none;
}

.league-v3-analytics-view .league-v3-vs-card::after {
    display: block;
    margin-top: .55rem;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .64rem;
    line-height: 1.25;
}

.league-v3-analytics-view [aria-label="League analytics carousel"] .league-v3-vs-card:nth-child(6)::after {
    content: "Best and worst transfer returns from this Gameweek.";
}

.league-v3-h2h-detail-card {
    display: flex;
    flex-direction: column;
}

.league-v3-h2h-card-note {
    display: block;
    margin: .55rem 1rem 0;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .64rem;
    line-height: 1.25;
}

.league-v3-h2h-neutral-value {
    color: var(--league-text);
}

/* Dedicated analytics group for managers who may have stopped maintaining a team. */
.league-v3-watch-group {
    align-self: center;
    width: 100%;
    margin: .2rem 0 .7rem;
}

/* Keep the analytics groups in the intended reading order. */
.league-v3-analytics-view {
    display: flex;
    flex-direction: column;
}

.league-v3-analytics-view > .league-v3-global-honors-heading {
    order: 0 !important;
}

.league-v3-analytics-view > .league-v3-manager-month-card {
    order: 10 !important;
}

.league-v3-analytics-view > .league-v3-records {
    order: 20 !important;
}

.league-v3-analytics-view > .league-v3-gameweek-analytics-heading {
    order: 30 !important;
}

.league-v3-analytics-view > .league-v3-pinned {
    order: 40 !important;
}

.league-v3-analytics-view > .league-v3-analytics-insights {
    order: 50 !important;
}

.league-v3-analytics-view > .league-v3-player-watch-group {
    order: 55 !important;
    align-self: center;
    width: 100%;
    margin: .2rem 0 .7rem;
}

.league-v3-player-watch-track {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
}

.league-v3-player-watch-card .league-v3-vs-inner,
.league-v3-player-watch-card .league-v3-vs-side {
    width: 100%;
}

.league-v3-player-watch-card .league-v3-vs-side {
    gap: .35rem;
}

.league-v3-player-watch-card::after {
    display: none !important;
}

/* Player Watch is a denser carousel: two cards can share the viewport. */
.league-v3-analytics-view .league-v3-player-watch-track {
    gap: .7rem;
}

.league-v3-analytics-view .league-v3-player-watch-track .league-v3-player-watch-card {
    flex: 0 0 calc(50% - .35rem);
    min-width: calc(50% - .35rem);
    padding: .85rem;
    border-radius: 1rem;
}

.league-v3-player-watch-card .league-v3-vs-inner {
    min-height: 0;
}

.league-v3-player-watch-card .league-v3-vs-side {
    align-items: flex-start;
    justify-content: flex-start;
}

.league-v3-insight-owner-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--league-muted);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.league-v3-insight-owner-link:hover,
.league-v3-insight-owner-link:focus-visible {
    color: var(--color-accent);
    outline: none;
}

@media (max-width: 520px) {
    .league-v3-analytics-view .league-v3-player-watch-track .league-v3-player-watch-card {
        flex-basis: calc(50% - .35rem);
        min-width: calc(50% - .35rem);
    }
}

.league-v3-analytics-view > .league-v3-watch-group {
    order: 60 !important;
}

.league-v3-watch-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 .55rem;
}

.league-v3-watch-heading h2 {
    margin: 0;
    color: var(--league-text) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.1;
}

.league-v3-watch-heading small,
.league-v3-watch-empty small {
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .67rem;
    line-height: 1.25;
}

.league-v3-watch-list {
    display: grid;
    gap: .45rem;
}

.league-v3-watch-item,
.league-v3-watch-empty {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    box-sizing: border-box;
    padding: .68rem .8rem;
    border: 1px solid var(--league-line);
    border-radius: 1rem;
    background: var(--league-panel);
    color: var(--league-text);
    text-decoration: none;
}

.league-v3-watch-item:hover,
.league-v3-watch-item:focus-visible {
    border-color: var(--league-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 255, 135, .1);
}

.league-v3-watch-copy,
.league-v3-watch-signals {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.league-v3-watch-copy strong {
    overflow: hidden;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .86rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-watch-copy small {
    overflow: hidden;
    margin-top: .12rem;
    color: var(--league-muted);
    font-size: .67rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-watch-signals {
    flex: 0 0 auto;
    align-items: flex-end;
    color: var(--league-accent);
    font-family: 'Inter', var(--font-sans);
    font-size: .65rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

.league-v3-watch-empty {
    align-items: flex-start;
    flex-direction: column;
    gap: .2rem;
}

.league-v3-watch-empty strong {
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .82rem;
}

.league-v3-watch-grid {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    padding: .1rem .05rem .4rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.league-v3-watch-grid::-webkit-scrollbar {
    display: none;
}

.league-v3-watch-card {
    flex: 0 0 min(88%, 25rem);
    min-width: 0;
    box-sizing: border-box;
    padding: .72rem;
    border: 1px solid var(--league-line);
    border-radius: 1rem;
    background: var(--league-panel);
    scroll-snap-align: start;
}

.league-v3-watch-card-title {
    display: block;
    color: var(--league-text);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .8rem;
    line-height: 1.15;
}

.league-v3-watch-card-info {
    display: block;
    min-height: 2.1em;
    margin-top: .22rem;
    color: var(--league-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .62rem;
    line-height: 1.25;
}

.league-v3-watch-card .league-v3-watch-list {
    margin-top: .55rem;
}

.league-v3-watch-card .league-v3-watch-item {
    padding: .52rem .58rem;
    border-radius: .75rem;
    background: var(--league-panel-2, var(--league-panel));
}

.league-v3-watch-card .league-v3-watch-copy strong {
    font-size: .73rem;
}

.league-v3-watch-card .league-v3-watch-copy small,
.league-v3-watch-card .league-v3-watch-signals {
    font-size: .59rem;
}

.league-v3-watch-card .league-v3-watch-empty {
    margin-top: .55rem;
    padding: .48rem .55rem;
    border-radius: .7rem;
}

@media (max-width: 640px) {
    .league-v3-watch-heading {
        margin-bottom: .45rem;
    }

    .league-v3-watch-heading h2 {
        font-size: .98rem;
    }

    .league-v3-watch-heading small {
        display: block;
        max-width: 15rem;
    }

    .league-v3-watch-item,
    .league-v3-watch-empty {
        padding: .62rem .7rem;
    }

    .league-v3-watch-signals {
        max-width: 45%;
        font-size: .6rem;
    }

    .league-v3-watch-card-info {
        min-height: 0;
    }
}

.league-v3-watch-card-action {
    display: block;
    width: 100%;
    margin-top: .55rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.league-v3-watch-card-action .league-v3-watch-item {
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.league-v3-watch-card-action:hover .league-v3-watch-item,
.league-v3-watch-card-action:focus-visible .league-v3-watch-item {
    border-color: var(--league-accent);
    background: var(--league-panel-2, var(--league-panel));
    outline: none;
    transform: translateY(-1px);
}

.league-v3-watch-card-action:focus-visible {
    outline: none;
}

.league-v3-watch-view-all {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .25rem;
    margin-top: .35rem;
    color: var(--league-accent);
    font-family: 'Inter', var(--font-sans);
    font-size: .61rem;
    font-weight: 700;
}

.league-v3-watch-modal {
    width: min(34rem, calc(100vw - 2rem));
    max-height: min(80vh, 44rem);
    overflow: hidden auto;
}

.league-manager-watch-modal-list {
    display: grid;
    gap: .45rem;
}

.league-manager-watch-modal-row {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .6rem;
    min-width: 0;
    padding: .7rem .75rem;
    border: 1px solid var(--league-line);
    border-radius: .85rem;
    background: var(--league-panel);
    color: var(--league-text);
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease;
}

.league-manager-watch-modal-row:hover,
.league-manager-watch-modal-row:focus-visible {
    border-color: var(--league-accent);
    background: var(--league-panel-2, var(--league-panel));
    outline: none;
}

.league-manager-watch-modal-rank {
    display: grid;
    width: 1.45rem;
    height: 1.45rem;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 255, 135, .1);
    color: var(--league-accent);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .72rem;
    font-weight: 700;
}

.league-manager-watch-modal-row .league-v3-watch-copy strong {
    font-size: .82rem;
}

.league-manager-watch-modal-row .league-v3-watch-copy small,
.league-manager-watch-modal-row .league-v3-watch-signals {
    font-size: .62rem;
}

@media (max-width: 640px) {
    .league-manager-watch-modal-row {
        grid-template-columns: 1.45rem minmax(0, 1fr) auto;
        gap: .45rem;
        padding: .62rem .58rem;
    }

    .league-manager-watch-modal-row .league-v3-watch-signals {
        max-width: 7.5rem;
    }
}
.league-v3-watch-card--chips {
    min-width: 0;
}

.league-v3-watch-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
    margin-top: .7rem;
}

.league-v3-watch-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .35rem;
    min-width: 0;
    padding: .45rem .55rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .035);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.league-v3-watch-chip:hover,
.league-v3-watch-chip:focus-visible {
    border-color: var(--color-accent, #00ff85);
    outline: none;
}

.league-v3-watch-chip strong {
    min-width: 0;
    overflow: hidden;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-watch-chip span {
    flex: 0 0 auto;
    color: var(--color-accent, #00ff85);
    font-weight: 800;
}

/* Final mobile title rhythm for Hub, My Team, Leagues and Chats. */
@media (max-width: 768px) {
    .hub-page-title-bar,
    .my-team-page-title-bar,
    .leagues-page-title-bar,
    .favorites-page-title-bar,
    .chat-page-title-bar {
        gap: .15rem !important;
        margin-bottom: .2rem !important;
    }

    .hub-page-title-bar > div:first-child,
    .my-team-page-title-bar > div:first-child,
    .leagues-page-title-bar > div:first-child,
    .favorites-page-title-bar > div:first-child,
    .chat-page-title-bar > div:first-child {
        min-width: 0 !important;
    }

    .hub-page-title-bar .page-title,
    .my-team-page-title-bar .page-title,
    .leagues-page-title-bar .page-title,
    .favorites-page-title-bar .page-title,
    .chat-page-title-bar .page-title {
        margin: 0 !important;
        line-height: 1.05 !important;
    }

    .hub-page-title-bar > div:first-child > p,
    .my-team-page-title-bar > div:first-child > p,
    .leagues-page-title-bar > div:first-child > p,
    .favorites-page-title-bar > div:first-child > p,
    .chat-page-title-bar > div:first-child > p {
        margin: .05rem 0 0 !important;
        line-height: 1.1 !important;
    }

    .leagues-page-title-bar {
        margin-bottom: .55rem !important;
    }

    .leagues-inbox {
        gap: .5rem;
    }

    .favorites-page-title-bar {
        margin-bottom: .55rem !important;
    }

    .favorites-toolbar {
        margin-bottom: .5rem;
    }
}

/* Keep analytics carousels inside the page so they can scroll horizontally. */
.league-v3-analytics-view > .league-v3-analytics-insights,
.league-v3-analytics-view > .league-v3-player-watch-group,
.league-v3-analytics-view > .league-v3-watch-group,
.league-v3-analytics-view .league-v3-carousel-track,
.league-v3-analytics-view .league-v3-watch-grid {
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 641px) {
    .league-v3-analytics-view .league-v3-carousel-track,
    .league-v3-analytics-view .league-v3-watch-grid {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        cursor: grab;
    }

    .league-v3-analytics-view .league-v3-carousel-track.is-dragging,
    .league-v3-analytics-view .league-v3-watch-grid.is-dragging {
        cursor: grabbing;
        scroll-snap-type: none;
        user-select: none;
    }

    /* Match Manager Watch: same card width so layouts feel consistent. */
    .league-v3-analytics-view .league-v3-carousel-track:not(.league-v3-player-watch-track) .league-v3-vs-card {
        flex: 0 0 min(88%, 25rem);
        min-width: 0;
        max-width: min(88%, 25rem);
    }
}

.favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
}

.favorite-toggle svg {
    width: 18px;
    height: 18px;
}

.favorite-toggle.is-on {
    color: #f5c542;
    border-color: rgba(245, 197, 66, .45);
    background: rgba(245, 197, 66, .12);
}

.favorite-toggle.is-busy {
    opacity: .6;
}

.favorites-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem .75rem;
    margin: 0 0 0.65rem;
}

.favorites-jump {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.favorites-jump-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .75rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.favorites-jump-btn span {
    font-weight: 800;
    color: inherit;
}

.favorites-jump-btn.is-active {
    color: var(--text-primary, inherit);
    border-color: var(--color-accent);
    background: rgba(0, 255, 133, .1);
}

.favorites-search {
    flex: 1 1 12rem;
    min-width: 0;
}

.favorites-search input {
    width: 100%;
    min-height: 36px;
    padding: .4rem .75rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: inherit;
}

.favorites-group {
    margin-bottom: 1.25rem;
}

.favorites-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 .6rem;
}

.favorites-group-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
}

.favorites-group-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.favorites-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-primary, inherit);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.favorites-add-btn:hover,
.favorites-add-btn:focus-visible {
    border-color: var(--color-accent);
    background: rgba(0, 255, 133, .1);
}

.favorites-add-dialog .chat-dialog-title {
    margin: 0;
}

.favorites-add-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 var(--space-2);
}

.favorites-add-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: -.2rem -.2rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.favorites-add-dialog .form-input {
    width: 100%;
    margin: 0 0 var(--space-4);
}

.favorites-add-dialog-error {
    margin: -.65rem 0 var(--space-3);
    color: var(--color-danger, #e85d5d);
    font-size: .8rem;
}

.favorites-group-head small {
    color: var(--text-muted);
    font-size: .75rem;
}

.favorites-empty {
    padding: 1rem .9rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.favorites-empty strong {
    display: block;
    margin-bottom: .2rem;
}

.favorites-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: .85rem;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.favorites-card {
    display: flex;
    align-items: stretch;
    gap: .35rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.favorites-card-main {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    flex: 1;
    padding: .9rem .85rem;
    color: inherit;
    text-decoration: none;
}

.favorites-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    color: var(--color-accent);
}

.favorites-card-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.favorites-card-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .12rem;
}

.favorites-card-copy strong {
    font-size: .92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favorites-card-copy small {
    color: var(--text-muted);
    font-size: .75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favorites-card-points {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2rem;
    gap: .05rem;
}

.favorites-card-points strong {
    font-size: .82rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.favorites-card-points small {
    color: var(--text-muted);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.favorites-card-go {
    color: var(--text-muted);
    font-size: 1rem;
}

.favorites-card-remove {
    width: 40px;
    flex-shrink: 0;
    border: 0;
    border-left: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.favorites-card-remove:hover,
.favorites-card:hover {
    border-color: var(--color-accent);
}

.favorites-card:hover .favorites-card-main {
    color: inherit;
}

/* ── League Analytics dashboard: compact categories, grouped snapshot, sports battles ── */
.league-v3-analytics-view {
    --league-panel: #161a18;
    --league-panel-2: #1c211e;
    gap: 0;
}

.league-v3-analytics-toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .85rem;
    padding: .35rem 0 .55rem;
    background: color-mix(in srgb, var(--bg-primary, #101210) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.league-v3-analytics-cats {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    gap: .15rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

.league-v3-analytics-cats::-webkit-scrollbar {
    display: none;
}

.league-v3-analytics-cat {
    flex: 0 0 auto;
    min-height: 2.25rem;
    padding: .4rem .8rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary, #b0b0b0);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.league-v3-analytics-cat.is-active {
    background: color-mix(in srgb, var(--color-accent) 16%, transparent);
    color: var(--color-accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 38%, transparent);
}

.league-v3-section-head .league-v3-analytics-gw,
.league-v3-analytics-view .league-v3-analytics-gw,
.league-v3-analytics-gw {
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 4.7rem !important;
    max-width: 5.5rem !important;
    min-height: 2.15rem;
    padding: .28rem 1.35rem .28rem .55rem !important;
    font-size: .7rem !important;
}

.league-v3-analytics-gw-wrap {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.league-v3-gw-loading {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--text-muted, #8a8a8a);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.league-v3-analytics-dashboard.is-loading-gw .league-v3-analytics-panel > :not(.league-v3-section-head) {
    opacity: .48;
    pointer-events: none;
}

.league-v3-standings-view.is-loading-gw .table-responsive,
.league-v3-standings-view.is-loading-gw .standings-table {
    opacity: .48;
    pointer-events: none;
}

.league-v3-analytics-panel {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.league-v3-analytics-panel > .league-v3-pinned--comparison {
    box-sizing: border-box;
    width: 100% !important;
    margin: 0 !important;
    padding: .62rem .85rem .55rem !important;
    border: 1px solid color-mix(in srgb, var(--color-accent) 58%, var(--league-line, var(--border-color, #343434))) !important;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(0, 255, 135, .14), var(--league-panel, var(--bg-card)) 68%) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 0 .9rem color-mix(in srgb, var(--color-accent) 8%, transparent);
}

.league-v3-analytics-panel > .league-v3-pinned--comparison.is-above {
    border-color: color-mix(in srgb, var(--color-success, #00ff87) 70%, var(--league-line, var(--border-color, #343434))) !important;
}

.league-v3-analytics-panel > .league-v3-pinned--comparison.is-below {
    border-color: color-mix(in srgb, var(--color-danger) 70%, var(--league-line, var(--border-color, #343434))) !important;
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-danger) 16%, transparent), var(--league-panel, var(--bg-card)) 68%) !important;
}

.league-v3-analytics-panel > .league-v3-pinned--comparison .league-v3-pinned-note {
    margin-top: .42rem;
    padding-top: .42rem;
}

.league-v3-analytics-panel > .league-v3-pinned--comparison .league-v3-pinned-note b {
    flex: 0 0 auto;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

.league-v3-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: .15rem 0 0;
}

.league-v3-section-head > div:not(.league-v3-analytics-gw-wrap) {
    min-width: 0;
    flex: 1 1 auto;
}

.league-v3-section-head h2 {
    margin: 0;
    color: var(--text-primary, #f0f0f0);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.15;
}

.league-v3-section-head small {
    display: block;
    margin-top: .18rem;
    color: var(--text-muted, #6b6b6b);
    font-size: .68rem;
    line-height: 1.25;
}

.league-v3-snapshot {
    overflow: hidden;
    padding: 1.05rem 1.05rem .95rem;
    border: 1px solid var(--league-line, var(--border-color, #2a2a2a));
    border-radius: 1.2rem;
    background: var(--league-panel, var(--bg-card));
}

.league-v3-snapshot-duel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
}

.league-v3-snapshot-duel--two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
}

.league-v3-snapshot-duel--two .league-v3-snapshot-side + .league-v3-snapshot-side {
    border-left: 1px solid color-mix(in srgb, #fff 8%, transparent);
}

.league-v3-snapshot-side {
    min-width: 0;
    text-align: center;
}

.league-v3-snapshot-side span {
    display: block;
    color: var(--text-muted, #6b6b6b);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.league-v3-snapshot-side strong {
    display: block;
    margin-top: .28rem;
    color: var(--text-primary, #f4f4f4);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: clamp(1.7rem, 7vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1;
}

.league-v3-snapshot-side small {
    display: block;
    margin-top: .18rem;
    color: var(--text-muted, #6b6b6b);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.league-v3-snapshot-vs {
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: #101410;
    color: var(--text-secondary, #c8c8c8);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.league-v3-snapshot-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px solid var(--league-line, var(--border-color, #2a2a2a));
    color: var(--text-secondary, #b0b0b0);
    font-size: .72rem;
    line-height: 1.3;
    text-align: center;
}

.league-v3-snapshot-result b {
    flex: 0 0 auto;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .92rem;
    font-weight: 800;
}

.league-v3-snapshot.is-above .league-v3-snapshot-side:first-child strong,
.league-v3-snapshot.is-above .league-v3-snapshot-result b {
    color: var(--color-accent);
}

.league-v3-snapshot.is-below .league-v3-snapshot-side:first-child strong,
.league-v3-snapshot.is-below .league-v3-snapshot-result b {
    color: var(--color-danger);
}

.league-v3-highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.league-v3-highlight-grid > .league-v3-manager-month-card {
    order: 0;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    min-height: 4.35rem;
    margin: 0 !important;
    padding: .68rem .85rem;
    border: 0 !important;
    background: var(--league-panel, var(--bg-card)) !important;
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent), 0 8px 24px rgba(0, 0, 0, .22) !important;
    color: inherit;
    text-decoration: none;
}

.league-v3-highlight-grid > .league-v3-manager-month-card .league-v3-manager-month-action {
    white-space: nowrap;
}

.league-v3-insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.league-v3-insight-tile {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .18rem;
    min-height: 5.4rem;
    padding: .8rem .85rem;
    border: 0;
    border-radius: 1rem;
    background: var(--league-panel, var(--bg-card));
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.league-v3-insight-tile span {
    color: var(--text-muted, #6b6b6b);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.league-v3-insight-tile strong {
    overflow: hidden;
    max-width: 100%;
    color: var(--text-primary);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.league-v3-insight-tile b {
    margin-top: auto;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .78rem;
    font-weight: 700;
}

.league-v3-insight-tile b.is-positive {
    color: var(--color-accent);
}

.league-v3-carousel-block {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.league-v3-analytics-view .league-v3-carousel-track {
    padding: .1rem 0 .15rem;
    scroll-padding-inline: 0;
}

.league-v3-analytics-view .league-v3-carousel-track:not(.league-v3-player-watch-track) .league-v3-vs-card {
    flex: 0 0 min(86%, 24.5rem);
    min-width: 0;
    max-width: min(86%, 24.5rem);
    scroll-snap-align: start;
}

.league-v3-carousel-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 1.1rem;
    padding: 0 .1rem;
}

.league-v3-carousel-index {
    color: var(--text-muted, #6b6b6b);
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.league-v3-carousel-dots {
    display: flex;
    align-items: center;
    gap: .32rem;
}

.league-v3-carousel-dots span {
    width: .38rem;
    height: .38rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted) 45%, transparent);
}

.league-v3-carousel-dots span.is-active {
    width: .7rem;
    background: var(--color-accent);
}

.league-v3-analytics-view .league-v3-vs-card {
    min-height: 0;
    padding: 1rem 1rem .9rem;
    border: 0 !important;
    background: var(--league-panel, var(--bg-card)) !important;
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent), 0 8px 24px rgba(0, 0, 0, .22);
}

.league-v3-analytics-view .league-v3-vs-card::after {
    display: none !important;
}

.league-v3-analytics-view .league-v3-stat-tag {
    color: var(--text-muted);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.league-v3-analytics-view .league-v3-stat-tag.is-positive {
    color: var(--color-accent) !important;
}

.league-v3-analytics-view .league-v3-stat-tag.is-negative {
    color: var(--color-danger) !important;
}

.league-v3-analytics-view .league-v3-vs-divider {
    width: 1px;
    background: color-mix(in srgb, #fff 10%, transparent);
}

.league-v3-analytics-view .league-v3-vs-divider span {
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    border-radius: 999px;
    background: #101410 !important;
    color: #f2f2f2 !important;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.league-v3-vs-caption,
.league-v3-analytics-view .league-v3-h2h-card-note {
    margin: .7rem 0 0;
    color: var(--text-muted);
    font-size: .64rem;
    line-height: 1.3;
}

.league-v3-stat-stack {
    display: flex;
    flex-direction: column;
    padding: .25rem .15rem;
    border-radius: 1.15rem;
    background: var(--league-panel, var(--bg-card));
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent), 0 8px 24px rgba(0, 0, 0, .22);
}

.league-v3-stat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "label value"
        "name value"
        "meta value";
    gap: .12rem .75rem;
    padding: .85rem 1rem;
}

.league-v3-stat-row + .league-v3-stat-row {
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent);
}

.league-v3-stat-row-label {
    grid-area: label;
    color: var(--text-muted);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.league-v3-stat-row .league-v3-insight-link {
    grid-area: name;
    justify-self: start;
    min-height: 0;
    width: auto;
    font-size: .9rem;
}

.league-v3-stat-row small {
    grid-area: meta;
    color: var(--text-secondary);
    font-size: .68rem;
}

.league-v3-stat-row > b {
    grid-area: value;
    align-self: center;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', var(--font-mono);
    font-size: .92rem;
    font-weight: 700;
}

.league-v3-watch-stack {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.league-v3-watch-stack .league-v3-watch-card {
    flex: none;
    width: 100%;
    max-width: none;
    border: 0;
    background: var(--league-panel, var(--bg-card));
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent), 0 8px 24px rgba(0, 0, 0, .22);
}

.league-v3-analytics-panel > .league-v3-manager-month-card,
.league-v3-analytics-panel > .league-v3-records {
    order: 0;
    margin: 0 !important;
    width: 100% !important;
    border: 0 !important;
    background: var(--league-panel, var(--bg-card)) !important;
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent), 0 8px 24px rgba(0, 0, 0, .22) !important;
}

.league-v3-analytics-panel .league-v3-manager-month-period {
    color: var(--color-accent) !important;
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
    text-transform: none;
}

.league-v3-honors-card {
    padding: .75rem .85rem .7rem;
    border-radius: 1.15rem;
    background: var(--league-panel, var(--bg-card));
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent), 0 8px 24px rgba(0, 0, 0, .22);
}

.league-v3-honors-card.league-v3-records-section {
    margin-top: 0;
}

.league-v3-honors-card + .league-v3-honors-card {
    margin-top: .7rem;
}

.league-v3-honors-card .league-v3-records-section-head {
    align-items: center;
    margin: 0;
    padding: 0 0 .1rem;
}

.league-v3-honors-card .league-v3-records-section-head h3 {
    color: var(--text-primary);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.league-v3-analytics-view .league-v3-record-switch {
    border: 0;
    background: color-mix(in srgb, #fff 6%, transparent);
}

.league-v3-analytics-view .league-v3-record-switch button {
    color: var(--text-secondary);
    font-family: 'Space Grotesk', var(--font-sans);
    font-size: .68rem;
    font-weight: 600;
}

.league-v3-analytics-view .league-v3-record-switch button.is-active.is-positive {
    color: #04140d;
    background: var(--color-accent);
}

.league-v3-analytics-view .league-v3-record-switch button.is-active.is-negative {
    color: #fff;
    background: var(--color-danger);
}

.league-v3-honors-card .league-v3-record-row {
    margin-top: .35rem;
    padding: .45rem .55rem;
    background: color-mix(in srgb, #fff 4%, transparent);
}

.league-v3-honors-card .league-v3-chip-group-label {
    display: block;
    width: fit-content;
    margin: .55rem 0 .05rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Inter', var(--font-sans);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.league-v3-honors-card .league-v3-chip-group-label:first-child {
    margin-top: .2rem;
}

.league-v3-honors-card .league-v3-record-empty {
    padding: .55rem 0 .15rem;
    color: var(--text-muted);
    font-size: .72rem;
}

.league-v3-analytics-view .league-v3-vs-side b.is-positive,
.league-v3-stat-row > b.is-positive {
    color: var(--color-accent);
}

.league-v3-analytics-view .league-v3-vs-side b.is-negative,
.league-v3-stat-row > b.is-negative {
    color: var(--color-danger);
}

@media (min-width: 768px) {
    .league-v3-analytics-toolbar {
        padding-top: .15rem;
    }

    .league-v3-insight-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .league-v3-analytics-view .league-v3-carousel-track:not(.league-v3-player-watch-track) .league-v3-vs-card {
        flex-basis: min(52%, 28rem);
        max-width: min(52%, 28rem);
    }
}

@media (max-width: 640px) {
    .league-v3-analytics-toolbar {
        margin-bottom: .7rem;
        padding-bottom: .45rem;
    }

    .league-v3-analytics-cats {
        flex: 1 1 auto;
        width: 100%;
    }

    .league-v3-section-head .league-v3-analytics-gw,
    .league-v3-analytics-view .league-v3-analytics-gw,
    .league-v3-analytics-gw {
        min-width: 5.1rem !important;
        max-width: 6rem !important;
        min-height: 2rem;
        padding: .28rem 1.25rem .28rem .55rem !important;
        font-size: .68rem !important;
    }

    .league-v3-analytics-cat {
        min-height: 2.35rem;
        padding: .42rem .78rem;
        font-size: .78rem;
    }

    .league-v3-snapshot {
        padding: .95rem .9rem .85rem;
    }

    .league-v3-snapshot-side strong {
        font-size: 1.7rem;
    }

    .league-v3-insight-tile {
        min-height: 5.1rem;
        padding: .72rem .75rem;
    }

    .league-v3-highlight-grid {
        grid-template-columns: 1fr;
    }

    .league-v3-gw-loading-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}
