:root {
    color-scheme: dark;
    --bg: #0b0b0f;
    --sidebar: #0f0f15;
    --panel: #15151c;
    --panel-soft: #191920;
    --panel-border: rgba(255, 255, 255, 0.075);
    --text: #f3f4f6;
    --muted: #a6a7b3;
    --accent: #ed4245;
    --accent-soft: rgba(237, 66, 69, 0.12);
    --accent-border: rgba(237, 66, 69, 0.28);
    --win: #57f287;
    --loss: #ed4245;
    --draw: #5865f2;
    --focus-ring: #fbbf24;
    --surface-raised: #1d1d26;
    --shadow-panel: 0 16px 36px rgba(0, 0, 0, 0.18);
    --shadow-panel-hover: 0 20px 44px rgba(0, 0, 0, 0.26);
    --radius-panel: 16px;
    --radius-control: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    min-height: 44px;
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(237, 66, 69, 0.58);
    background-clip: padding-box;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    color: #17171d;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform .18s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, sans-serif;
    background:
        radial-gradient(circle at 76% -20%, rgba(237, 66, 69, 0.075), transparent 34rem),
        var(--bg);
    color: var(--text);
}

body.auth-pending .app-shell,
body.signed-out-mode .app-shell,
body.auth-pending .skip-link,
body.signed-out-mode .skip-link {
    display: none;
}

body.auth-pending .ls-logo-separator,
body.auth-pending .ls-logo-frame--team,
body.signed-out-mode .ls-logo-separator,
body.signed-out-mode .ls-logo-frame--team {
    display: none;
}

.login-page[hidden] {
    display: none;
}

.login-page {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 430px);
    place-items: center;
    align-content: center;
    justify-content: center;
    gap: 32px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(237, 66, 69, 0.13), transparent 28rem),
        #0b0b0f;
}

.login-page::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .32;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, #000, transparent 72%);
}

.login-card {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 24px;
    padding: clamp(28px, 6vw, 48px);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 24px;
    background: rgba(20, 20, 27, .86);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
    text-align: center;
}

.login-logo {
    width: 168px;
    height: 168px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .32);
}

.login-copy {
    display: grid;
    gap: 10px;
}

.login-kicker {
    margin: 0;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.login-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.65rem, 6vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.login-copy p:not(.login-kicker) {
    max-width: 34ch;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.login-discord-button {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border-radius: 12px;
    padding: 12px 18px;
    background: #5865f2;
    box-shadow: 0 12px 30px rgba(88, 101, 242, .24);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.login-discord-button svg {
    width: 24px;
    height: 24px;
    flex: none;
}

.login-discord-button:hover {
    background: #6875f5;
    box-shadow: 0 16px 36px rgba(88, 101, 242, .32);
}

.login-discord-button:active {
    background: #4c59df;
}

.login-unavailable,
.login-error {
    margin: -6px 0 0;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.5;
}

.login-error {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid rgba(237, 66, 69, .28);
    border-radius: 10px;
    background: rgba(237, 66, 69, .1);
    color: #ffb4b6;
}

.login-footer {
    margin: 0;
    color: #777985;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .login-page {
        padding-inline: 16px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .login-logo {
        width: 136px;
        height: 136px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-discord-button {
        transition: none;
    }
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 30%),
        var(--sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100vh;
    max-height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: 14px 0 34px rgba(0, 0, 0, 0.12);
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-logo {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 8px;
}

button.dashboard-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    box-shadow: none;
    flex-shrink: 0;
    font-weight: 500;
}

button.dashboard-refresh-btn:hover:not(:disabled) {
    background: rgba(237, 66, 69, 0.18);
    border-color: rgba(237, 66, 69, 0.35);
    color: #fff;
}

button.dashboard-refresh-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.dashboard-refresh-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.nav-icon,
.mobile-tab-icon,
.mobile-sheet-link-icon {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-refresh-btn.is-refreshing .dashboard-refresh-icon {
    animation: dashboard-refresh-spin 0.9s linear infinite;
}

@keyframes dashboard-refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand h1 {
    margin: 0;
    font-size: 1.42rem;
    letter-spacing: -0.025em;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 4px 5px 12px 0;
    overscroll-behavior: contain;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-group-title {
    margin: 0 0 2px;
    padding: 0 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #858692;
}

.nav-link {
    width: 100%;
    text-align: left;
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 11px;
    border: 1px solid transparent;
    background: transparent;
    color: #d8d9e0;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 550;
    display: flex;
    align-items: center;
    gap: 10px;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.nav-icon {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    color: var(--nav-icon-color, #c4c7d2);
    opacity: 1;
}

.nav-link[data-page="home"], .mobile-sheet-link[data-page="home"] { --nav-icon-color: #ff8b70; }
.nav-link[data-page="upcoming"], .mobile-sheet-link[data-page="upcoming"] { --nav-icon-color: #91a8ff; }
.nav-link[data-page="calendar"], .mobile-sheet-link[data-page="calendar"] { --nav-icon-color: #b9a7ff; }
.nav-link[data-page="team"], .mobile-sheet-link[data-page="team"] { --nav-icon-color: #f7c64e; }
.nav-link[data-page="scrims"], .mobile-sheet-link[data-page="scrims"] { --nav-icon-color: #c7afd9; }
.nav-link[data-page="ligue"], .mobile-sheet-link[data-page="ligue"] { --nav-icon-color: #ffad4a; }
.nav-link[data-page="stats"], .mobile-sheet-link[data-page="stats"] { --nav-icon-color: #7eb9ff; }
.nav-link[data-page="debriefs"], .mobile-sheet-link[data-page="debriefs"] { --nav-icon-color: #71d4b0; }
.nav-link[data-page="vods"], .mobile-sheet-link[data-page="vods"] { --nav-icon-color: #bc9af5; }
.nav-link[data-page="eva"], .mobile-sheet-link[data-page="eva"] { --nav-icon-color: #a37be8; }
.nav-link[data-page="result-eva-link"], .mobile-sheet-link[data-page="result-eva-link"] { --nav-icon-color: #d6c8e3; }
.nav-link[data-page="members"], .mobile-sheet-link[data-page="members"] { --nav-icon-color: #77c8ff; }
.nav-link[data-page="organization-settings"], .nav-link[data-page="discord-config"], .mobile-sheet-link[data-page="organization-settings"], .mobile-sheet-link[data-page="discord-config"] { --nav-icon-color: #b8a7f4; }
.nav-link[data-page="integrations"], .mobile-sheet-link[data-page="integrations"] { --nav-icon-color: #e9aa7e; }
.nav-link[data-page="bot-status"], .mobile-sheet-link[data-page="bot-status"] { --nav-icon-color: #8dc9b1; }
.nav-link[data-page="usage"], .mobile-sheet-link[data-page="usage"] { --nav-icon-color: #70c9eb; }
.nav-link[data-page="subscription"], .mobile-sheet-link[data-page="subscription"] { --nav-icon-color: #f1ca67; }

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.055);
}

.nav-link.active {
    color: #fff;
    background:
        linear-gradient(90deg, rgba(237, 66, 69, 0.18), rgba(237, 66, 69, 0.075));
    border-color: rgba(237, 66, 69, 0.18);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.application-version {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .7rem;
    letter-spacing: .04em;
    text-align: center;
}

.auth-panel,
.legacy-auth {
    display: grid;
    gap: 8px;
}

.auth-status {
    margin: 0;
    color: var(--text);
    font-size: .86rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.discord-login-button,
.auth-logout-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.discord-login-button {
    background: #5865f2;
}

.discord-login-button:hover {
    filter: brightness(1.08);
}

.auth-logout-button {
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--panel-border);
}

.signed-out-panel {
    max-width: 560px;
    margin: clamp(32px, 10vh, 110px) auto 0;
    padding: clamp(24px, 5vw, 42px);
    text-align: center;
}

.signed-out-panel h2 {
    margin: 0 0 12px;
}

.signed-out-panel .discord-login-button {
    margin-top: 20px;
}

.organization-select {
    width: 100%;
    margin-top: .35rem;
    padding: .65rem .75rem;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: .75rem;
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    transition: border-color 180ms ease, background-color 180ms ease;
}

.organization-select:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.065);
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.empty-state-cta {
    margin-top: 1rem;
    color: var(--accent, #f35b5b);
}

.field-label {
    font-size: 0.8rem;
    color: var(--muted);
}

.organization-branding-panel form {
    display: grid;
    gap: 0.75rem;
}

.organization-logo-editor {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.organization-logo-preview {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 1.25rem;
    font-weight: 700;
}

.organization-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.organization-logo-controls {
    display: grid;
    gap: 0.5rem;
}

.organization-logo-controls input[type="file"] {
    width: 100%;
}

.organization-logo-remove {
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--danger, #f87171);
}

.team-server-action-danger {
    background: transparent;
    border: 1px solid var(--danger, #f87171);
    color: var(--danger, #f87171);
}

.dashboard-close-submit,
.tab-btn[data-settings-tab="dashboard-close"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dashboard-close-icon {
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-close-panel form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-error {
    display: none;
    margin: 0;
    color: var(--danger, #f87171);
    font-size: 0.8rem;
}

.form-error.visible {
    display: block;
}

@media (max-width: 600px) {
    .organization-logo-editor {
        grid-template-columns: 1fr;
    }
}

input,
button {
    border-radius: 10px;
    border: 1px solid var(--panel-border);
    background: var(--panel);
    color: var(--text);
    padding: 10px 14px;
}

button {
    cursor: pointer;
    background: linear-gradient(135deg, #ed4245, #a61b1f);
    border: none;
    font-weight: 600;
}

.help-text {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
}

.help-text code {
    color: #fca5a5;
}

.main {
    /* Keep the dashboard dense on wide displays: content uses the available canvas. */
    padding: clamp(20px, 2vw, 36px);
    min-width: 0;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 0;
}

.page-header h2 {
    margin: 0 0 6px;
    font-size: 1.6rem;
}

.page-category {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(237, 66, 69, 0.12);
    border: 1px solid rgba(237, 66, 69, 0.25);
    color: #fca5a5;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.page-header p {
    margin: 0;
    color: var(--muted);
    max-width: 72ch;
    line-height: 1.55;
}

button,
a,
select,
input {
    touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-panel);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card-header h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.category-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-control);
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    cursor: pointer;
    font-size: 0.92rem;
    text-align: left;
}

.category-link:hover {
    background: rgba(237, 66, 69, 0.1);
    border-color: rgba(237, 66, 69, 0.25);
}

.home-section-title {
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.page-skeleton .skeleton-block {
    border-radius: 14px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-header {
    height: 72px;
    margin-bottom: 16px;
}

.skeleton-panel {
    min-height: 180px;
    margin-bottom: 16px;
}

.upcoming-skeleton-main {
    min-height: 420px;
}

.upcoming-skeleton-side {
    min-height: 320px;
}

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

.error-banner {
    background: rgba(237, 66, 69, 0.15);
    border: 1px solid rgba(237, 66, 69, 0.35);
    color: #fecaca;
    padding: 12px 16px;
    border-radius: 12px;
}

.hidden {
    display: none;
}

.stats-grid,
.panel-grid {
    display: grid;
    gap: 16px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.panel-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stat-card,
.panel {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 58%),
        var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-panel);
    padding: 18px;
    box-shadow: var(--shadow-panel);
}

.stat-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-value {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.stat-card.win .stat-value {
    color: var(--win);
}

.stat-card.loss .stat-value {
    color: var(--loss);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px 20px;
    margin-bottom: 14px;
}

.panel-header > * {
    min-width: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.type-item,
.player-item,
.debrief-item,
.vod-item,
.eva-player-block {
    padding: 12px 0;
    border-bottom: 1px solid var(--panel-border);
}

.type-item:last-child,
.player-item:last-child,
.debrief-item:last-child,
.vod-item:last-child,
.eva-player-block:last-child {
    border-bottom: none;
}

.muted {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.win {
    background: rgba(87, 242, 135, 0.15);
    color: var(--win);
}

.badge.loss {
    background: rgba(237, 66, 69, 0.15);
    color: var(--loss);
}

.badge.draw {
    background: rgba(88, 101, 242, 0.15);
    color: var(--draw);
}

.badge.type-scrim {
    background: rgba(88, 101, 242, 0.15);
    color: #9db0ff;
}

.badge.type-official {
    background: rgba(237, 66, 69, 0.15);
    color: #fca5a5;
}

.badge.type-event {
    background: rgba(250, 166, 26, 0.15);
    color: #fcd34d;
}

.upcoming-list {
    display: grid;
    gap: 12px;
}

.upcoming-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upcoming-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.upcoming-card-head,
.featured-upcoming-head-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.team-logo {
    flex-shrink: 0;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.upcoming-preview img.team-logo,
.home-teaser--suggestion img.team-logo,
.upcoming-page img.team-logo {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

.team-logo-sm {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.team-logo-md {
    width: 56px;
    height: 56px;
}

.team-logo-lg {
    width: 88px;
    height: 88px;
    border-radius: 18px;
}

.team-logo-placeholder {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.5rem;
    font-weight: 700;
}

.upcoming-schedule {
    margin-top: 4px;
    font-size: 1rem;
}

.upcoming-when {
    margin-top: 4px;
    font-size: 0.85rem;
}

.upcoming-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
}

.upcoming-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.upcoming-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.upcoming-tag.pending-tag {
    background: rgba(87, 242, 135, 0.12);
    color: var(--win);
}

.upcoming-tag.sent-tag {
    background: rgba(88, 101, 242, 0.15);
    color: #9db0ff;
}

.upcoming-tag.muted-tag {
    background: rgba(156, 163, 175, 0.12);
    color: var(--muted);
}

.upcoming-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.upcoming-cancel-btn {
    background: transparent;
    border: 1px solid rgba(237, 66, 69, 0.45);
    color: #fca5a5;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.upcoming-cancel-btn:hover {
    background: rgba(237, 66, 69, 0.12);
}

.upcoming-cancel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.suggestion-list,
.suggestion-card,
.roster-block,
.roster-groups,
.roster-group,
.roster-list,
.roster-admin-block {
    display: grid;
    gap: 10px;
}

.suggestion-list {
    gap: 14px;
}

.suggestion-card,
.roster-block {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.suggestion-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.suggestion-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-delete-btn {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(237, 66, 69, 0.55);
    border-radius: 50%;
    background: rgba(237, 66, 69, 0.12);
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.suggestion-delete-btn:hover {
    background: rgba(237, 66, 69, 0.25);
}

.suggestion-delete-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.suggestion-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.roster-group-title,
.roster-block-title,
.roster-admin-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
}

.roster-list {
    grid-template-columns: repeat(auto-fill, minmax(180px, max-content));
    gap: 8px;
}

.roster-remove-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.roster-remove-btn:hover {
    color: #ff6b6b;
}

.roster-admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.roster-user-input,
.roster-user-select,
.roster-status-select {
    min-width: 220px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
}

.roster-user-select {
    max-width: 100%;
}

.roster-add-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(87, 242, 135, 0.35);
    background: rgba(87, 242, 135, 0.12);
    color: #9ef0b8;
    cursor: pointer;
}

.roster-add-btn:disabled,
.roster-remove-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.roster-empty {
    margin: 0;
}

.upcoming-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.upcoming-page-hero {
    width: 100%;
}

.upcoming-page-hero .upcoming-section--featured {
    width: 100%;
}

.upcoming-page-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 20px;
    align-items: start;
    width: 100%;
}

.upcoming-page-aside {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow: auto;
}

.upcoming-page-match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upcoming-list-row {
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.upcoming-list-row:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
}

.upcoming-list-row-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.upcoming-list-row-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.upcoming-list-row-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.upcoming-list-row-title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.2;
}

.upcoming-list-row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.upcoming-list-row-schedule {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.upcoming-list-row-when {
    color: var(--muted);
    font-size: 0.84rem;
}

.upcoming-list-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.86rem;
}

.upcoming-list-row-lineup {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.upcoming-list-row-lineup .roster-chip {
    font-size: 0.82rem;
    padding: 6px 10px;
}

.upcoming-list-row-note {
    margin: 4px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.84rem;
    line-height: 1.4;
}

@media (min-width: 1100px) {
    .upcoming-page-hero .featured-upcoming-content {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        grid-template-areas:
            "head head"
            "schedule meta"
            "lineup lineup"
            "note note"
            "admin admin";
        gap: 16px 24px;
        padding: 24px 28px;
    }

    .upcoming-page-hero .featured-upcoming-head {
        grid-area: head;
    }

    .upcoming-page-hero .featured-upcoming-schedule-block {
        grid-area: schedule;
        align-self: start;
    }

    .upcoming-page-hero .featured-upcoming-meta {
        grid-area: meta;
        align-self: start;
        padding-top: 4px;
    }

    .upcoming-page-hero .featured-upcoming-lineup,
    .upcoming-page-hero .roster-empty {
        grid-area: lineup;
    }

    .upcoming-page-hero .featured-upcoming-note {
        grid-area: note;
    }

    .upcoming-page-hero .featured-roster-admin {
        grid-area: admin;
    }
}

.upcoming-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 20px;
    align-items: start;
}

.upcoming-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.upcoming-board {
    display: grid;
    gap: 16px;
}

.upcoming-board-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 16px;
    align-items: stretch;
}

.upcoming-section {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.upcoming-section--featured {
    border-color: rgba(87, 242, 135, 0.22);
    background: linear-gradient(180deg, rgba(18, 34, 28, 0.35), rgba(10, 18, 16, 0.2));
}

.upcoming-section--queue,
.upcoming-section--past {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.upcoming-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--panel-border);
}

.upcoming-section-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.upcoming-section-badge--featured {
    background: rgba(87, 242, 135, 0.12);
    border: 1px solid rgba(87, 242, 135, 0.25);
    color: #9ef0b8;
}

.upcoming-section-badge--muted {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.upcoming-section-count {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.upcoming-section-body {
    padding: 16px;
    flex: 1;
    min-height: 0;
}

.upcoming-section-body--featured {
    padding: 0;
}

.upcoming-section-body--featured .featured-upcoming-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.upcoming-section-body--queue {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.upcoming-section-empty,
.upcoming-section-empty-text {
    margin: 0;
}

.upcoming-section-empty {
    padding: 28px 20px;
    text-align: center;
}

.upcoming-section-empty h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.upcoming-queue-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.upcoming-queue-list .upcoming-card-compact {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.upcoming-past-list .upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upcoming-past-panel {
    font-size: 0.92rem;
}

.upcoming-past-panel {
    opacity: 0.82;
}

.upcoming-sidebar {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow: auto;
}

.upcoming-sidebar-header {
    align-items: flex-start;
}

.upcoming-sidebar-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(87, 242, 135, 0.12);
    border: 1px solid rgba(87, 242, 135, 0.28);
    color: #9ef0b8;
    font-size: 0.75rem;
    font-weight: 700;
}

.roster-warning-panel {
    margin-bottom: 18px;
    border-color: rgba(250, 166, 26, 0.35);
    background: rgba(250, 166, 26, 0.08);
}

.roster-warning-text {
    margin: 0;
    color: #ffd89a;
}

.roster-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
}

.roster-avatar-sm {
    width: 24px;
    height: 24px;
}

.roster-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    max-width: 100%;
}

.roster-chip-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.roster-chip-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-chip-meta {
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.35);
}

.roster-status-online {
    background: #3ba55d;
}

.roster-status-idle {
    background: #faa61a;
}

.roster-status-dnd {
    background: #ed4245;
}

.roster-status-offline,
.roster-status-unknown {
    background: #747f8d;
}

.roster-picker {
    display: grid;
    gap: 8px;
}

.roster-picker-search,
.discord-roster-search {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
}

.roster-picker-list {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
    padding-right: 2px;
}

.roster-picker-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.roster-picker-item:hover {
    background: rgba(87, 242, 135, 0.08);
    border-color: rgba(87, 242, 135, 0.25);
}

.roster-picker-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.roster-picker-item.hidden {
    display: none;
}

.roster-picker-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.roster-picker-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-picker-meta {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-roster-widget {
    display: grid;
    gap: 10px;
}

.home-roster-panel .discord-roster-widget {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.discord-roster-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.discord-roster-widget-header h4 {
    margin: 0;
}

.discord-roster-refresh-btn {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
}

.discord-roster-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.discord-roster-refresh-icon {
    display: block;
    line-height: 1;
}

.discord-roster-refresh-btn.is-refreshing .discord-roster-refresh-icon {
    animation: dashboard-refresh-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .discord-roster-refresh-btn.is-refreshing .discord-roster-refresh-icon {
        animation: none;
    }
}

.discord-roster-list {
    display: grid;
    gap: 6px;
    max-height: 280px;
    overflow: auto;
}

.discord-roster-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.discord-roster-item.hidden {
    display: none;
}

.discord-roster-item-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.discord-roster-item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-roster-item-meta {
    font-size: 0.76rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-roster-hint {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
}

.featured-upcoming-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(87, 242, 135, 0.35);
    background: linear-gradient(135deg, rgba(18, 34, 28, 0.95), rgba(10, 18, 16, 0.98));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(87, 242, 135, 0.08);
}

.featured-upcoming-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(87, 242, 135, 0.18), transparent 42%),
        radial-gradient(circle at bottom left, rgba(88, 101, 242, 0.12), transparent 38%);
    pointer-events: none;
}

.featured-upcoming-bg-has-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--team-logo);
    background-repeat: no-repeat;
    background-position: right 8% center;
    background-size: min(42vw, 280px);
    opacity: 0.1;
    filter: blur(2px);
}

.featured-upcoming-head-main {
    min-width: 0;
}

.featured-upcoming-content {
    position: relative;
    padding: 28px;
    display: grid;
    gap: 18px;
}

.featured-upcoming-head,
.featured-upcoming-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.featured-upcoming-eyebrow {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ef0b8;
}

.featured-upcoming-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.featured-upcoming-schedule-block {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.featured-upcoming-date {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.featured-upcoming-when {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.88rem;
}

.featured-upcoming-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.featured-upcoming-lineup {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.featured-upcoming-lineup .roster-chip {
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
    padding: 8px 12px;
}

.featured-upcoming-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.78);
}

.featured-upcoming-empty {
    padding: 28px;
}

.featured-cancel-btn {
    align-self: flex-start;
}

.suggestion-sidebar-list {
    display: grid;
    gap: 12px;
}

.suggestion-sidebar-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    gap: 10px;
}

.suggestion-sidebar-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.suggestion-sidebar-schedule {
    font-size: 0.82rem;
    margin-top: 4px;
}

.suggestion-sidebar-stats {
    display: flex;
    gap: 10px;
}

.suggestion-stat {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.suggestion-stat.dispo {
    background: rgba(87, 242, 135, 0.12);
    color: #9ef0b8;
}

.suggestion-stat.indispo {
    background: rgba(237, 66, 69, 0.12);
    color: #fca5a5;
}

.suggestion-sidebar-note {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.72);
}

.suggestion-sidebar-card .roster-groups {
    gap: 8px;
}

.suggestion-sidebar-card .roster-list {
    grid-template-columns: repeat(auto-fill, minmax(110px, max-content));
}

.upcoming-card-compact {
    padding: 12px 14px;
}

.upcoming-card-compact .upcoming-card-head {
    gap: 12px;
}

.upcoming-card-compact .team-logo-sm {
    width: 40px;
    height: 40px;
}

.upcoming-card-compact .upcoming-schedule {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

.upcoming-schedule--featured {
    margin-top: 5px;
}

.upcoming-past-panel {
    font-size: 0.92rem;
}

.upcoming-past-panel {
    opacity: 0.82;
}

@media (max-width: 1100px) {
    .upcoming-page-body {
        grid-template-columns: 1fr;
    }

    .upcoming-page-aside {
        position: static;
        max-height: none;
    }

    .upcoming-layout {
        grid-template-columns: 1fr;
    }

    .upcoming-board-grid {
        grid-template-columns: 1fr;
    }

    .upcoming-sidebar {
        position: static;
        max-height: none;
    }
}

.table-actions {
    text-align: right;
    white-space: nowrap;
}

.result-delete-btn {
    background: transparent;
    border: 1px solid rgba(237, 66, 69, 0.45);
    color: #fca5a5;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.result-delete-btn:hover {
    background: rgba(237, 66, 69, 0.12);
}

.result-delete-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.home-calendar-panel {
    position: relative;
    overflow: visible;
    padding: 16px;
}

.home-calendar-header,
.home-calendar-heading,
.home-calendar-popover-head,
.home-calendar-popover-event-head {
    display: flex;
    align-items: center;
}

.home-calendar-header {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.home-calendar-heading {
    gap: 12px;
}

.home-calendar-heading h3,
.home-calendar-heading p {
    margin: 0;
}

.home-calendar-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgba(237, 66, 69, 0.45);
    border-radius: 10px;
    background: rgba(237, 66, 69, 0.12);
    color: #ff6267;
}

.home-calendar-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.76rem;
    white-space: nowrap;
}

.home-calendar-status > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #777b8c;
}

.home-calendar-status.is-connected > span {
    background: #3bc16f;
    box-shadow: 0 0 0 3px rgba(59, 193, 111, 0.12);
}

.home-calendar-popover {
    position: static;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 12px;
    max-height: min(360px, calc(100vh - 24px));
    padding: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: #181920;
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.52);
}

.home-calendar-popover-head,
.home-calendar-popover-event-head {
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap;
}

.home-calendar-popover-event-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.home-calendar-popover-head {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--panel-border);
    text-transform: capitalize;
}

.home-calendar-popover-head span,
.home-calendar-popover-event-head span,
.home-calendar-popover-kind {
    color: var(--muted);
    font-size: 0.74rem;
}

.home-calendar-popover-list {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.home-calendar-popover-event {
    padding: 10px;
    border-left: 3px solid #697dff;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.82rem;
}

.home-calendar-popover-event.home-calendar-tone-match {
    border-left-color: #3bc16f;
}

.home-calendar-popover-event.home-calendar-tone-unavailability {
    border-left-color: #ed4245;
}

.home-calendar-popover-event.home-calendar-tone-meeting {
    border-left-color: #e0a03a;
}

.home-calendar-popover-event p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.home-calendar-popover-empty {
    margin: 4px 0;
}

.home-calendar-open-button {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(237, 66, 69, 0.4);
    border-radius: 9px;
    background: rgba(237, 66, 69, 0.1);
    color: #ffb4b6;
    cursor: pointer;
    font-weight: 700;
}

/* Bandeau des 14 prochains jours : compact sur desktop, scrollable sans retour à la ligne. */
.home-calendar-panel {
    padding: clamp(16px, 2vw, 24px);
}

.home-calendar-header {
    margin-bottom: 12px;
}

.home-calendar-heading h3 {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    letter-spacing: -0.02em;
}

.home-calendar-heading p {
    margin-top: 3px;
    font-size: 0.82rem;
}

.home-calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--panel-border);
    color: var(--muted);
    font-size: 0.78rem;
}

.home-calendar-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.home-calendar-legend-swatch,
.home-calendar-marker {
    display: inline-block;
    flex: 0 0 auto;
}

.home-calendar-legend-swatch--unavailability,
.home-calendar-marker-unavailability {
    width: 16px;
    height: 5px;
    border-radius: 3px;
    background: #b39b2e;
}

.home-calendar-legend-swatch--match,
.home-calendar-marker-match {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2f8f62;
}

.home-calendar-legend-swatch--event,
.home-calendar-marker-event {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: #8b5cf6;
    transform: rotate(45deg) scale(0.82);
}

.home-calendar-scroll {
    width: 100%;
    padding-bottom: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
    cursor: grab;
}

.home-calendar-scroll:focus-visible {
    outline: 2px solid rgba(115, 180, 255, 0.9);
    outline-offset: 3px;
    border-radius: 10px;
}

.home-calendar-scroll.is-dragging,
.home-calendar-scroll.is-dragging summary {
    cursor: grabbing;
    user-select: none;
}

.home-calendar-track {
    display: grid;
    grid-template-columns: repeat(14, minmax(56px, 1fr));
    gap: 6px;
    min-width: 862px;
}

.home-calendar-day {
    position: relative;
    min-width: 0;
    min-height: 0;
}

.home-calendar-day > summary,
.home-calendar-day-summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 72px;
    height: 100%;
    padding: 7px 4px 8px;
    flex-direction: column;
    gap: 3px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    cursor: pointer;
    list-style: none;
    text-align: center;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.home-calendar-day > summary::-webkit-details-marker,
.home-calendar-day > summary::marker {
    display: none;
}

.home-calendar-day > summary:hover,
.home-calendar-day[open] > summary {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.24);
}

.home-calendar-day.is-today > summary {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: inset 0 0 0 2px rgba(115, 180, 255, 0.9);
}

.home-calendar-weekday {
    color: #aeb5c8;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.home-calendar-day.is-today .home-calendar-weekday {
    color: #9ccaff;
}

.home-calendar-day-number {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #f4f6fb;
    font-size: 0.96rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.home-calendar-day.is-today .home-calendar-day-number {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.28);
}

.home-calendar-day-markers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 12px;
    pointer-events: none;
}

.home-calendar-day-markers .home-calendar-marker-unavailability {
    width: 16px;
    height: 5px;
}

.home-calendar-day-markers .home-calendar-marker-match,
.home-calendar-day-markers .home-calendar-marker-event {
    width: 8px;
    height: 8px;
}

.home-calendar-popover-event.home-calendar-tone-match {
    border-left-color: #2f8f62;
}

.home-calendar-popover-event.home-calendar-tone-unavailability {
    border-left-color: #b39b2e;
}

.home-calendar-popover-event.home-calendar-tone-training,
.home-calendar-popover-event.home-calendar-tone-event {
    border-left-color: #8b5cf6;
}

@media (max-width: 600px) {
    .home-calendar-panel {
        padding: 14px 12px;
        border-radius: 18px;
    }

    .home-calendar-header {
        gap: 12px;
        margin-bottom: 16px;
    }

    .home-calendar-heading {
        gap: 10px;
    }

    .home-calendar-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .home-calendar-status {
        font-size: 0.72rem;
    }

    .home-calendar-legend {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding-bottom: 10px;
        font-size: 0.67rem;
    }

    .home-calendar-legend > span {
        gap: 5px;
        white-space: nowrap;
    }

    .home-calendar-legend-swatch--unavailability {
        width: 13px;
        height: 4px;
    }

    .home-calendar-legend-swatch--match,
    .home-calendar-legend-swatch--event {
        width: 8px;
        height: 8px;
    }

    .home-calendar-track {
        grid-template-columns: repeat(14, 60px);
        min-width: max-content;
    }

    .home-calendar-day > summary,
    .home-calendar-day-summary {
        min-height: 66px;
        padding: 6px 2px 7px;
        gap: 2px;
    }

    .home-calendar-day-number {
        min-width: 30px;
        height: 30px;
        font-size: 0.82rem;
    }

    .home-calendar-day-markers {
        gap: 3px;
    }

    .home-calendar-day-markers .home-calendar-marker-unavailability {
        width: 12px;
        height: 4px;
    }

    .home-calendar-day-markers .home-calendar-marker-match,
    .home-calendar-day-markers .home-calendar-marker-event {
        width: 6px;
        height: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-calendar-day > summary,
    .home-calendar-day-summary {
        transition: none;
    }
}

.home-dashboard-row {
    display: grid;
    gap: 16px;
    align-items: stretch;
    width: 100%;
}

.home-dashboard-row--solo {
    grid-template-columns: 1fr;
}

@media (min-width: 901px) {
    .home-dashboard-row:not(.home-dashboard-row--solo) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    }

    .home-dashboard-row .home-roster-panel,
    .home-dashboard-row .upcoming-preview {
        display: flex;
        flex-direction: column;
        min-height: 300px;
        height: 100%;
    }

    .home-dashboard-row .discord-roster-widget {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 10px;
        min-height: 0;
    }

    .home-dashboard-row .discord-roster-list {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }

    .home-dashboard-row .upcoming-preview .panel-header {
        flex-shrink: 0;
    }

    .home-dashboard-row .home-upcoming-split {
        display: grid;
        flex: 1;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: 12px;
        min-height: 0;
        align-items: stretch;
    }

    .home-dashboard-row .home-upcoming-featured-wrap,
    .home-dashboard-row .home-upcoming-queue {
        min-height: 0;
    }

    .home-dashboard-row .home-upcoming-queue {
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow-y: auto;
        padding-right: 2px;
    }
}

.upcoming-preview .panel-header {
    margin-bottom: 10px;
}

.upcoming-preview {
    container-type: inline-size;
}

.home-upcoming-split {
    display: grid;
    gap: 12px;
}

.home-upcoming-empty,
.home-upcoming-queue-empty {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.home-upcoming-featured {
    position: relative;
    overflow: hidden;
    height: 100%;
    border-radius: 14px;
    border: 1px solid rgba(87, 242, 135, 0.28);
    background: linear-gradient(145deg, rgba(18, 34, 28, 0.92), rgba(10, 18, 16, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-upcoming-featured-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(87, 242, 135, 0.14), transparent 45%),
        radial-gradient(circle at bottom left, rgba(88, 101, 242, 0.1), transparent 40%);
    pointer-events: none;
}

.home-upcoming-featured[style*="--team-logo"] .home-upcoming-featured-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--team-logo);
    background-repeat: no-repeat;
    background-position: right 6% center;
    background-size: min(36vw, 180px);
    opacity: 0.1;
    filter: blur(1px);
}

.home-upcoming-featured-content {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 16px;
}

.home-upcoming-featured-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.home-upcoming-featured-head-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.home-upcoming-featured-kicker {
    margin: 0 0 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ef0b8;
}

.home-upcoming-featured-title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.home-upcoming-featured-schedule {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.home-upcoming-featured-date {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.home-upcoming-featured-when {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
}

.home-upcoming-featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.86rem;
}

.home-upcoming-featured-lineup {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-upcoming-featured-lineup .roster-chip {
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    padding: 6px 10px;
}

.home-upcoming-featured-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.84rem;
    line-height: 1.4;
}

.home-upcoming-queue-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}


.home-upcoming-queue-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.home-upcoming-queue-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-upcoming-queue-copy strong {
    font-size: 0.92rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.home-upcoming-queue-schedule {
    font-size: 0.8rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.82);
}

.home-upcoming-queue-when {
    font-size: 0.76rem;
}

.home-upcoming-queue-lineup {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

.home-upcoming-queue-lineup .roster-chip {
    font-size: 0.68rem;
    padding: 3px 6px;
}

@container (max-width: 720px) {
    .home-dashboard-row .home-upcoming-split {
        grid-template-columns: 1fr;
        flex: none;
    }

    .home-dashboard-row .home-upcoming-featured {
        height: auto;
    }

    .home-dashboard-row .home-upcoming-queue {
        overflow: visible;
    }
}

.home-insights {
    display: grid;
    gap: 16px;
    width: 100%;
}

@media (min-width: 901px) {
    .home-insights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
    }
}

.home-insight-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.home-insight-panel--suggestions {
    border-top: 3px solid rgba(88, 101, 242, 0.75);
}

.home-insight-panel--debriefs {
    border-top: 3px solid rgba(237, 66, 69, 0.75);
}

.home-insight-panel--results {
    border-top: 3px solid rgba(87, 242, 135, 0.65);
}

.home-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--panel-border);
}

.home-insight-header-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.home-insight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.home-insight-header h3 {
    margin: 0;
    font-size: 1.02rem;
}

.home-insight-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.home-insight-action {
    flex-shrink: 0;
    padding: 7px 11px;
    font-size: 0.82rem;
}

.home-insight-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px 18px;
    min-height: 0;
}

.home-insight-empty {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.home-teaser {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    text-align: left;
    font: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.home-teaser--link {
    cursor: pointer;
}

.home-teaser--link:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

.home-teaser--link:focus-visible {
    outline: 3px solid rgba(115, 180, 255, 0.95);
    outline-offset: 3px;
}

.match-result-card.is-navigation-target,
.scrim-accordion.is-navigation-target,
.debrief-accordion.is-navigation-target {
    outline: 2px solid rgba(115, 180, 255, 0.9);
    outline-offset: 4px;
    scroll-margin-block: 32px;
}

.home-teaser--suggestion {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.home-teaser-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.home-teaser-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-teaser-copy strong {
    font-size: 0.95rem;
    line-height: 1.25;
}

.home-teaser-copy .muted {
    font-size: 0.82rem;
    line-height: 1.3;
}

.home-avail-meter {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.home-avail-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(87, 242, 135, 0.85), rgba(88, 101, 242, 0.75));
}

.home-teaser-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
}

.home-teaser-stat.dispo {
    color: var(--win);
}

.home-teaser-stat.indispo {
    color: var(--loss);
}

.home-teaser-score {
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.home-teaser--debrief.home-teaser--win {
    border-color: rgba(87, 242, 135, 0.18);
    background: rgba(87, 242, 135, 0.05);
}

.home-teaser--debrief.home-teaser--loss {
    border-color: rgba(237, 66, 69, 0.18);
    background: rgba(237, 66, 69, 0.05);
}

.home-teaser--debrief.home-teaser--draw {
    border-color: rgba(255, 255, 255, 0.1);
}

.home-teaser-tag {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.home-result-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    flex-shrink: 0;
}

.home-teaser--result.home-teaser--win .home-result-letter {
    background: rgba(87, 242, 135, 0.14);
    color: var(--win);
}

.home-teaser--result.home-teaser--loss .home-result-letter {
    background: rgba(237, 66, 69, 0.14);
    color: var(--loss);
}

.home-teaser--result.home-teaser--draw .home-result-letter {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.home-teaser--result .home-teaser-score {
    margin-left: auto;
}

.home-insight-links {
    display: flex;
    gap: 8px;
    padding: 0 18px 16px;
    margin-top: auto;
}

.home-insight-link {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.home-insight-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.home-skeleton-dashboard,
.home-skeleton-insights {
    display: grid;
    gap: 16px;
}

@media (min-width: 901px) {
    .home-skeleton-dashboard {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    }

    .home-skeleton-insights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.upcoming-see-all {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--panel-border);
}

th {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

a {
    color: #fca5a5;
}

.eva-player-tabs {
    flex-wrap: wrap;
    margin-bottom: 0;
}

.eva-extension-import {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 24px;
    border-color: rgba(88, 101, 242, 0.34);
}

.eva-extension-import h2 {
    margin-bottom: 6px;
}

.eva-extension-import .primary-btn {
    min-height: 44px;
}

.eva-extension-import [data-eva-extension-status] {
    grid-column: 1 / -1;
    margin: 0;
}

.eva-account-automation {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
    gap: 28px;
    align-items: start;
}

.eva-account-automation form {
    display: grid;
    gap: 12px;
}

.eva-automation-steps {
    display: grid;
    gap: 8px;
    margin: 2px 0 4px;
    padding: 0;
    list-style: none;
    color: var(--muted);
}

.eva-automation-steps li {
    position: relative;
    padding-left: 24px;
}

.eva-automation-steps li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success, #52dc91);
    font-weight: 800;
}

@media (max-width: 720px) {
    .eva-extension-import {
        grid-template-columns: 1fr;
    }

    .eva-extension-import .primary-btn {
        width: 100%;
    }

    .eva-account-automation {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.eva-date-pagination-wrap {
    margin: 12px 0 16px;
}

.eva-history-navigation {
    margin-top: 12px;
}

.eva-history-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .8fr) minmax(190px, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: var(--panel);
}

.eva-history-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.eva-history-field select {
    width: 100%;
    min-height: 44px;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
}

.eva-history-field select:focus-visible,
.eva-page-select:focus-visible,
.eva-page-btn:focus-visible {
    outline: 2px solid var(--primary, #ed4245);
    outline-offset: 2px;
}

.eva-history-field option {
    background: var(--panel);
    color: var(--text);
}

.eva-history-summary {
    align-self: center;
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    white-space: nowrap;
}

.eva-date-pagination-wrap:empty {
    display: none;
}

.eva-day-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.eva-day-group + .eva-day-group {
    margin-top: 16px;
}

.eva-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--panel-border);
}

.eva-day-heading,
.eva-match-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.eva-season-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(88, 101, 242, .32);
    border-radius: 999px;
    background: rgba(88, 101, 242, .12);
    color: #c7d2fe;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.eva-day-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-transform: capitalize;
}

.eva-day-count {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.eva-player-history {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eva-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    background: var(--panel);
}

.eva-page-jump {
    display: flex;
    justify-content: center;
    flex: 1 1 320px;
    min-width: 0;
}

.eva-page-select {
    width: min(100%, 430px);
    min-height: 40px;
    padding: 8px 40px 8px 14px;
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-transform: capitalize;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.eva-page-select:hover {
    border-color: rgba(237, 66, 69, 0.3);
    background: rgba(237, 66, 69, 0.08);
}

.eva-page-select option {
    background: var(--panel);
    color: var(--text);
}

.eva-page-btn {
    padding: 8px 14px;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.eva-page-btn:hover:not(:disabled) {
    background: rgba(237, 66, 69, 0.12);
    border-color: rgba(237, 66, 69, 0.25);
}

.eva-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.eva-tab-panels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eva-match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eva-selection-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(90px, 120px) auto;
    align-items: end;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(237, 66, 69, .28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(237, 66, 69, .1), rgba(88, 101, 242, .05));
}

.eva-selection-copy,
.eva-selection-tag,
.eva-result-fields label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.eva-selection-copy .muted,
.eva-selection-tag span,
.eva-result-fields label > span {
    font-size: .78rem;
    font-weight: 700;
}

.eva-selection-tag input,
.eva-result-fields input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
}

.eva-selection-actions,
.eva-result-actions {
    display: flex;
    gap: 10px;
    min-width: 0;
}

.eva-selection-actions button,
.eva-result-actions button {
    min-height: 44px;
    white-space: normal;
}

.eva-selection-actions .secondary,
.eva-result-actions .secondary {
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, .055);
}

.eva-selection-actions button:disabled,
.eva-result-actions button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.eva-selection-status {
    grid-column: 1 / -1;
    min-height: 1.1em;
    margin: 0;
    color: #9ef0b8;
    font-size: .82rem;
}

.eva-selectable-match {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-width: 0;
    padding: 4px;
    border: 1px solid transparent;
    border-radius: 16px;
    transition: border-color .18s ease, background-color .18s ease;
}

.eva-selectable-match.is-selected {
    border-color: rgba(237, 66, 69, .55);
    background: rgba(237, 66, 69, .08);
}

.eva-match-selector {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    align-self: stretch;
    width: calc(100% + 16px);
    margin-left: -8px;
    min-height: 52px;
    cursor: pointer;
}

.eva-match-selector input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.eva-match-selector span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, .42);
    border-radius: 7px;
    background: rgba(0, 0, 0, .25);
}

.eva-match-selector input:checked + span {
    border-color: #ed4245;
    background: #ed4245;
}

.eva-match-selector input:checked + span::after {
    content: '✓';
    color: #fff;
    font-weight: 900;
}

.eva-match-selector input:focus-visible + span {
    outline: 3px solid rgba(237, 66, 69, .38);
    outline-offset: 3px;
}

.eva-match-selector input:disabled + span {
    cursor: not-allowed;
    opacity: .35;
}

.eva-classification-badge,
.eva-probable-badge,
.eva-opponent-probable-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
}

.eva-classification-badge {
    border: 1px solid rgba(237, 66, 69, .4);
    background: rgba(237, 66, 69, .14);
    color: #fecaca;
}

.eva-probable-badge {
    border: 1px solid rgba(87, 242, 135, .32);
    background: rgba(87, 242, 135, .1);
    color: #9ef0b8;
    white-space: normal;
}

.eva-opponent-probable-badge {
    border: 1px solid rgba(237, 66, 69, .46);
    background: rgba(237, 66, 69, .16);
    color: #fecaca;
    white-space: normal;
}

.eva-match-title-row {
    flex-wrap: wrap;
}

.eva-result-drawer[hidden] {
    display: none;
}

.eva-result-drawer {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    justify-items: end;
}

.eva-drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, .68);
}

.eva-result-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: min(480px, calc(100vw - 24px));
    height: 100%;
    min-width: 0;
    padding: 22px;
    overflow: auto;
    border-left: 1px solid var(--panel-border);
    background: #111318;
    box-shadow: -18px 0 50px rgba(0, 0, 0, .42);
}

.eva-result-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.eva-result-panel-head h2,
.eva-result-detection,
.eva-result-note {
    margin: 0;
}

.eva-drawer-close {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, .06);
    font-size: 1.5rem;
}

.eva-result-detection {
    display: grid;
    justify-items: start;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(87, 242, 135, .2);
    border-radius: 14px;
    background: rgba(87, 242, 135, .055);
}

.eva-result-detection .muted {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.eva-result-form,
.eva-result-fields {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.eva-result-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eva-result-opponent {
    grid-column: 1 / -1;
}

.eva-result-opponent em {
    color: #fbbf24;
    font-style: normal;
}

.eva-result-note {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.5;
}

.eva-result-actions {
    margin-top: auto;
}

.eva-result-actions button {
    flex: 1 1 0;
}

@media (min-width: 1101px), (max-width: 720px) {
    body.eva-drawer-open {
        overflow: hidden;
    }
}

@media (min-width: 721px) and (max-width: 1100px) {
    .eva-result-drawer {
        position: relative;
        inset: auto;
        display: block;
        margin-top: 16px;
    }

    .eva-drawer-backdrop {
        display: none;
    }

    .eva-result-panel {
        width: 100%;
        height: auto;
        max-height: none;
        border: 1px solid var(--panel-border);
        border-radius: 16px;
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .eva-selection-bar {
        grid-template-columns: minmax(0, 1fr) minmax(90px, 120px);
    }

    .eva-selection-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .eva-selection-bar {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .eva-selection-actions,
    .eva-result-actions {
        grid-column: auto;
        flex-direction: column;
    }

    .eva-selection-actions button,
    .eva-result-actions button {
        width: 100%;
        min-height: 48px;
    }

    .eva-selectable-match {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 4px;
    }

    .eva-match-selector {
        width: calc(100% + 12px);
        margin-left: -6px;
        min-height: 48px;
    }

    .eva-result-drawer {
        align-items: end;
        justify-items: stretch;
    }

    .eva-result-panel {
        width: 100%;
        height: auto;
        max-height: 88dvh;
        padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
        border: 1px solid var(--panel-border);
        border-width: 1px 0 0;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -18px 50px rgba(0, 0, 0, .45);
    }

    .eva-result-fields {
        grid-template-columns: 1fr;
    }

    .eva-result-opponent {
        grid-column: auto;
    }
}

.eva-match-accordion {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.eva-match-accordion[open] {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.eva-match-accordion--win {
    border-color: rgba(87, 242, 135, 0.18);
}

.eva-match-accordion--win[open] {
    border-color: rgba(87, 242, 135, 0.28);
    background: rgba(87, 242, 135, 0.04);
}

.eva-match-accordion--loss {
    border-color: rgba(237, 66, 69, 0.16);
}

.eva-match-accordion--loss[open] {
    border-color: rgba(237, 66, 69, 0.28);
    background: rgba(237, 66, 69, 0.04);
}

.eva-match-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.eva-match-summary::-webkit-details-marker {
    display: none;
}

.eva-match-summary-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.eva-match-thumb-wrap {
    flex: 0 0 96px;
    width: 96px;
    max-width: 96px;
}

.eva-match-thumb {
    display: block;
    width: 100%;
    height: 54px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05) center / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.eva-match-summary-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.eva-match-map-name {
    font-size: 1.02rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eva-match-title-row .eva-match-map-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .eva-history-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eva-history-summary {
        justify-self: end;
    }
}

@media (max-width: 560px) {
    .eva-history-controls {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .eva-history-summary {
        justify-self: start;
    }

    .eva-history-field select {
        font-size: 1rem;
    }

    .eva-day-heading,
    .eva-match-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

.eva-match-schedule {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.eva-match-summary-scorebox {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.eva-match-scoreline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.15rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.eva-match-score-sep {
    color: rgba(255, 255, 255, 0.55);
}

.eva-match-chevron {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1;
}

.eva-match-chevron::before {
    content: '+';
}

.eva-match-accordion[open] .eva-match-chevron {
    color: #fca5a5;
    border-color: rgba(237, 66, 69, 0.35);
}

.eva-match-accordion--win[open] .eva-match-chevron {
    color: #9ef0b8;
    border-color: rgba(87, 242, 135, 0.35);
}

.eva-match-accordion[open] .eva-match-chevron::before {
    content: '−';
}

.eva-match-body {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.eva-match-scoreboard-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-top: 14px;
}

.eva-tracked-stats {
    color: #fca5a5;
    font-size: 0.82rem;
    line-height: 1.3;
}

.eva-match-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eva-match-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .eva-match-summary {
        gap: 10px;
        padding: 12px;
    }

    .eva-match-summary-main {
        flex-wrap: wrap;
        gap: 10px 12px;
    }

    .eva-match-thumb-wrap {
        flex-basis: 72px;
        width: 72px;
        max-width: 72px;
    }

    .eva-match-thumb {
        height: 40px;
    }

    .eva-match-summary-copy {
        flex: 1 1 140px;
        min-width: 0;
    }

    .eva-match-summary-scorebox {
        flex: 1 1 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .eva-match-map-name {
        white-space: normal;
    }
}

.eva-scoreboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.ebp-scoreboard {
    display: grid;
    gap: 0;
    width: 100%;
    max-width: 100%;
    border: 1px solid #1d1d24;
    border-radius: 14px;
    overflow: hidden;
    background: #0a0a0c;
}

.ebp-matchup-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.32);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ebp-matchup-team {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ebp-matchup-team:first-child {
    align-items: flex-start;
    text-align: left;
}

.ebp-matchup-team:last-child {
    align-items: flex-end;
    text-align: right;
}

.ebp-matchup-team.is-winner .ebp-matchup-score {
    color: var(--win);
}

.ebp-matchup-team.is-loser .ebp-matchup-score {
    color: var(--muted);
}

.ebp-matchup-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--muted);
    word-break: break-word;
}

.ebp-matchup-score {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ebp-matchup-vs {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ebp-team-block {
    background: linear-gradient(180deg, var(--ebp-tint), transparent 72%);
    border-top: 1px solid var(--ebp-border);
}

.ebp-team-block:first-child {
    border-top: none;
}

.ebp-team-block-winner .ebp-team-score {
    color: var(--win);
}

.ebp-team-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 10px;
}

.ebp-team-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ebp-accent);
    flex-shrink: 0;
}

.ebp-team-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ebp-team-score {
    margin-left: auto;
    font-size: 1.35rem;
    font-weight: 700;
}

.ebp-table {
    padding: 0 10px 12px;
}

.ebp-row {
    display: grid;
    grid-template-columns: 42px minmax(110px, 1.2fr) repeat(4, minmax(70px, 1fr));
    gap: 8px;
    align-items: center;
    padding: 10px 8px;
    border-radius: 8px;
}

.ebp-row-head {
    color: #8b8f98;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 0;
    padding-bottom: 4px;
}

.ebp-row-head > span:not(:nth-child(2)) {
    text-align: center;
}

.ebp-row:not(.ebp-row-head):hover {
    background: rgba(255, 255, 255, 0.02);
}

.ebp-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: color-mix(in srgb, var(--ebp-accent) 82%, #000 18%);
    justify-self: center;
}

.ebp-player {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ebp-player-tracked {
    color: #fecaca;
}

.ebp-stat {
    text-align: center;
    font-size: 0.9rem;
    color: #e5e7eb;
    font-variant-numeric: tabular-nums;
}

.ebp-stat-highlight {
    color: var(--ebp-accent);
    font-weight: 700;
}

.ebp-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

.ebp-scoreboard-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

.ligue-meta-panel {
    margin-bottom: 16px;
}

.ligue-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.ligue-meta-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ligue-external-link {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.9rem;
}

.ligue-external-link:hover {
    text-decoration: underline;
}

.ligue-tournament-list {
    display: grid;
    gap: 14px;
}

.ligue-tournament-card {
    padding: 0;
    overflow: hidden;
}

.ligue-tournament-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.ligue-tournament-summary-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.ligue-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.45);
    border-bottom: 2px solid rgba(255, 255, 255, 0.45);
    transform: rotate(-45deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ligue-tournament-card[open] .ligue-chevron {
    transform: rotate(45deg);
    border-color: rgba(255, 255, 255, 0.72);
}

.ligue-tournament-summary::-webkit-details-marker {
    display: none;
}

.ligue-tournament-body {
    padding: 0 18px 18px;
    display: grid;
    gap: 18px;
}

.ligue-division-tabs {
    margin-bottom: 4px;
}

.ligue-division-tab.active {
    border-color: var(--win);
    color: var(--win);
    background: rgba(87, 242, 135, 0.08);
}

.ligue-division-panels {
    display: grid;
    gap: 0;
}

.ligue-division-panel.hidden {
    display: none;
}

.ligue-division-content {
    display: grid;
    gap: 20px;
}

.ligue-phase-section,
.ligue-match-section {
    display: grid;
    gap: 12px;
}

.ligue-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.ligue-round-block h5 {
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--panel-border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
}

.ligue-round-block + .ligue-round-block {
    margin-top: 20px;
}

.ligue-round-block {
    display: grid;
    gap: 8px;
}

.ligue-rank-cell {
    color: #c4b5fd;
    font-weight: 700;
}

.ligue-points-cell {
    color: var(--win);
    font-weight: 700;
}

.ligue-diff-positive {
    color: var(--win);
}

.ligue-diff-negative {
    color: var(--loss);
}

.ligue-section-header h4 {
    margin: 0;
}

.ligue-match-winner {
    color: var(--win);
    font-weight: 700;
}

.ligue-match-list {
    display: grid;
    gap: 8px;
}

.ligue-match-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 20px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ligue-match-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.ligue-match-card-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ligue-match-round {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.ligue-match-faceoff {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 16px;
    width: 100%;
}

.ligue-match-team {
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ligue-match-team-one {
    text-align: right;
    justify-self: end;
    padding-right: 4px;
}

.ligue-match-team-two {
    text-align: left;
    justify-self: start;
    padding-left: 4px;
}

.ligue-match-score-badge {
    min-width: 4.5rem;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
}

.ligue-match-card-upcoming .ligue-match-score-badge {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.08);
}

.ligue-match-card .ligue-match-date {
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
    text-align: right;
}

@media (max-width: 640px) {
    .ligue-match-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ligue-match-card .ligue-match-date {
        text-align: left;
    }
}

.ligue-phase-table th,
.ligue-phase-table td {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ligue-phase-table th:nth-child(2),
.ligue-phase-table td:nth-child(2) {
    text-align: left;
}

.ligue-division-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.ligue-division-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 14px;
}

.ligue-division-card h4,
.ligue-match-section h4 {
    margin: 0 0 10px;
}

.ligue-match-section {
    display: grid;
    gap: 8px;
}

.ligue-match-row {
    display: grid;
    grid-template-columns: 110px minmax(180px, 1fr) 80px minmax(140px, auto);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
}

.ligue-match-done .ligue-match-score {
    color: var(--win);
    font-weight: 700;
}

.ligue-match-upcoming .ligue-match-score {
    color: #fbbf24;
}

.ligue-match-division {
    font-size: 0.85rem;
    color: var(--muted);
}

.ligue-match-date {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: right;
}

.ligue-featured-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.ligue-season-rankings-grid {
    display: grid;
    gap: 14px;
}

@media (min-width: 901px) {
    .ligue-season-rankings-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        align-items: start;
    }
}

.ligue-season-ranking {
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.ligue-season-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.ligue-season-summary-main {
    min-width: 0;
}

.ligue-season-summary::-webkit-details-marker {
    display: none;
}

.ligue-season-ranking[open] .ligue-chevron {
    transform: rotate(45deg);
    border-color: rgba(255, 255, 255, 0.72);
}

.ligue-season-ranking h4 {
    margin: 0 0 4px;
}

.ligue-season-meta {
    margin: 0;
    font-size: 0.82rem;
}

.ligue-season-body {
    padding: 0 14px 14px;
}

.ligue-table th,
.ligue-table td {
    text-align: center;
}

.ligue-table th:nth-child(2),
.ligue-table td:nth-child(2) {
    text-align: left;
}


@media (max-width: 820px) {
    .ligue-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 980px) {
    .ebp-table {
        overflow-x: auto;
    }

    .ebp-row:not(.ebp-player-card) {
        min-width: 760px;
    }
}

.eva-team-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 14px;
}

.eva-team-column.eva-team-winner {
    border-color: rgba(87, 242, 135, 0.35);
    box-shadow: inset 0 0 0 1px rgba(87, 242, 135, 0.08);
}

.eva-team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--panel-border);
}

.eva-team-header-mirrored {
    flex-direction: row-reverse;
}

.eva-team-score {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.eva-team-winner .eva-team-score {
    color: var(--win);
}

.eva-player-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eva-player-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eva-player-row.eva-player-tracked {
    color: #fecaca;
}

.eva-player-name {
    font-weight: 600;
}

.eva-player-stats {
    color: var(--muted);
    font-size: 0.88rem;
}

.eva-link-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px;
}

.eva-link-result-list {
    display: grid;
    gap: 8px;
}

.eva-link-result-btn {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.02);
    color: inherit;
    cursor: pointer;
}

.eva-link-result-btn.active,
.eva-link-result-btn:hover {
    border-color: var(--accent);
    background: rgba(87, 242, 135, 0.08);
}

.eva-link-map-list {
    display: grid;
    gap: 10px;
}

.eva-link-map-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    align-items: start;
    padding: 12px 14px;
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.eva-link-map-item.eva-link-map-tag {
    border-color: rgba(87, 242, 135, 0.35);
}

.eva-link-map-item.eva-link-map-busy {
    opacity: 0.55;
}

.eva-link-map-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eva-link-map-meta {
    grid-column: 2;
    font-size: 0.88rem;
}

.eva-link-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.eva-link-save-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 0;
    background: var(--accent);
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 900px) {
    .eva-link-layout {
        grid-template-columns: 1fr;
    }
}

.match-grid {
    display: grid;
    gap: 12px;
}

.match-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 14px;
}

.match-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tab-btn {
    background: var(--panel);
    border: 1px solid var(--panel-border);
}

.tab-btn.active {
    background: rgba(237, 66, 69, 0.18);
    border-color: rgba(237, 66, 69, 0.35);
}

.debrief-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.debrief-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

.debrief-accordion {
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.debrief-accordion[open] {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(237, 66, 69, 0.35);
}

.debrief-accordion--win[open] {
    border-color: rgba(87, 242, 135, 0.28);
}

.debrief-accordion--loss[open] {
    border-color: rgba(237, 66, 69, 0.35);
}

.debrief-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.debrief-summary::-webkit-details-marker {
    display: none;
}

.debrief-summary-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.debrief-summary-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    overflow: hidden;
}

.debrief-summary-mark .team-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.debrief-summary-initial {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #fca5a5;
}

.debrief-summary-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.debrief-summary-kicker {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.debrief-summary-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.debrief-summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.debrief-summary-date,
.debrief-summary-maps {
    color: var(--muted);
}

.debrief-summary-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.debrief-summary-score-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.debrief-summary-score-value {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.debrief-summary-score--win {
    border-color: rgba(87, 242, 135, 0.22);
    background: rgba(87, 242, 135, 0.08);
}

.debrief-summary-score--win .debrief-summary-score-value {
    color: var(--win);
}

.debrief-summary-score--loss {
    border-color: rgba(237, 66, 69, 0.22);
    background: rgba(237, 66, 69, 0.08);
}

.debrief-summary-score--loss .debrief-summary-score-value {
    color: var(--loss);
}

.debrief-summary-chevron {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
}

.debrief-summary-chevron::before {
    content: '+';
}

.debrief-accordion[open] .debrief-summary-chevron {
    color: #fca5a5;
    border-color: rgba(237, 66, 69, 0.35);
}

.debrief-accordion[open] .debrief-summary-chevron::before {
    content: '−';
}

.debrief-delete-btn {
    flex-shrink: 0;
    padding: 7px 11px;
    font-size: 0.82rem;
}

.panel-subtitle {
    margin: 4px 0 0;
    font-size: 0.88rem;
}

.scrim-history-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 8px 4px 12px;
}

.scrim-day-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scrim-day-title {
    margin: 0;
    padding-left: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.scrim-day-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scrim-accordion {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.scrim-accordion[open] {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.scrim-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.scrim-row::-webkit-details-marker {
    display: none;
}

.scrim-type {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text);
}

.scrim-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 4vw, 36px);
    min-width: 0;
    text-align: center;
}

.scrim-team {
    font-size: clamp(0.95rem, 1.6vw, 1.12rem);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scrim-team-us {
    text-align: right;
    flex: 1 1 0;
    min-width: 0;
}

.scrim-team-them {
    text-align: left;
    flex: 1 1 0;
    min-width: 0;
}

.scrim-team-us.scrim-team-winner .scrim-team-name,
.scrim-map-side-us .scrim-team-name-winner,
.scrim-map-side-them .scrim-team-name-winner,
.eva-team-column-left .scrim-team-name-winner {
    border-left: 3px solid rgba(87, 242, 135, 0.55);
    padding-left: 10px;
}

.scrim-team-us.scrim-team-loser .scrim-team-name,
.scrim-map-side-us .scrim-team-name-loser,
.scrim-map-side-them .scrim-team-name-loser,
.eva-team-column-left .scrim-team-name-loser {
    border-left: 3px solid rgba(237, 66, 69, 0.55);
    padding-left: 10px;
}

.scrim-team-them.scrim-team-winner .scrim-team-name,
.eva-team-column:not(.eva-team-column-left) .scrim-team-name-winner {
    border-right: 3px solid rgba(87, 242, 135, 0.55);
    padding-right: 10px;
}

.scrim-team-them.scrim-team-loser .scrim-team-name,
.eva-team-column:not(.eva-team-column-left) .scrim-team-name-loser {
    border-right: 3px solid rgba(237, 66, 69, 0.55);
    padding-right: 10px;
}

.scrim-score {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.scrim-score-value {
    min-width: 1.2ch;
    text-align: center;
}

.scrim-score-win {
    color: #e8940a;
}

.scrim-score-loss {
    color: #5b8fd4;
}

.scrim-score-sep {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.scrim-row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.scrim-delete-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
}

.scrim-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.45);
    border-bottom: 2px solid rgba(255, 255, 255, 0.45);
    transform: rotate(45deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.scrim-accordion[open] .scrim-chevron {
    transform: rotate(-135deg);
    border-color: rgba(255, 255, 255, 0.72);
}

.scrim-detail {
    padding: 0 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scrim-detail-loading {
    padding-top: 16px;
}

.scrim-detail-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
}

.scrim-detail-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scrim-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--muted);
    font-size: 0.92rem;
}

.scrim-detail-lineup,
.scrim-detail-note,
.scrim-detail-vod {
    font-size: 0.92rem;
}

.scrim-map-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scrim-map-row {
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.scrim-map-row[open] {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.035);
}

.scrim-map-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "media chevron"
        "faceoff faceoff";
    gap: 12px 16px;
    align-items: start;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.scrim-map-summary::-webkit-details-marker {
    display: none;
}

.scrim-map-media {
    grid-area: media;
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.scrim-map-media-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.scrim-map-name {
    font-size: 0.95rem;
    line-height: 1.25;
    word-break: break-word;
}

.scrim-map-outcome {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.scrim-map-outcome.win {
    color: var(--win);
}

.scrim-map-outcome.loss {
    color: var(--loss);
}

.scrim-map-faceoff {
    grid-area: faceoff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.scrim-faceoff-divider {
    align-self: center;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.scrim-faceoff-team {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.scrim-faceoff-score {
    flex-shrink: 0;
    min-width: 2.5ch;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.scrim-faceoff-team-main {
    flex: 1;
    min-width: 0;
}

.scrim-faceoff-name {
    display: block;
    margin-bottom: 8px;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.scrim-player-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scrim-player-chip {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scrim-player-chip--empty {
    color: var(--muted);
}

.scrim-map-chevron {
    grid-area: chevron;
    align-self: center;
}

.scrim-map-row[open] .scrim-map-chevron {
    transform: rotate(-135deg);
    border-color: rgba(255, 255, 255, 0.72);
}

.scrim-map-thumb {
    position: relative;
    width: 120px;
    height: 68px;
    border-radius: 8px;
    background: #111 center / cover no-repeat;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.scrim-map-matchup {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.scrim-map-side {
    display: grid;
    grid-template-columns: 52px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.scrim-map-side-info {
    display: contents;
}

.scrim-map-score {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    padding-top: 2px;
}

.scrim-map-team {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 4px;
}

.scrim-map-players {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
    padding-top: 4px;
    word-break: break-word;
}

.scrim-map-stats-board {
    margin: 0;
    padding: 12px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scrim-map-card {
    margin: 0;
}

.scrim-no-players {
    margin: 8px 0 0;
    font-size: 0.85rem;
}

.scrim-fallback-map {
    padding: 14px;
}

.scrim-map-text {
    margin: 10px 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
}

.debrief-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 16px 16px;
    border-top: 1px solid var(--panel-border);
}

.debrief-content-toolbar {
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
}

.debrief-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.debrief-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--muted);
    font-size: 0.92rem;
}

.debrief-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.debrief-section h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.debrief-section ul,
.debrief-map-notes {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}

.debrief-map-block {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
}

.debrief-map-block + .debrief-map-block {
    margin-top: 10px;
}

.debrief-maps h4 {
    margin: 0 0 12px;
}

.debrief-map-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.debrief-map-card {
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.debrief-map-card[open] {
    border-color: rgba(255, 255, 255, 0.12);
}

.debrief-map-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
}

.debrief-map-summary::-webkit-details-marker {
    display: none;
}

.debrief-map-summary-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.debrief-map-thumb-wrap {
    flex: 0 0 96px;
    width: 96px;
    max-width: 96px;
}

.debrief-map-thumb {
    display: block;
    width: 100%;
    height: 54px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05) center / cover no-repeat;
    border: 1px solid var(--panel-border);
    overflow: hidden;
}

.debrief-map-summary-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-left: 2px;
}

.debrief-map-name {
    display: block;
    font-size: 0.95rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.debrief-map-result {
    display: block;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.debrief-map-chevron {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
}

.debrief-map-chevron::before {
    content: '+';
}

.debrief-map-card[open] .debrief-map-chevron::before {
    content: '−';
}

.debrief-map-result-win {
    color: var(--win);
}

.debrief-map-result-loss {
    color: var(--loss);
}

.debrief-map-body {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--panel-border);
}

.debrief-vod-player {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.debrief-vod-player-header,
.debrief-vod-fallback {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: space-between;
}

.debrief-vod-frame-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    background: #000;
}

.debrief-vod-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.debrief-vod-hint {
    margin: 0;
    font-size: 0.84rem;
}

.debrief-timecode {
    border: none;
    background: rgba(255, 138, 140, 0.14);
    color: #ff8a8c;
    padding: 0 6px;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
}

.debrief-timecode:hover {
    background: rgba(255, 138, 140, 0.24);
    text-decoration: underline;
}

.debrief-link {
    color: #ff8a8c;
    text-decoration: none;
}

.debrief-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .debrief-summary {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 12px 14px;
    }

    .debrief-summary:has(.debrief-delete-btn) {
        grid-template-areas:
            "main chevron"
            "delete delete";
    }

    .debrief-summary:not(:has(.debrief-delete-btn)) {
        grid-template-areas: "main chevron";
    }

    .debrief-summary-main {
        grid-area: main;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 10px 12px;
    }

    .debrief-summary-chevron {
        grid-area: chevron;
        align-self: start;
    }

    .debrief-summary-score {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
    }

    .debrief-delete-btn {
        grid-area: delete;
        width: 100%;
    }

    .debrief-map-summary-main {
        gap: 12px;
    }

    .debrief-map-thumb-wrap {
        flex-basis: 72px;
        width: 72px;
        max-width: 72px;
    }

    .debrief-map-thumb {
        height: 40px;
    }
}

.calendar-panel {
    overflow: hidden;
    padding: 0;
}

.calendar-panel .calendar-toolbar,
.calendar-panel .calendar-legend {
    padding: 16px 18px 0;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.calendar-toolbar-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.calendar-toolbar-title h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 500;
}

.calendar-nav-btn,
.calendar-today-btn {
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    line-height: 1;
}

.calendar-today-btn {
    padding: 6px 14px;
    font-size: 0.84rem;
    border-radius: 999px;
}

.calendar-nav-btn:hover,
.calendar-today-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.86rem;
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.calendar-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.calendar-legend-swatch.indispo {
    background: #b39b2e;
}

.calendar-legend-swatch.match {
    background: #2f8f62;
}

.calendar-legend-swatch.event {
    background: #8b5cf6;
}

.gcal-shell {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gcal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 10px 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gcal-weeks {
    display: flex;
    flex-direction: column;
}

.gcal-week {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    height: max(112px, calc(56px + var(--gcal-week-lanes, 0) * 24px));
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    isolation: isolate;
}

.gcal-week.is-quick-add-open {
    z-index: 50;
}

.gcal-day-cell,
.gcal-day-outside {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.gcal-day-cell.is-quick-add-open {
    z-index: 50;
    pointer-events: none;
}

.gcal-day-cell.is-quick-add-open > .gcal-day-add,
.gcal-day-cell.is-quick-add-open > .gcal-day-add-menu {
    pointer-events: auto;
}

.gcal-day-cell.is-quick-add-open > .gcal-day {
    pointer-events: none;
}

.gcal-day-cell.is-quick-add-open > .gcal-day-add-menu * {
    pointer-events: auto;
}

.gcal-day-outside {
    background: rgba(255, 255, 255, 0.012);
}

.gcal-day-cell:last-child,
.gcal-day-outside:last-child {
    border-right: none;
}

.gcal-day {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    border: none;
    padding: 8px 10px 4px 48px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: right;
}

.gcal-day:hover {
    background: rgba(255, 255, 255, 0.03);
}

.gcal-day.is-selected {
    background: rgba(88, 101, 242, 0.1);
}

.gcal-day-cell.is-range-start {
    box-shadow: inset 0 0 0 2px #b39b2e;
    background: rgba(179, 155, 46, 0.1);
}

.gcal-day-cell.is-before-range .gcal-day {
    opacity: 0.45;
}

.gcal-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    font-size: 0.84rem;
    font-weight: 500;
}

.gcal-day.is-today .gcal-day-number {
    background: #3b82f6;
    color: #fff;
    border-radius: 999px;
}

.gcal-day-add {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 30;
    width: 44px;
    height: 44px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.gcal-day-add[hidden] {
    display: none;
}

.gcal-day-add:hover,
.gcal-day-add:focus-visible,
.gcal-day-add[aria-expanded="true"] {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.gcal-day:focus-visible,
.gcal-day-add:focus-visible,
.gcal-day-add-menu button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: -2px;
}

.gcal-day-add-menu {
    position: absolute;
    top: 42px;
    right: 4px;
    z-index: 40;
    width: max-content;
    min-width: 168px;
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.gcal-day-cell:nth-child(-n + 3) .gcal-day-add-menu {
    right: auto;
    left: 4px;
}

.gcal-week:last-child .gcal-day-add-menu {
    top: auto;
    bottom: 42px;
}

.gcal-day-add-menu[hidden] {
    display: none;
}

.gcal-day-add-menu button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.gcal-day-add-menu button:hover {
    background: rgba(255, 255, 255, 0.06);
}

.gcal-week-bars {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: start;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: 22px;
    gap: 2px;
    width: 100%;
    min-width: 0;
    margin-top: 48px;
    max-height: calc(100% - 52px);
    padding: 0 2px 4px;
    overflow: hidden;
    pointer-events: none;
}

.gcal-bar {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    height: 20px;
    padding: 0 8px;
    border: none;
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: auto;
}

.gcal-bar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gcal-bar-indispo {
    background: #b39b2e;
    border-radius: 4px;
}

.gcal-bar-match {
    background: #2f8f62;
    border-radius: 4px;
}

.gcal-bar-event { border-radius: 4px; }
.gcal-bar-event-training { background: #2563eb; }
.gcal-bar-event-call { background: #0891b2; }
.gcal-bar-event-appointment { background: #8b5cf6; }
.gcal-bar-event-team_event { background: #db2777; }
.gcal-bar-event-meeting { background: #ea580c; }

.gcal-bar.continues-before {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 0;
}

.gcal-bar.continues-after {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: 0;
}

.gcal-bar.is-selected {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 1px;
}

.gcal-bar:hover {
    filter: brightness(1.08);
}

.calendar-detail-panel {
    margin-top: 16px;
}

.calendar-range-prompt {
    margin: 0 18px 12px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(179, 155, 46, 0.45);
    border-radius: 12px;
    background: rgba(179, 155, 46, 0.1);
    color: var(--text);
}

.calendar-range-prompt[hidden] {
    display: none;
}

.calendar-range-prompt.is-error {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.1);
}

.calendar-range-prompt button {
    min-height: 44px;
    flex: 0 0 auto;
}

.calendar-event-group + .calendar-event-group {
    margin-top: 16px;
}

.calendar-event-group-title {
    margin: 0 0 8px;
    font-size: 0.92rem;
}

.calendar-event-group-title.indispo {
    color: #e8d58b;
}

.calendar-event-group-title.match {
    color: #86efac;
}

.calendar-event-group-title.event {
    color: #c4b5fd;
}

.calendar-event-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.02);
}

.calendar-event-card.indispo {
    border-color: rgba(179, 155, 46, 0.35);
}

.calendar-event-card.match {
    border-color: rgba(47, 143, 98, 0.35);
}

.calendar-event-card.event {
    border-color: rgba(139, 92, 246, 0.42);
}

@media (max-width: 900px) {
    .gcal-week {
        height: max(96px, calc(56px + var(--gcal-week-lanes, 0) * 24px));
    }

    .gcal-bar {
        font-size: 0.64rem;
        padding: 0 5px;
    }

    .gcal-day-number {
        min-width: 24px;
        height: 24px;
        font-size: 0.78rem;
    }
}

/* ── Mobile app layout ───────────────────────────────────────── */

@media (max-width: 900px), (orientation: landscape) and (pointer: coarse) {
    :root {
        --mobile-content-gap: 12px;
        --mobile-browser-bottom: 0px;
        --mobile-tabbar-height: 76px;
    }

    html {
        height: 100%;
    }

    body {
        -webkit-tap-highlight-color: transparent;
        overscroll-behavior-y: none;
        min-height: 100%;
    }

    body.mobile-sheet-open {
        overflow: hidden;
    }

    .app-shell {
        grid-template-columns: 1fr;
        min-height: 100dvh;
    }

    .sidebar {
        display: none;
    }

    .main {
        padding: 0;
        min-height: 100dvh;
        box-sizing: border-box;
    }

    .mobile-tabbar-spacer {
        display: block;
        height: 76px;
        flex-shrink: 0;
    }

    .mobile-topbar {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 12px;
        background: rgba(15, 15, 18, 0.92);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .mobile-topbar-main {
        min-width: 0;
    }

    .mobile-topbar-eyebrow {
        margin: 0;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--accent);
    }

    .mobile-topbar-title {
        margin: 2px 0 0;
        font-size: 1.15rem;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-topbar-subtitle {
        margin: 4px 0 0;
        color: var(--muted);
        font-size: 0.78rem;
        line-height: 1.4;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-word;
    }

    .mobile-topbar-refresh {
        flex-shrink: 0;
        margin-top: 2px;
    }

    .mobile-topbar-subtitle:empty,
    .mobile-topbar-subtitle[hidden] {
        display: none;
    }

    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: var(--mobile-browser-bottom, 0px);
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 2px;
        padding: 6px 8px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(18, 18, 24, 0.96);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .mobile-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        min-height: 44px;
        padding: 5px 1px;
        border: none;
        border-radius: 14px;
        background: transparent;
        color: var(--muted);
        font-size: clamp(0.55rem, 2.25vw, 0.68rem);
        font-weight: 600;
        touch-action: manipulation;
    }

    .mobile-tab-icon {
        font-size: 1.2rem;
        line-height: 1;
    }

    .mobile-tab-label {
        display: block;
        width: 100%;
        overflow: hidden;
        line-height: 1.1;
        text-align: center;
        text-overflow: clip;
        white-space: nowrap;
    }

    .mobile-tab.active {
        color: #fff;
        background: rgba(237, 66, 69, 0.16);
        box-shadow: inset 0 0 0 1px rgba(237, 66, 69, 0.28);
    }

    .mobile-sheet {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        pointer-events: none;
    }

    .mobile-sheet[hidden] {
        display: none !important;
    }

    .mobile-sheet:not([hidden]) {
        pointer-events: auto;
    }

    .mobile-sheet-backdrop {
        position: absolute;
        inset: 0;
        border: none;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        transition: opacity 0.25s ease;
        padding: 0;
    }

    .mobile-sheet.is-open .mobile-sheet-backdrop {
        opacity: 1;
    }

    .mobile-sheet-panel {
        position: relative;
        width: calc(100% - 16px);
        max-height: min(60dvh, 440px);
        margin-bottom: calc(var(--mobile-tabbar-height, 76px) + var(--mobile-browser-bottom, 0px) + 6px);
        padding: 8px 12px 12px;
        border-radius: 18px;
        background: #17171d;
        border: 1px solid rgba(255, 255, 255, 0.08);
        transform: translateY(100%);
        transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-sheet.is-open .mobile-sheet-panel {
        transform: translateY(0);
    }

    .mobile-sheet-handle {
        width: 42px;
        height: 4px;
        margin: 4px auto 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
    }

    .mobile-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }

    .mobile-sheet-header h3 {
        margin: 0;
        font-size: 1.1rem;
    }

    .mobile-sheet-close-btn {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: var(--text);
        font-size: 1.4rem;
        line-height: 1;
    }

    .mobile-sheet-nav {
        display: grid;
        gap: 8px;
    }

    .mobile-sheet-group {
        display: grid;
        gap: 8px;
    }

    .mobile-sheet-group-title {
        margin: 8px 0 0;
        padding: 0 4px;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .mobile-sheet-link {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        min-height: 44px;
        padding: 9px 12px;
        border-radius: 14px;
        border: 1px solid var(--panel-border);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text);
        font-size: 0.95rem;
        font-weight: 600;
        text-align: left;
        touch-action: manipulation;
    }

    .mobile-sheet-link.active {
        background: rgba(237, 66, 69, 0.14);
        border-color: rgba(237, 66, 69, 0.35);
    }

    .mobile-sheet-link-icon {
        width: 1.5rem;
        text-align: center;
        font-size: 1.15rem;
        color: var(--nav-icon-color, #c4c7d2);
    }

    .mobile-sheet-admin {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--panel-border);
        display: grid;
        gap: 8px;
    }

    .mobile-sheet-admin[hidden] {
        display: none;
    }

    .page-content {
        gap: var(--mobile-content-gap);
        padding: 12px 14px 12px;
        animation: mobile-page-in 0.22s ease;
    }

    @keyframes mobile-page-in {
        from {
            opacity: 0.35;
            transform: translateY(6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .page-header {
        display: none;
    }

    .home-section-title {
        font-size: 0.95rem;
        margin: 4px 0 10px;
    }

    .category-grid,
    .stats-grid,
    .panel-grid,
    .home-insights {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .home-upcoming-split,
    .home-dashboard-row .home-upcoming-split {
        grid-template-columns: 1fr;
    }

    .home-upcoming-featured-title {
        font-size: 1.2rem;
    }

    .home-upcoming-queue-item {
        min-height: 44px;
        touch-action: manipulation;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-card,
    .panel,
    .upcoming-card,
    .featured-upcoming-card,
    .suggestion-sidebar-card,
    .home-insight-panel,
    .stat-card {
        border-radius: 16px;
    }

    .category-link,
    .tab-btn,
    .upcoming-see-all,
    .upcoming-cancel-btn,
    .result-delete-btn,
    .roster-picker-item,
    .discord-roster-item,
    button.home-teaser {
        min-height: 44px;
        touch-action: manipulation;
    }

    .upcoming-card-top,
    .featured-upcoming-head,
    .suggestion-sidebar-top,
    .suggestion-card-top {
        flex-direction: column;
        align-items: stretch;
    }

    .upcoming-card-actions,
    .featured-upcoming-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .featured-upcoming-content {
        padding: 18px;
        gap: 14px;
    }

    .featured-upcoming-title {
        font-size: 1.65rem;
    }

    .featured-upcoming-bg-has-logo::before {
        background-size: min(56vw, 200px);
        opacity: 0.08;
    }

    .upcoming-page-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .upcoming-page-hero .featured-upcoming-content {
        padding: 18px;
    }

    .upcoming-list-row {
        padding: 14px;
    }

    .upcoming-list-row-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .upcoming-layout {
        gap: 12px;
    }

    .roster-list,
    .discord-roster-list {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .table-wrap {
        margin: 0 -4px;
        border-radius: 12px;
    }

    .calendar-toolbar {
        gap: 8px;
    }

    .calendar-nav-btn,
    .calendar-today-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .gcal-week {
        height: max(96px, calc(56px + var(--gcal-week-lanes, 0) * 24px));
    }

    .eva-link-layout {
        grid-template-columns: 1fr;
    }

    .error-banner {
        margin: 0 14px 8px;
        border-radius: 12px;
    }
}

.stats-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-category-tabs,
.stats-player-tabs {
    flex-wrap: wrap;
    margin-bottom: 0;
}

.stats-category-tab,
.stats-player-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border-color: rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.035);
    transition:
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.stats-category-tab:hover,
.stats-player-tab:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.stats-category-tab.active,
.stats-player-tab.active {
    border-color: var(--accent-border);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(237, 66, 69, 0.08);
}

.stats-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stats-category-desc {
    margin: -6px 0 2px;
    line-height: 1.55;
}

.stats-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.stats-section > .panel-header {
    margin: 0;
    padding: 0 2px;
}

.stats-section > .panel-header h3 {
    font-size: 1.08rem;
}

.stats-section > .panel-header .panel-subtitle {
    max-width: 64ch;
    text-align: right;
    line-height: 1.45;
}

.stats-page-summary .stat-value {
    font-size: clamp(1.35rem, 1.8vw, 1.7rem);
}

.stats-kda-split {
    font-size: clamp(0.92rem, 1.2vw, 1.08rem) !important;
    white-space: nowrap;
}

.stats-map-panel {
    padding: 0;
    overflow: hidden;
}

.stats-map-panel > .panel-header {
    margin: 0;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.stats-empty-state {
    margin: 0;
    padding: 18px 20px 20px;
    line-height: 1.55;
}

.stats-map-table-wrap {
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.stats-map-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.stats-map-table th,
.stats-map-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--panel-border);
    vertical-align: middle;
}

.stats-map-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
}

.stats-map-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.stats-map-thumb {
    display: inline-block;
    width: 42px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06) center / cover no-repeat;
    flex-shrink: 0;
}

.stats-winrate--pos {
    color: #57f287;
    font-weight: 600;
}

.stats-winrate--neg {
    color: #ed4245;
    font-weight: 600;
}

.stats-map-row--strength {
    background: rgba(87, 242, 135, 0.05);
}

.stats-map-row--weakness {
    background: rgba(237, 66, 69, 0.06);
}

.stats-tier {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.stats-tier--strength {
    background: rgba(87, 242, 135, 0.16);
    color: #57f287;
}

.stats-tier--weakness {
    background: rgba(237, 66, 69, 0.16);
    color: #ed4245;
}

.stats-priorities-panel {
    padding: 0;
}

.stats-priority-list {
    list-style: none;
    margin: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-priority-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.stats-priority-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-trend-hint {
    margin: 0;
    font-size: 0.88rem;
}

.stats-trend-panel {
    padding: 14px 16px;
    border-left: 3px solid var(--panel-border);
}

.stats-trend-panel--up {
    border-left-color: #57f287;
    background: rgba(87, 242, 135, 0.06);
}

.stats-trend-panel--down {
    border-left-color: #ed4245;
    background: rgba(237, 66, 69, 0.06);
}

.stats-trend-panel--stable {
    border-left-color: #5865f2;
    background: rgba(88, 101, 242, 0.06);
}

.stats-trend-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.stats-trend-metrics {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
}

.stats-trend-deltas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.stats-delta {
    font-weight: 700;
    font-size: 0.9rem;
}

.stats-delta--pos {
    color: #57f287;
}

.stats-delta--neg {
    color: #f47b8b;
}

.stats-map-trend {
    font-weight: 700;
    font-size: 0.84rem;
    white-space: nowrap;
}

.stats-map-trend--pos {
    color: #57f287;
}

.stats-map-trend--neg {
    color: #f47b8b;
}

.stats-analysis-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-action-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.stats-insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.stats-insight-block {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.055);
}

.stats-insight-block--focus {
    border-color: rgba(250, 166, 26, 0.25);
}

.stats-insight-block--down {
    border-color: rgba(237, 66, 69, 0.2);
}

.stats-insight-block--up {
    border-color: rgba(87, 242, 135, 0.2);
}

.stats-insight-block .panel-header h4 {
    margin: 0;
    font-size: 0.95rem;
}

.stats-insight-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-insight-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-insight-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.88rem;
}

@media (max-width: 720px) {
    .stats-page {
        gap: 16px;
    }

    .stats-section > .panel-header {
        flex-direction: column;
        gap: 4px;
    }

    .stats-section > .panel-header .panel-subtitle {
        margin-top: 0;
        text-align: left;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stats-page-summary .stat-card {
        min-width: 0;
        padding: 14px;
    }

    .stats-kda-split {
        white-space: normal;
    }
}

@media (min-width: 901px) {
    .mobile-topbar,
    .mobile-tabbar-spacer,
    .mobile-tabbar,
    .mobile-sheet {
        display: none !important;
    }
}

/* A touch device in landscape should keep the compact portrait navigation.
   This also covers large phone/tablet viewports whose CSS width exceeds 900px. */
@media (min-width: 901px) and (orientation: landscape) and (pointer: coarse) {
    .sidebar {
        display: none;
    }

    .app-shell {
        grid-template-columns: 1fr;
        min-height: 100dvh;
    }

    .mobile-topbar {
        display: flex !important;
    }

    .mobile-tabbar-spacer {
        display: block !important;
        flex-shrink: 0;
    }

    .mobile-tabbar-spacer { height: 76px; }

    .mobile-tabbar {
        display: grid !important;
    }

    .mobile-sheet { display: flex !important; }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-sheet-backdrop,
    .mobile-sheet-panel {
        transition: none;
    }
}

/* ── Loading Screen ─────────────────────────────────────────────────────── */

#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#loading-screen.ls-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ls-bg-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 35%, rgba(160, 20, 20, 0.1) 0%, transparent 65%),
        radial-gradient(ellipse 40% 30% at 50% 35%, rgba(200, 40, 40, 0.05) 0%, transparent 50%);
    pointer-events: none;
    animation: ls-glow-breathe 4s ease-in-out infinite;
}

@keyframes ls-glow-breathe {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.ls-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    text-align: center;
    padding: 1rem;
    z-index: 1;
}

.ls-logos {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ls-logos {
    gap: clamp(0.8rem, 3vw, 1.75rem);
}

.ls-logo-frame {
    width: clamp(112px, 20vw, 184px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: clamp(24px, 4vw, 42px);
    background: rgba(19, 19, 23, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.42),
        0 0 36px rgba(192, 57, 43, 0.08);
    will-change: transform, opacity;
}

.ls-logo-frame--app {
    animation: ls-logo-join-left 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.ls-logo-frame--team {
    animation: ls-logo-join-right 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.ls-logo-frame--team .ls-logo-image {
    object-fit: cover;
}

.ls-logo-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.ls-logo-image.hidden,
.ls-team-fallback.hidden {
    display: none;
}

.ls-team-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: clamp(16px, 3vw, 30px);
    background:
        linear-gradient(145deg, rgba(237, 66, 69, 0.24), rgba(237, 66, 69, 0.04)),
        #111117;
    color: #f4f4f5;
    font-size: clamp(2rem, 7vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.08em;
    text-shadow: 0 0 24px rgba(237, 66, 69, 0.28);
}

.ls-logo-separator {
    position: relative;
    z-index: 2;
    color: #ff6b6b;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 300;
    line-height: 1;
    text-shadow: 0 0 18px rgba(237, 66, 69, 0.7);
    animation: ls-separator-pop 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.92s both;
}

@keyframes ls-logo-join-left {
    from {
        opacity: 0;
        transform: translateX(clamp(-180px, -20vw, -80px)) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ls-logo-join-right {
    from {
        opacity: 0;
        transform: translateX(clamp(80px, 20vw, 180px)) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ls-separator-pop {
    from {
        opacity: 0;
        transform: scale(0) rotate(-90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.ls-kanji {
    font-size: clamp(72px, 14vw, 130px);
    color: #c0392b;
    line-height: 1;
    user-select: none;
    position: relative;
    z-index: 2;
    animation: ls-kanji-breathe 3.5s ease-in-out infinite;
    text-shadow:
        0 0 18px rgba(192, 57, 43, 0.7),
        0 0 50px rgba(192, 57, 43, 0.35),
        0 0 90px rgba(192, 57, 43, 0.15);
}

@keyframes ls-kanji-breathe {
    0%, 100% {
        transform: scale(1);
        text-shadow:
            0 0 18px rgba(192, 57, 43, 0.7),
            0 0 50px rgba(192, 57, 43, 0.35),
            0 0 90px rgba(192, 57, 43, 0.15);
    }
    50% {
        transform: scale(1.04);
        text-shadow:
            0 0 28px rgba(220, 60, 40, 0.9),
            0 0 70px rgba(192, 57, 43, 0.55),
            0 0 130px rgba(192, 57, 43, 0.25);
    }
}

.ls-kanji-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(192, 57, 43, 0.18);
    animation: ls-ring-spin 12s linear infinite;
    box-shadow: inset 0 0 30px rgba(192, 57, 43, 0.06);
}

.ls-kanji-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: rgba(192, 57, 43, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(192, 57, 43, 0.8);
}

@keyframes ls-ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ls-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.ls-brand-name {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 700;
    color: #f0f0f0;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.ls-brand-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.ls-quote {
    min-height: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    max-width: min(480px, 88vw);
}

.ls-quote-jp {
    font-size: clamp(1rem, 3vw, 1.35rem);
    color: #d4a65a;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin: 0;
    transition: opacity 0.45s ease, transform 0.45s ease;
    min-height: 1.6em;
}

.ls-quote-fr {
    font-size: clamp(0.72rem, 2vw, 0.82rem);
    color: rgba(255,255,255,0.38);
    font-style: italic;
    margin: 0;
    line-height: 1.6;
    transition: opacity 0.45s ease, transform 0.45s ease;
    min-height: 2.4em;
}

.ls-quote-jp.ls-fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.ls-quote-fr.ls-fade-out {
    opacity: 0;
    transform: translateY(-6px);
}

.ls-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255,255,255,0.05);
}

.ls-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7f1d1d 0%, #c0392b 60%, #ff6b6b 100%);
    box-shadow: 0 0 10px rgba(192, 57, 43, 0.7), 0 0 20px rgba(192, 57, 43, 0.3);
    transition: none;
    position: relative;
}

.ls-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 4px;
    height: 6px;
    background: #ff6b6b;
    border-radius: 2px;
    box-shadow: 0 0 8px #ff6b6b, 0 0 16px rgba(255,107,107,0.6);
}

@media (max-width: 420px) {
    .ls-logo-frame {
        width: clamp(104px, 32vw, 128px);
        border-radius: clamp(22px, 7vw, 30px);
    }
}

@media (prefers-reduced-motion: reduce) {
    #loading-screen,
    .ls-bg-glow,
    .ls-logo-frame,
    .ls-logo-separator {
        animation: none;
        transition-duration: 0.01ms;
    }
}
.debrief-room-slot { min-width: 0; }

.debrief-room-placeholder,
.debrief-room-error {
    min-height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 22px;
    text-align: center;
    border: 1px dashed var(--panel-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.debrief-room-placeholder--loading { flex-direction: row; text-align: left; }
.debrief-room-placeholder--loading > div { display: flex; flex-direction: column; gap: 4px; }
.debrief-room-spinner {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #ff8a8c;
    border-radius: 50%;
    animation: debrief-room-spin 0.8s linear infinite;
}
@keyframes debrief-room-spin { to { transform: rotate(360deg); } }

.debrief-room-studio-shell {
    overflow: hidden;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: #09090b;
}

body.debrief-room-studio-active { overflow: hidden; }

.debrief-room-studio-shell:fullscreen,
.debrief-room-studio-shell--overlay {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    background: #09090b;
}

.debrief-room-studio-shell--overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    height: 100dvh;
}

.debrief-room-embed-toolbar {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--panel-border);
    background: #111114;
}

.debrief-room-embed-toolbar > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.debrief-room-embed-toolbar strong,
.debrief-room-embed-toolbar .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debrief-room-embed-toolbar .muted { font-size: 0.78rem; }
.debrief-room-embed-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}
.debrief-studio-toggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid rgba(255, 138, 140, 0.42);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.debrief-studio-toggle:hover,
.debrief-studio-toggle[aria-pressed="true"] {
    border-color: #ff8a8c;
    background: rgba(239, 68, 68, 0.22);
}
.debrief-studio-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.32);
}
.debrief-studio-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.debrief-room-frame-wrap { min-height: 0; overflow: hidden; background: #09090b; }
.debrief-room-frame { display: block; width: 100%; height: 720px; min-height: 0; border: 0; background: #09090b; }
.debrief-room-studio-shell:fullscreen .debrief-room-embed-toolbar,
.debrief-room-studio-shell--overlay .debrief-room-embed-toolbar {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}
.debrief-room-studio-shell:fullscreen .debrief-room-frame,
.debrief-room-studio-shell--overlay .debrief-room-frame { height: 100%; }
.debrief-room-error .tab-btn { margin-top: 8px; }

@media (max-width: 640px) {
    .debrief-room-embed-toolbar { align-items: flex-start; flex-direction: column; }
    .debrief-room-embed-actions { width: 100%; justify-content: space-between; }
    .debrief-room-studio-shell:fullscreen .debrief-room-embed-toolbar,
    .debrief-room-studio-shell--overlay .debrief-room-embed-toolbar {
        align-items: center;
        flex-direction: row;
    }
    .debrief-room-studio-shell:fullscreen .debrief-room-embed-toolbar > div:first-child,
    .debrief-room-studio-shell--overlay .debrief-room-embed-toolbar > div:first-child { display: none; }
    .debrief-room-studio-shell:fullscreen .debrief-room-embed-actions,
    .debrief-room-studio-shell--overlay .debrief-room-embed-actions { margin-left: auto; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .debrief-studio-toggle { transition: none; }
}

.authorization-policy-panel {
    margin-top: 18px;
}

.authorization-policy-heading,
.authorization-binding-header,
.authorization-policy-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.authorization-policy-heading h3,
.authorization-binding-header .field-label {
    margin-top: 0;
}

.authorization-mode-field {
    max-width: 320px;
    margin: 18px 0;
}

.authorization-binding {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-panel);
    background: rgba(255, 255, 255, 0.025);
}

.authorization-binding-header .field-label {
    flex: 1;
}

.authorization-role-mapping,
.authorization-permission-group {
    min-width: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.authorization-role-mapping legend,
.authorization-permission-group legend {
    padding: 0 7px;
    color: #f3f4f6;
    font-size: 0.8rem;
    font-weight: 750;
}

.authorization-role-list,
.authorization-permission-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    padding: 12px;
}

.authorization-permission-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.authorization-choice {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
}

.authorization-choice:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.authorization-choice:focus-within {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.authorization-choice input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--accent);
}

.authorization-choice span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.authorization-choice small {
    color: var(--muted);
    font-size: 0.72rem;
}

.authorization-choice[data-authorization-action-kind="read"] small {
    color: #93c5fd;
}

.authorization-choice[data-authorization-action-kind="mutation"] small {
    color: #fca5a5;
}

.authorization-role-choice.is-missing {
    border-color: rgba(251, 191, 36, 0.35);
}

.authorization-effective-preview {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-left: 3px solid var(--draw);
    border-radius: 8px;
    background: rgba(88, 101, 242, 0.1);
}

.authorization-effective-preview span,
.authorization-empty-state {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.authorization-policy-actions {
    margin-top: 18px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

@media (max-width: 720px) {
    .authorization-policy-heading,
    .authorization-binding-header {
        align-items: stretch;
        flex-direction: column;
    }

    .authorization-permission-matrix,
    .authorization-role-list,
    .authorization-permission-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .authorization-policy-actions > button {
        width: 100%;
    }
}
