		button {
			touch-action: manipulation;
			user-select: none;
		}

		select {
			-webkit-user-select: auto !important;
			user-select: auto !important;
		}

:root {
    --site-banner-content-height: 88px;
    --site-banner-height: calc(var(--site-banner-content-height) + env(safe-area-inset-top, 0px));
    --team-primary: #1919c8;
    --team-primary-dark: #0f0f78;
    --team-accent: #a6a6f3;
    --team-foreground: #fff;
    --team-text-shadow: 0 1px 2px rgb(15 23 42 / .55);
    --opponent-primary: #1ce31c;
    --opponent-primary-dark: #118811;
    --opponent-accent: #a6f5a6;
    --opponent-foreground: #000;
    --opponent-text-shadow: none;
}

:root[data-team-ads="hidden"] {
    --site-banner-content-height: 0px;
}

body {
    padding-top: var(--site-banner-height) !important;
}
:root[data-team-theme="red"] { --team-primary: #c81919; --team-primary-dark: #780f0f; --team-accent: #f3a6a6; --team-foreground: #fff; --team-text-shadow: 0 1px 2px rgb(15 23 42 / .55); }
:root[data-team-theme="orange"] { --team-primary: #ff9f1c; --team-primary-dark: #a64b00; --team-accent: #ffe0ad; --team-foreground: #000; --team-text-shadow: none; }
:root[data-team-theme="amber"] { --team-primary: #e3e31c; --team-primary-dark: #888811; --team-accent: #f5f5a6; --team-foreground: #000; --team-text-shadow: none; }
:root[data-team-theme="lime"] { --team-primary: #80e31c; --team-primary-dark: #4d8811; --team-accent: #d0f5a6; --team-foreground: #000; --team-text-shadow: none; }
:root[data-team-theme="emerald"] { --team-primary: #1ce31c; --team-primary-dark: #118811; --team-accent: #a6f5a6; --team-foreground: #000; --team-text-shadow: none; }
:root[data-team-theme="teal"] { --team-primary: #1ce380; --team-primary-dark: #11884d; --team-accent: #a6f5d0; --team-foreground: #000; --team-text-shadow: none; }
:root[data-team-theme="sky"] { --team-primary: #1ce3e3; --team-primary-dark: #118888; --team-accent: #a6f5f5; --team-foreground: #000; --team-text-shadow: none; }
:root[data-team-theme="blue"] { --team-primary: #1970c8; --team-primary-dark: #0f4378; --team-accent: #a6cbf3; --team-foreground: #fff; --team-text-shadow: 0 1px 2px rgb(15 23 42 / .55); }
:root[data-team-theme="indigo"] { --team-primary: #1919c8; --team-primary-dark: #0f0f78; --team-accent: #a6a6f3; --team-foreground: #fff; --team-text-shadow: 0 1px 2px rgb(15 23 42 / .55); }
:root[data-team-theme="violet"] { --team-primary: #7019c8; --team-primary-dark: #430f78; --team-accent: #cba6f3; --team-foreground: #fff; --team-text-shadow: 0 1px 2px rgb(15 23 42 / .55); }
:root[data-team-theme="fuchsia"] { --team-primary: #c819c8; --team-primary-dark: #780f78; --team-accent: #f3a6f3; --team-foreground: #fff; --team-text-shadow: 0 1px 2px rgb(15 23 42 / .55); }
:root[data-team-theme="rose"] { --team-primary: #e31c80; --team-primary-dark: #88114d; --team-accent: #f5a6d0; --team-foreground: #000; --team-text-shadow: none; }
:root[data-team-theme="brown"] { --team-primary: #8b5e3c; --team-primary-dark: #50331f; --team-accent: #dec2ad; --team-foreground: #fff; --team-text-shadow: 0 1px 2px rgb(15 23 42 / .55); }
:root[data-team-theme="blush"] { --team-primary: #f5a3c7; --team-primary-dark: #a83f70; --team-accent: #fde0ed; --team-foreground: #000; --team-text-shadow: none; }

.dashboard-action-primary,
.match-setup-start { background-color: var(--team-primary) !important; }
.dashboard-action-primary,
.match-setup-start {
    color: var(--team-foreground) !important;
    -webkit-text-fill-color: var(--team-foreground);
    text-shadow: var(--team-text-shadow);
}
.dashboard-header,
.solo-topbar { border-color: var(--team-primary) !important; }
.dashboard-section-label,
.subscreen-eyebrow { color: var(--team-accent); }

.solo-team-a,
.solo-team-b {
    text-shadow: none;
}
.solo-team-a { background-color: var(--team-primary) !important; color: var(--team-foreground) !important; -webkit-text-fill-color: var(--team-foreground); text-shadow: var(--team-text-shadow); }
.solo-team-b { background-color: var(--opponent-primary) !important; color: var(--opponent-foreground) !important; -webkit-text-fill-color: var(--opponent-foreground); text-shadow: var(--opponent-text-shadow); }

        /* SVG Map touch styling */
        .heat-map-svg {
            touch-action: none; 
            user-select: none;
            -webkit-user-drag: none;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }

        .heatmap-shot-surface {
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
            cursor: crosshair;
        }

/* Subtle build identifier for deployment verification. */
.app-version-badge {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 4px);
    right: 8px;
    z-index: 1002;
    max-width: calc(100vw - 16px);
    color: rgb(148 163 184);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.025em;
    opacity: 0.62;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.site-banner-ad {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    width: 100%;
    height: var(--site-banner-height);
    min-height: var(--site-banner-height);
    box-sizing: border-box;
    border-bottom: 1px solid rgb(51 65 85);
    background: linear-gradient(180deg, rgb(15 23 42), rgb(8 14 27));
    padding:
        calc(env(safe-area-inset-top, 0px) + 8px)
        max(8px, env(safe-area-inset-right, 0px))
        8px
        max(8px, env(safe-area-inset-left, 0px));
    display: grid;
    justify-items: center;
    gap: 4px;
    align-content: center;
}

:root[data-team-ads="hidden"] .site-banner-ad {
    display: none;
}

.site-banner-ad-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(148 163 184);
}

.site-banner-ad-slot {
    width: min(100%, 1080px);
    min-height: 50px;
    border: 1px dashed rgb(56 189 248);
    border-radius: 10px;
    background: rgb(15 23 42 / 0.8);
    color: rgb(94 234 212);
    display: grid;
    place-items: center;
    padding: 8px 12px;
    text-align: center;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.3;
}

#toast-notification {
    top: calc(var(--site-banner-height) + 16px);
    z-index: 1002;
}

@media (min-width: 768px) {
    :root { --site-banner-content-height: 128px; }
    .site-banner-ad-slot { min-height: 90px; }
}

.league-opponent-colour {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid rgb(255 255 255 / 0.7);
    border-radius: 999px;
    background: #059669;
}
.league-opponent-colour[data-team-theme="red"] { background: #c81919; }
.league-opponent-colour[data-team-theme="orange"] { background: #ff9f1c; }
.league-opponent-colour[data-team-theme="amber"] { background: #e3e31c; }
.league-opponent-colour[data-team-theme="lime"] { background: #80e31c; }
.league-opponent-colour[data-team-theme="emerald"] { background: #1ce31c; }
.league-opponent-colour[data-team-theme="teal"] { background: #1ce380; }
.league-opponent-colour[data-team-theme="sky"] { background: #1ce3e3; }
.league-opponent-colour[data-team-theme="blue"] { background: #1970c8; }
.league-opponent-colour[data-team-theme="indigo"] { background: #1919c8; }
.league-opponent-colour[data-team-theme="violet"] { background: #7019c8; }
.league-opponent-colour[data-team-theme="fuchsia"] { background: #c819c8; }
.league-opponent-colour[data-team-theme="rose"] { background: #e31c80; }
.league-opponent-colour[data-team-theme="brown"] { background: #8b5e3c; }
.league-opponent-colour[data-team-theme="blush"] { background: #f5a3c7; }

/* Keep completed-report controls below notches and standalone status bars. */
#print-report {
    padding-top: calc(1.5rem + env(safe-area-inset-top));
    padding-right: calc(1.5rem + env(safe-area-inset-right));
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    padding-left: calc(1.5rem + env(safe-area-inset-left));
}

.report-score-team {
    margin: 0 8px;
    border-radius: 10px;
    padding: 8px 10px;
    line-height: 1;
}

.report-final-score {
    min-width: 0;
    font-size: clamp(1.5rem, 7vw, 2rem);
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.report-score-team-a {
    background: #744577;
    color: #fff;
}

.report-score-team-b {
    background: #84c5b1;
    color: #102a24;
}

.report-gains-turnovers {
    width: 100%;
    grid-column: 1 / -1;
}

.sync-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid rgb(51 65 85);
    border-radius: 12px;
    padding: 10px;
    color: rgb(203 213 225);
    font-size: 11px;
}

.sync-count strong {
    color: rgb(34 211 238);
    font-size: 20px;
}

.account-overlay {
    position: fixed;
    inset: var(--site-banner-height) 0 0;
    z-index: 170;
    overflow-y: auto;
    padding: 14px 14px max(20px, env(safe-area-inset-bottom));
    background: rgb(15 32 59 / .58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.account-page {
    width: min(100%, 520px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #d6dfec;
    border-radius: 24px;
    background: #f5f8fc;
    box-shadow: 0 24px 70px rgb(15 32 59 / .28);
    color: #10203b;
}

.account-page-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #dce4ef;
    padding: 18px 18px 16px;
    background: linear-gradient(145deg, #ffffff, #eef4fb);
}

.account-page-header span,
.account-section-heading span,
.account-dialog header span {
    display: block;
    color: #62728a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.account-page-header h2,
.account-section-heading h3,
.account-dialog header h2 {
    margin: 2px 0 0;
    color: #10203b;
    font-weight: 950;
    letter-spacing: -.025em;
}

.account-page-header h2 { font-size: 25px; }
.account-page-header button,
.account-dialog header button {
    min-height: 42px;
    border: 1px solid #c9d4e3;
    border-radius: 12px;
    padding: 0 15px;
    background: #fff;
    color: #263954;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 3px 10px rgb(15 32 59 / .08);
}

.account-page-content {
    display: grid;
    gap: 14px;
    padding: 14px;
}

/* Account layout classes intentionally define their own display modes. Keep
   the shared state class authoritative after those display declarations. */
.account-page .hidden { display: none; }

.account-card {
    display: grid;
    gap: 12px;
    border: 1px solid #d9e2ee;
    border-radius: 18px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgb(35 61 94 / .06);
}

.account-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.account-section-heading h3 { font-size: 19px; }
.account-section-heading > p {
    max-width: 210px;
    margin: 2px 0 0;
    color: #66758b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
    text-align: right;
}

.account-login-form,
.account-signed-in,
.account-dialog-fields {
    display: grid;
    gap: 11px;
}

.account-field {
    display: grid;
    gap: 6px;
    color: #4f6077;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.account-field input,
.account-field select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 1px solid #cbd6e5;
    border-radius: 12px;
    padding: 0 13px;
    background: #f9fbfe;
    color: #10203b;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    outline: none;
}

.account-field input:focus,
.account-field select:focus {
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgb(47 111 237 / .14);
}

.account-field small {
    color: #718097;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: normal;
    text-transform: none;
}

.account-primary-button,
.account-outline-button,
.account-code-button {
    display: grid;
    width: 100%;
    min-height: 48px;
    place-items: center;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 950;
    text-align: center;
}

.account-primary-button {
    border: 1px solid #2461d5;
    background: linear-gradient(180deg, #3f7cf0, #2866dd);
    color: #fff;
    box-shadow: 0 7px 15px rgb(40 102 221 / .2);
}

.account-outline-button {
    border: 1px solid #c6d3e4;
    background: #eef3f9;
    color: #263954;
}

.account-code-button {
    border: 1px solid #9cbcf3;
    background: #edf4ff;
    color: #2456aa;
}

.account-text-button {
    width: 100%;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: #2866c9;
    font-size: 13px;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-verification {
    display: grid;
    gap: 9px;
    border: 1px solid #e8bd55;
    border-radius: 12px;
    padding: 12px;
    background: #fff8e6;
    color: #6e5115;
    font-size: 12px;
    line-height: 1.45;
}

.account-verification button {
    min-height: 42px;
    border: 1px solid #d9a52c;
    border-radius: 10px;
    background: #fff;
    color: #6e5115;
    font-size: 12px;
    font-weight: 900;
}

.account-section-copy,
.account-fine-print,
.account-backup-summary { margin: 0; color: #52647c; line-height: 1.5; }
.account-section-copy { font-size: 13px; }
.account-backup-summary { font-size: 12px; font-weight: 850; }
.account-fine-print { font-size: 10px; }
.account-sales-locked { margin: 0; border: 1px solid #b8cbe7; border-radius: 11px; padding: 10px 12px; background: #f2f7ff; color: #405a7d; font-size: 11px; line-height: 1.45; }
.account-plans-table { display: grid; gap: 12px; min-width: 0; }
.account-plan-card { min-width: 0; padding: 16px; border: 1px solid #d7e1ed; border-radius: 14px; background: #fff; }
.account-plan-card header { justify-content: space-between; }
.account-plan-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin: 14px 0; }
.account-plan-details dt { color: #52647c; font-size: 11px; font-weight: 800; margin-bottom: 5px; }
.account-plan-details dd { margin: 0; }
.account-plan-owner-note { color: #64748b; font-size: 11px; }
.account-plan-team { display: flex; min-width: 0; align-items: center; gap: 7px; }
.account-plan-team > span { min-width: 0; }
.account-plan-team strong, .account-plan-team small { display: block; overflow-wrap: anywhere; }
.account-plan-team strong { color: #172a48; font-size: 13px; }
.account-plan-team small { margin-top: 2px; color: #718097; font-size: 9px; }
.account-plan-badge { display: inline-grid; min-width: 26px; height: 24px; flex: 0 0 auto; place-items: center; border-radius: 999px; padding: 0 7px; background: #e9eef5; color: #52647c; font-size: 10px; font-weight: 950; text-transform: uppercase; }
.account-plan-badge.is-plus { background: #eaf3ff; color: #1d5fc7; font-size: 17px; }
.account-plan-badge.is-pro { background: #e8f8ef; color: #08774f; }
.account-plan-status strong, .account-plan-status small { display: block; }
.account-plan-status strong { color: #243a5a; font-size: 11px; }
.account-plan-status small { margin-top: 2px; color: #718097; font-size: 9px; line-height: 1.3; }
.account-plan-actions { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid #e2e8f0; padding-top: 12px; }
.account-plan-actions button { flex: 1 1 120px; min-height: 44px; border: 1px solid #9db8df; border-radius: 8px; padding: 8px 12px; background: #edf4ff; color: #2456aa; font-size: 13px; font-weight: 900; }
.account-plan-actions button[data-action="account-renew-team"] { border-color: #86cfaa; background: #eaf8f0; color: #08734d; }
.account-backup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.account-backup-primary { grid-column: 1 / -1; }
.account-file-button { cursor: pointer; }

.account-backup-restore-overlay { z-index: 245; }
.backup-restore-fields { gap: 14px; }
.backup-restore-option {
    display: grid;
    gap: 10px;
    border: 1px solid #d7e1ed;
    border-radius: 15px;
    padding: 13px;
    background: #f8fafc;
}
.backup-restore-option strong { color: #172a48; font-size: 14px; }
.backup-restore-option p { margin: 4px 0 0; color: #60728c; font-size: 12px; line-height: 1.45; }
.backup-restore-danger { border-color: #efc7ce; background: #fffafb; }
.backup-restore-danger strong { color: #a5233b; }
.account-danger-button {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d95e73;
    border-radius: 12px;
    padding: 0 14px;
    background: #fff0f2;
    color: #a5233b;
    font-size: 14px;
    font-weight: 950;
}
.account-danger-button:disabled { cursor: not-allowed; opacity: .5; }

.account-page .sync-auto-status {
    border-color: #cfe0f5;
    background: #f1f7ff;
}
.account-page .sync-auto-status strong { color: #245dbd; }
.account-page .sync-auto-status span { color: #60728c; }
.account-page .sync-message,
.account-dialog .sync-message { margin: 0; }
.account-page .sync-message-neutral,
.account-dialog .sync-message-neutral { color: #64748b; background: #f1f5f9; }
.account-page .sync-message-success,
.account-dialog .sync-message-success { color: #076545; background: #e9f8f1; }
.account-page .sync-message-error,
.account-dialog .sync-message-error { color: #a5233b; background: #fff0f2; }
.account-page .sync-empty { color: #718097; }
.account-page .sync-item {
    border-color: #d7e1ed;
    background: #f8fafc;
    color: #31435d;
}
.account-page .sync-item strong { color: #245dbd; }
.account-page .sync-item p { color: #64748b; }
.account-page .sync-item button,
.account-page .sync-item-actions button {
    border-color: #bdcce0;
    background: #fff;
    color: #263954;
}
.account-danger-card { border-color: #efc7ce; background: #fffafb; }
.account-danger-card .account-section-heading span,
.account-danger-card .account-section-heading h3 { color: #a5233b; }
.account-danger-card .sync-purge-item button {
    border-color: #d95e73;
    background: #fff0f2;
    color: #a5233b;
}

.account-dialog-overlay {
    position: fixed;
    inset: var(--site-banner-height) 0 0;
    z-index: 230;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 14px 14px max(16px, env(safe-area-inset-bottom));
    background: rgb(15 32 59 / .7);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}
.account-dialog-overlay.hidden { display: none; }

#retention-warning-modal { z-index: 280; }
#retention-warning-modal .account-dialog { max-height: calc(100dvh - var(--site-banner-height) - 32px); overflow-y: auto; }
#retention-warning-details { line-height: 1.5; overflow-wrap: anywhere; }

#account-payments-modal, #team-transfer-modal { z-index: 270; }
#account-payments-modal .account-dialog, #team-transfer-modal .account-dialog { width: min(100%, 650px); max-height: calc(100dvh - var(--site-banner-height) - 32px); display: flex; flex-direction: column; }
#account-payments-modal .account-dialog > header, #team-transfer-modal .account-dialog > header { flex-shrink: 0; }
#account-payments-modal .account-dialog-fields, #team-transfer-modal .account-dialog-fields { overflow-y: auto; min-height: 0; }
#team-transfer-modal .account-dialog h2 { font-size: clamp(18px, 4.5vw, 23px); }
#account-payments-list { display: grid; gap: 12px; }
#account-payments-list h3 { font-size: 18px; margin: 12px 0 0; }
.account-payment-card { display: grid; gap: 7px; padding: 15px; border: 1px solid #d4ddeb; border-radius: 14px; background: white; }
.account-payment-card span { font-size: 13px; color: #40506a; }
.account-payment-card small { font-size: 11px; color: #58677b; overflow-wrap: anywhere; }
#account-payments-message a { text-decoration: none; display: flex; justify-content: center; }

.account-dialog {
    width: min(100%, 410px);
    overflow: hidden;
    border: 1px solid #d6dfec;
    border-radius: 22px;
    background: #fff;
    /* These dialogs sit outside the light account page. Do not inherit the
       application's pale text colour onto their white background. */
    color: #172a48;
    box-shadow: 0 24px 70px rgb(15 32 59 / .35);
}

.account-reconciliation-overlay { z-index: 250; }
.account-reconciliation-dialog { width: min(100%, 760px); }
.account-reconciliation-fields { gap: 15px; }
.account-reconciliation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.account-reconciliation-choice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    border: 1px solid #d7e1ed;
    border-radius: 17px;
    padding: 14px;
    background: #f8fafc;
}
.account-reconciliation-choice > span {
    color: #64748b;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.account-reconciliation-choice h3 {
    color: #172a48;
    font-size: 20px;
    overflow-wrap: anywhere;
}
.account-reconciliation-choice dl { display: grid; gap: 5px; margin: 0; }
.account-reconciliation-choice dl > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    padding-top: 6px;
}
.account-reconciliation-choice dt { color: #64748b; font-size: 11px; }
.account-reconciliation-choice dd { margin: 0; color: #172a48; font-size: 12px; font-weight: 900; text-align: right; }
.account-reconciliation-choice > p {
    flex: 1;
    margin: 0;
    color: #52647c;
    font-size: 12px;
    line-height: 1.45;
}

.account-dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #dce4ef;
    padding: 16px;
    background: #f5f8fc;
}
.account-dialog header h2 { font-size: 21px; }
.account-dialog-fields { padding: 16px; }

@media (max-width: 430px) {
    .account-section-heading { flex-direction: column; gap: 5px; }
    .account-section-heading > p { max-width: none; text-align: left; }
    .account-backup-actions { grid-template-columns: 1fr; }
    .account-reconciliation-grid { grid-template-columns: minmax(0, 1fr); }
    }


.sync-auto-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgb(51 65 85);
    border-radius: 12px;
    padding: 12px;
    background: rgb(15 23 42);
}

.sync-auto-status strong {
    color: rgb(34 211 238);
    font-size: 16px;
}

.sync-auto-status span {
    color: rgb(148 163 184);
    font-size: 12px;
}

.account-workspace-section {
    border: 1px solid rgb(51 65 85);
    border-radius: 12px;
    padding: 12px;
    background: rgb(15 23 42 / .72);
}
.account-workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-workspace-heading span { color: rgb(103 232 249); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.account-workspace-heading h3 { margin-top: 2px; color: white; font-size: 16px; font-weight: 950; }
.account-workspace-heading button { border: 1px solid rgb(71 85 105); border-radius: 8px; padding: 7px 10px; background: rgb(30 41 59); color: white; font-size: 11px; font-weight: 850; }
.account-workspace-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 12px; border-radius: 10px; padding: 11px; background: rgb(30 41 59); }
.account-workspace-summary strong { color: white; font-size: 15px; }
.account-workspace-summary span { display: block; margin-top: 3px; color: rgb(148 163 184); font-size: 11px; }
.account-workspace-role { align-self: start; border-radius: 999px; padding: 5px 8px; background: rgb(8 145 178 / .25); color: rgb(103 232 249); font-size: 10px; font-weight: 950; text-transform: uppercase; }
.account-member-list { display: grid; gap: 9px; margin-top: 12px; }
.account-member-list > h4 { color: rgb(148 163 184); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.account-member { border: 1px solid rgb(51 65 85); border-radius: 10px; padding: 10px; background: rgb(15 23 42); }
.account-member-head { display: flex; justify-content: space-between; gap: 8px; color: rgb(203 213 225); font-size: 12px; overflow-wrap: anywhere; }
.account-member-head strong { color: rgb(103 232 249); }
.account-member-head button { flex: 0 0 auto; border: 1px solid rgb(8 145 178); border-radius: 7px; padding: 7px 12px; background: rgb(8 145 178 / .25); color: white; font-size: 11px; font-weight: 900; }
.account-member-meta { display: flex; gap: 7px; margin-top: 6px; color: rgb(148 163 184); font-size: 10px; }
.account-member-meta span { border-radius: 999px; padding: 3px 7px; background: rgb(30 41 59); }
.account-member-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.account-member-controls label, .account-team-access > span { color: rgb(148 163 184); font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.account-member-controls select { width: 100%; min-height: 38px; margin-top: 4px; border: 1px solid rgb(71 85 105); border-radius: 8px; padding: 0 8px; background: rgb(30 41 59); color: white; font-size: 12px; font-weight: 800; }
.account-team-access { margin-top: 9px; }
.account-team-options { display: grid; gap: 6px; margin-top: 6px; }
.account-team-options label { display: flex; align-items: center; gap: 7px; border-radius: 7px; padding: 7px 8px; background: rgb(30 41 59); color: rgb(203 213 225); font-size: 11px; font-weight: 750; }
.account-workspace-error { margin-top: 10px; color: rgb(253 164 175); font-size: 12px; }
.account-invitations { margin-top: 14px; border-top: 1px solid rgb(51 65 85); padding-top: 12px; }
.account-invitations > h4 { color: rgb(148 163 184); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.account-invite-form { display: grid; grid-template-columns: minmax(0, 1fr) 94px; gap: 7px; margin-top: 8px; }
.account-invite-form input, .account-invite-form select { min-width: 0; min-height: 42px; border: 1px solid rgb(71 85 105); border-radius: 8px; padding: 0 9px; background: rgb(30 41 59); color: white; font-size: 12px; }
.account-invite-form button { grid-column: 1 / -1; min-height: 42px; border: 0; border-radius: 8px; background: rgb(8 145 178); color: white; font-size: 12px; font-weight: 900; }
.account-invite-link, .account-invite-accept { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; border: 1px solid rgb(8 145 178); border-radius: 9px; padding: 9px; background: rgb(8 145 178 / .12); color: rgb(203 213 225); font-size: 11px; }
.account-invite-link button, .account-invite-accept button, .account-invite-list button { border: 1px solid rgb(8 145 178); border-radius: 7px; padding: 6px 8px; background: rgb(8 145 178 / .25); color: white; font-size: 10px; font-weight: 850; }
.account-invite-accept { flex-direction: column; align-items: stretch; margin: 0 0 12px; }
.account-invite-accept strong { color: rgb(103 232 249); font-size: 14px; }
.account-invite-list { display: grid; gap: 6px; margin-top: 9px; }
.account-invite-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 8px; padding: 8px; background: rgb(30 41 59); }
.account-invite-list strong, .account-invite-list small { display: block; overflow-wrap: anywhere; }
.account-invite-list strong { color: rgb(203 213 225); font-size: 11px; }
.account-invite-list small { margin-top: 2px; color: rgb(148 163 184); font-size: 9px; }
.account-access-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-access-actions button { min-height: 44px; border: 1px solid rgb(8 145 178); border-radius: 9px; background: rgb(8 145 178 / .2); color: white; font-size: 12px; font-weight: 900; }
.sync-message {
    min-height: 20px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
}

.sync-message-neutral { color: rgb(148 163 184); background: rgb(15 23 42); }
.sync-message-success { color: rgb(110 231 183); background: rgb(6 78 59 / 0.28); }
.sync-message-error { color: rgb(253 164 175); background: rgb(136 19 55 / 0.28); }
.sync-empty { color: rgb(100 116 139); font-size: 12px; font-style: italic; }

.sync-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    border: 1px solid rgb(51 65 85);
    border-radius: 12px;
    padding: 10px;
    background: rgb(15 23 42);
    color: rgb(203 213 225);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.sync-item strong { color: rgb(103 232 249); text-transform: capitalize; }
.sync-item p { color: rgb(148 163 184); }
.sync-item button, .sync-item-actions button {
    border: 1px solid rgb(71 85 105);
    border-radius: 8px;
    padding: 7px 9px;
    background: rgb(30 41 59);
    color: white;
    font-weight: 700;
}
.sync-item-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sync-warning { border-color: rgb(180 83 9); }
.sync-deleted-item { border-color: rgb(8 145 178); }
.sync-permanent-section {
    border-top: 1px solid rgb(71 85 105);
    padding-top: 12px;
}
.sync-permanent-warning {
    color: rgb(253 164 175);
    font-size: 11px;
    line-height: 1.45;
}
.sync-purge-item { border-color: rgb(190 24 93); }
.sync-purge-item button {
    border-color: rgb(190 24 93);
    background: rgb(136 19 55 / .35);
    color: rgb(254 205 211);
}
.sync-technical-id { color: rgb(100 116 139); font-size: 10px; }
.sync-technical-id summary { cursor: pointer; font-weight: 700; }
.sync-technical-id code { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.sync-item[data-sync-status="reconciled"] { border-color: rgb(5 150 105); }
.sync-item[data-sync-status="pending"],
.sync-item[data-sync-status="uploaded"] { border-color: rgb(8 145 178); }
.sync-item[data-sync-status="conflict"],
.sync-item[data-sync-status="rejected"],
.sync-item[data-sync-status="mismatch"],
.sync-item[data-sync-status="missing"],
.sync-item[data-sync-status="server_copy"],
.sync-item[data-sync-status="blocked"] { border-color: rgb(190 24 93); }
.sync-item[data-sync-status="local_only"] { border-color: rgb(59 130 246); background: rgb(30 64 175 / .12); }
.sync-status-label { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.sync-status-reconciled { color: rgb(110 231 183); }
.sync-status-pending, .sync-status-uploaded { color: rgb(103 232 249); }
.sync-status-conflict, .sync-status-rejected, .sync-status-mismatch,
.sync-status-missing, .sync-status-server_copy,
.sync-status-blocked { color: rgb(253 164 175); }
.sync-status-local_only { color: rgb(147 197 253); }

.touch-pan-y {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.cloud-handoff-overlay {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
    background: rgb(2 6 23 / .88);
    backdrop-filter: blur(8px);
}
.cloud-handoff-overlay.hidden { display: none; }
.cloud-handoff-panel {
    width: min(100%, 380px);
    padding: 28px 22px;
    border: 1px solid rgb(71 85 105);
    border-radius: 20px;
    background: rgb(15 23 42);
    color: white;
    text-align: center;
    box-shadow: 0 24px 70px rgb(0 0 0 / .45);
}
.cloud-handoff-panel h3 { margin: 14px 0 8px; font-size: 20px; font-weight: 900; }
.cloud-handoff-panel p { color: rgb(203 213 225); line-height: 1.5; }
.cloud-handoff-spinner {
    width: 38px;
    height: 38px;
    margin: 0 auto;
    border: 4px solid rgb(71 85 105);
    border-top-color: rgb(34 211 238);
    border-radius: 999px;
    animation: cloud-handoff-spin .8s linear infinite;
}
.cloud-handoff-actions { display: grid; gap: 10px; margin-top: 18px; }
.cloud-handoff-actions.hidden { display: none; }
.cloud-handoff-actions button {
    min-height: 44px;
    border-radius: 12px;
    background: rgb(8 145 178);
    color: white;
    font-weight: 900;
}
.cloud-handoff-actions .cloud-handoff-leave-later { background: rgb(180 83 9); }
.cloud-handoff-actions button:last-child { background: rgb(51 65 85); }
@keyframes cloud-handoff-spin { to { transform: rotate(360deg); } }

.live-tracker-notice {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgb(245 158 11);
    border-radius: 12px;
    background: rgb(120 53 15 / .16);
    color: rgb(120 53 15);
}
.live-tracker-notice.hidden { display: none; }
.live-tracker-notice p { margin: 0; font-size: 13px; font-weight: 750; line-height: 1.45; }
.live-tracker-notice button {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    border-radius: 10px;
    background: rgb(180 83 9);
    color: white;
    font-weight: 900;
}
.live-tracker-notice button.hidden { display: none; }

/* Milestone 11 match-day dashboard. The logger variables provide one visual
   language without coupling dashboard layout to the logger's fixed grid. */
#main-dashboard:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% -10%, rgba(79, 131, 238, .14), transparent 36%),
        var(--solo-bg, #f4f7fb);
    color: var(--solo-ink, #10203b);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding:
        calc(18px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(24px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
}

.dashboard-content {
    width: min(100%, 760px);
    margin: 0 auto;
}

.dashboard-wide-nav,
.dashboard-command-heading,
.dashboard-season-overview,
.dashboard-heading-large,
.dashboard-pro { display: none; }
.dashboard-workspace,
.dashboard-command-rail,
.dashboard-feed { display: contents; }

.app-phone-landscape-guard { display: none; }

.dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

.dashboard-brand-mark {
    width: 184px;
    height: 49px;
    display: grid;
    place-items: center;
    justify-self: start;
}
.dashboard-brand-mark img,
.dashboard-pro-brand-mark img,
.workspace-pro-brand-mark img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.dashboard-brand-mark img { border-radius: 0; object-fit: contain; }

.dashboard-account {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--solo-border, #d6deea);
    border-radius: 11px;
    padding: 0 9px;
    background: white;
    color: #30415f;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 2px 7px rgba(25, 48, 83, .07);
}
.dashboard-account.hidden { display: none; }
.dashboard-account-icon { width: 17px; height: 17px; flex: 0 0 17px; }
.dashboard-account-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-account:active { transform: scale(.98); }

.dashboard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-action {
    min-width: 0;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--solo-border, #d6deea);
    border-radius: 15px;
    padding: 10px 12px;
    text-align: left;
    box-shadow: 0 3px 10px rgba(25, 48, 83, .09);
}
.dashboard-action-match { grid-column: 1 / -1; min-height: 70px; }
.dashboard-team-selector {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	min-height: 56px;
	border: 1px solid #c4a7c7;
	border-radius: 14px;
	padding: 8px 10px 8px 14px;
	background: #f8f1f9;
	color: #512e54;
	font-size: 11px;
	font-weight: 950;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.dashboard-team-selector select {
	min-width: 0;
	width: 100%;
	min-height: 40px;
	border: 1px solid #c4a7c7;
	border-radius: 10px;
	padding: 0 34px 0 11px;
	background: white;
	color: #321c34;
	font-size: 15px;
	font-weight: 900;
	text-transform: none;
	letter-spacing: normal;
}
.dashboard-action-team { grid-column: 1 / -1; }
.dashboard-action-team {
	height: 40px;
	min-height: 40px;
	gap: 7px;
	border-radius: 10px;
	padding: 3px 8px;
}
.dashboard-action-team .dashboard-action-icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	font-size: 18px;
}
.dashboard-action-team .dashboard-action-icon svg { width: 24px; height: 24px; }
.dashboard-action-team strong { font-size: clamp(12px, 3.4vw, 15px); line-height: 1; }

.dashboard-action:active,
.active-match-action:active,
.dashboard-match-open:active,
.dashboard-match-delete:active { transform: scale(.98); }

.dashboard-action > span:last-child { min-width: 0; }
.dashboard-action strong,
.dashboard-action small { display: block; }
.dashboard-action strong { font-size: clamp(14px, 3.8vw, 17px); font-weight: 950; }
.dashboard-action small { margin-top: 4px; font-size: 10px; font-weight: 700; opacity: .78; }

.dashboard-action-icon {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 900;
}
.dashboard-action-icon svg { display: block; width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-action-icon svg .dashboard-icon-fill { fill: currentColor; stroke: none; }

.dashboard-action-primary {
    border-color: #1d4ed8;
    background: linear-gradient(180deg, #4f83ee, #2563eb);
    color: white;
}
.dashboard-action-primary .dashboard-action-icon { background: rgba(255, 255, 255, .17); }
.dashboard-action-neutral { background: white; color: #14213a; }
.dashboard-action-neutral .dashboard-action-icon { background: #edf3ff; color: #1d4ed8; }

.dashboard-active {
    margin-bottom: 20px;
    border: 1px solid #99b5ee;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #fff 15%, #edf3ff 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, .11);
}

.dashboard-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #607089;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.dashboard-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}
.unfinished-match-count { margin-left: auto; border-radius: 999px; padding: 2px 7px; background: #dbeafe; color: #1d4ed8; }
.unfinished-match-list { display: grid; gap: 10px; }
.unfinished-match-list .dashboard-active-main + .dashboard-active-main { border-top: 1px solid #d7e2f4; }

.dashboard-match-owner {
	display: inline-flex;
	justify-self: start;
	align-items: center;
	min-height: 23px;
	border-radius: 999px;
	padding: 3px 9px;
	background: #744577;
	color: white;
	font-size: 9px;
	font-weight: 950;
	letter-spacing: .05em;
	text-transform: uppercase;
}
.dashboard-match-owner.is-paired { background: linear-gradient(90deg, #744577 0 50%, #3f8976 50% 100%); }
.dashboard-match-open .dashboard-match-owner { margin-bottom: 4px; }

.dashboard-perspective-overlay {
	position: fixed;
	inset: 0;
	z-index: 185;
	overflow-y: auto;
	padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
	background: rgba(7, 16, 32, .94);
}
.dashboard-perspective-overlay:not(.hidden) { display: flex; align-items: center; justify-content: center; }
.dashboard-perspective-panel {
	width: min(100%, 430px);
	border: 1px solid #cbd6e6;
	border-radius: 20px;
	padding: 18px;
	background: #f6f8fc;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}
.dashboard-perspective-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dashboard-perspective-panel > header span { color: #744577; font-size: 9px; font-weight: 950; letter-spacing: .11em; text-transform: uppercase; }
.dashboard-perspective-panel > header h2 { margin-top: 3px; color: #10203b; font-size: 21px; font-weight: 950; }
.dashboard-perspective-panel > header button { min-height: 40px; border-radius: 10px; padding: 0 13px; background: #e3eaf4; color: #30415f; font-size: 12px; font-weight: 900; }
.dashboard-perspective-panel > p { margin: 13px 0; color: #607089; font-size: 12px; line-height: 1.45; }
.dashboard-perspective-list { display: grid; gap: 10px; }
.dashboard-perspective-choice { display: flex; width: 100%; min-height: 76px; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #a9b8cf; border-radius: 14px; padding: 12px 14px; background: white; color: #10203b; text-align: left; }
.dashboard-perspective-choice span { display: grid; gap: 3px; }
.dashboard-perspective-choice strong { font-size: 16px; font-weight: 950; }
.dashboard-perspective-choice small { color: #607089; font-size: 11px; font-weight: 800; }
.dashboard-perspective-choice > button { flex: 0 0 auto; min-height: 44px; border: 1px solid #1d4ed8; border-radius: 11px; padding: 0 14px; background: linear-gradient(180deg, #4f83ee, #2563eb); color: white; font-size: 14px; font-weight: 950; box-shadow: 0 3px 8px rgba(37, 99, 235, .2); }
.dashboard-perspective-choice > button b { margin-left: 3px; font-size: 17px; line-height: 0; }

.dashboard-active-main {
    display: grid;
    gap: 8px;
    padding-top: 10px;
}

.resume-match-scoreline { display: flex; width: 100%; align-items: center; gap: 7px; overflow-wrap: anywhere; color: #10203b; font-size: clamp(17px, 4.7vw, 22px); font-weight: 950; line-height: 1.15; }
.match-cloud-status { display: inline-flex; width: auto; height: .95em; flex: 0 0 auto; align-items: center; justify-content: center; gap: .12em; color: #dc2626; line-height: 1; filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .15)); vertical-align: -.04em; white-space: nowrap; }
.match-cloud-status[hidden] { display: none; }
.match-cloud-status svg { display: block; width: 1.15em; height: 100%; overflow: visible; fill: currentColor; }
.match-cloud-plan-mark { color: inherit; font-size: .58em; font-weight: 1000; letter-spacing: -.03em; line-height: 1; }
.match-cloud-status.is-synced { color: #16a34a; }
.match-cloud-status.is-pending { color: #dc2626; }
.resume-match-lower { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; }
.resume-match-details { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; justify-content: center; gap: 5px; color: #607089; font-size: 11px; font-weight: 800; }
.resume-match-details time { overflow-wrap: anywhere; color: #1d4ed8; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.resume-match-clock-group { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; white-space: nowrap; }
.resume-match-separator { color: #94a3b8; }
.resume-match-clock { color: #10203b; font-variant-numeric: tabular-nums; font-weight: 950; }
.resume-match-clock-state { border-radius: 999px; padding: 3px 7px; color: white; font-size: 9px; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
.resume-match-clock-state.is-running { background: #15803d; }
.resume-match-clock-state.is-paused { background: #dc2626; }
.resume-match-clock-state.is-scheduled { background: #2563eb; }

.active-match-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.viewer-match-actions { display: none; }
.viewer-match-actions button { width: 100%; min-height: 46px; border-radius: 12px; background: #2563eb; color: #fff; font-weight: 900; }
.active-match-action {
    min-height: 44px;
    border: 1px solid;
    border-radius: 11px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 900;
}
.active-match-delete { border-color: #f3a0a0; background: #fff; color: #a61b1b; }
.active-match-edit { width: 100%; border-color: #93a9c8; background: #f1f5f9; color: #334155; }
.active-match-resume { border-color: #1d4ed8; background: linear-gradient(180deg, #4f83ee, #2563eb); color: white; }

.dashboard-history { padding-top: 2px; }
.dashboard-history-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 0 2px; }
.dashboard-history-heading h2 { margin-top: 3px; color: #10203b; font-size: 20px; font-weight: 950; letter-spacing: -.015em; }
.dashboard-history-tools { display: flex; align-items: center; gap: 8px; }
.dashboard-history-tools button {
    min-height: 32px;
    border: 1px solid #2563eb;
    border-radius: 9px;
    padding: 0 10px;
    background: #edf3ff;
    color: #164bb9;
    font-size: 12px;
    font-weight: 900;
}
.dashboard-count { flex: 0 0 auto; color: #607089; font-size: 13px; font-weight: 800; }
.dashboard-history-list { display: grid; gap: 14px; }
.dashboard-history-group { display: grid; gap: 10px; }
.dashboard-history-group > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 2px solid rgba(116, 69, 119, .25);
    padding: 0 2px 7px;
}
.dashboard-history-group > header span { color: #744577; font-size: 8px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-history-group > header h3 { margin-top: 2px; color: #10203b; font-size: 16px; font-weight: 950; }
.dashboard-history-group > header small { color: #607089; font-size: 12px; font-weight: 800; }
.dashboard-history-unassigned > header { border-bottom-color: #e5a64a; }
.dashboard-history-unassigned > header span { color: #a86000; }
.dashboard-opponent-group { display: grid; gap: 7px; }
.dashboard-opponent-group h4 { padding: 0 2px; }
.dashboard-opponent-group h4 button { color: #30415f; font-size: 11px; font-weight: 900; text-align: left; text-transform: uppercase; }
.dashboard-opponent-group h4 span { margin-left: 5px; color: #718096; font-size: 9px; }
.dashboard-opponent-group h4 b { margin-left: 5px; color: #2563eb; font-size: 16px; line-height: 0; }
.dashboard-history-cards { display: grid; gap: 10px; }

.dashboard-match-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--solo-border, #d6deea);
    border-radius: 15px;
    background: white;
    box-shadow: 0 2px 8px rgba(25, 48, 83, .07);
}

.dashboard-match-open {
    min-width: 0;
    display: block;
    padding: 13px 14px;
    color: #10203b;
    text-align: left;
}
.dashboard-match-date { display: block; overflow: hidden; color: #607089; font-size: 9px; font-weight: 750; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-match-result { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 8px; }
.dashboard-match-team { overflow: hidden; font-size: 12px; font-weight: 900; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.dashboard-match-team-home { display: flex; align-items: center; gap: 5px; }
.dashboard-match-team-home > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.dashboard-match-team-away { text-align: right; }
.dashboard-match-result strong { min-width: 67px; border-radius: 9px; padding: 6px 8px; background: #edf3ff; color: #164bb9; font-size: 15px; font-variant-numeric: tabular-nums; text-align: center; }
.opponent-history-match .match-cloud-status { margin-right: 5px; }
.dashboard-match-result small { color: #607089; font-size: 12px; }
.dashboard-match-view { display: block; margin-top: 8px; color: #2563eb; font-size: 10px; font-weight: 850; }
.dashboard-match-view b { font-size: 15px; line-height: 0; vertical-align: -1px; }

.dashboard-match-delete {
    width: 64px;
    border-left: 1px solid #f2c3c3;
    background: #fff7f7;
    color: #a61b1b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border: 1px dashed #b9c5d7;
    border-radius: 16px;
    background: rgba(255, 255, 255, .55);
    color: #607089;
    text-align: center;
}
.dashboard-empty span { color: #8ca3c9; font-size: 30px; }
.dashboard-empty strong { margin-top: 7px; color: #30415f; font-size: 13px; }
.dashboard-empty p { margin-top: 3px; font-size: 11px; }

@media (min-width: 700px) {
    .dashboard-history-cards { grid-template-columns: 1fr 1fr; }
    .dashboard-empty { grid-column: 1 / -1; }
}

/* Alpha 0.60 large-screen command centre. These rules begin at the tablet
   boundary used by device classification, leaving the accepted phone
   dashboard and every courtside tracker interface unchanged. */
@media (min-width: 700px) {
    #main-dashboard:not(.hidden) {
        padding: 22px max(22px, env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
        background:
            radial-gradient(circle at 5% 0%, rgba(116, 69, 119, .12), transparent 32%),
            radial-gradient(circle at 94% 5%, rgba(37, 99, 235, .13), transparent 35%),
            #eef3f9;
    }

    .dashboard-content { width: min(100%, 1340px); }
    .dashboard-header {
        grid-template-columns: auto minmax(185px, 1fr) auto auto;
        gap: 12px;
        margin-bottom: 16px;
        border: 1px solid #d7e0ec;
        border-radius: 19px;
        padding: 12px 14px;
        background: rgba(255, 255, 255, .9);
        box-shadow: 0 8px 24px rgba(30, 48, 77, .07);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .dashboard-brand-mark { width: 69px; height: 52px; flex-basis: 69px; }
    .dashboard-header h1 { font-size: 27px; }
    .dashboard-wide-nav {
        display: flex;
        align-items: center;
        gap: 5px;
        border: 1px solid #d7e0ec;
        border-radius: 13px;
        padding: 4px;
        background: #edf2f8;
    }
    .dashboard-wide-nav span,
    .dashboard-wide-nav button {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        padding: 0 13px;
        color: #52637c;
        font-size: 11px;
        font-weight: 900;
        white-space: nowrap;
    }
    .dashboard-wide-nav span[aria-current="page"] {
        background: white;
        color: #10203b;
        box-shadow: 0 2px 7px rgba(25, 48, 83, .1);
    }
    .dashboard-wide-nav button:hover { color: var(--team-primary-dark); background: rgba(255, 255, 255, .72); }
    .dashboard-account { min-height: 46px; border-radius: 13px; padding: 0 13px; font-size: 12px; }
    .dashboard-account-icon { width: 19px; height: 19px; flex-basis: 19px; }

    .dashboard-command-heading {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 16px;
        padding: 2px 4px;
    }
    .dashboard-command-heading > div:first-child > span {
        color: var(--team-primary-dark);
        font-size: 10px;
        font-weight: 950;
        letter-spacing: .12em;
        text-transform: uppercase;
    }
    .dashboard-command-heading h2 {
        margin-top: 4px;
        color: #10203b;
        font-size: clamp(25px, 3.4vw, 38px);
        font-weight: 950;
        letter-spacing: -.035em;
        line-height: 1;
    }
    .dashboard-command-context { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
    .dashboard-command-context span {
        min-height: 31px;
        display: inline-flex;
        align-items: center;
        border: 1px solid #ccd7e6;
        border-radius: 999px;
        padding: 0 11px;
        background: rgba(255, 255, 255, .82);
        color: #52637c;
        font-size: 10px;
        font-weight: 900;
    }
    .dashboard-command-context span.hidden { display: none; }

    .dashboard-workspace {
        display: grid;
        grid-template-columns: minmax(214px, .72fr) minmax(0, 1.55fr);
        align-items: start;
        gap: 18px;
    }
    .dashboard-command-rail,
    .dashboard-feed { display: grid; min-width: 0; gap: 18px; }

    .dashboard-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 0;
        border: 1px solid #d4deeb;
        border-radius: 18px;
        padding: 12px;
        background: rgba(255, 255, 255, .9);
        box-shadow: 0 7px 22px rgba(30, 48, 77, .07);
    }
    .dashboard-action,
    .dashboard-action-team,
    .dashboard-action-match,
    .dashboard-team-selector { grid-column: auto; }
    .dashboard-action-team { min-height: 58px; height: auto; padding: 9px 10px; }
    .dashboard-action-team .dashboard-action-icon { width: 35px; height: 35px; }
    .dashboard-action-team strong { font-size: 14px; }
    .dashboard-team-selector {
        grid-template-columns: 1fr;
        gap: 5px;
        min-height: 0;
        border-color: #d4deeb;
        padding: 10px;
        background: #f5f7fb;
        color: #52637c;
    }
    .dashboard-team-selector select { min-height: 44px; border-color: #bdcada; font-size: 13px; }
    .dashboard-action-match { min-height: 72px; }
    .dashboard-action-match strong { font-size: 17px; }

    .dashboard-season-overview {
        display: grid;
        gap: 14px;
        border: 1px solid #d4deeb;
        border-radius: 18px;
        padding: 15px;
        background: rgba(255, 255, 255, .92);
        box-shadow: 0 7px 22px rgba(30, 48, 77, .07);
    }
    .dashboard-season-overview > header { display: grid; gap: 10px; }
    .dashboard-season-overview > header span {
        color: var(--team-primary-dark);
        font-size: 9px;
        font-weight: 950;
        letter-spacing: .1em;
        text-transform: uppercase;
    }
    .dashboard-season-overview > header h2 { margin-top: 2px; color: #10203b; font-size: 19px; font-weight: 950; }
    .dashboard-season-overview > header button {
        min-height: 39px;
        border: 1px solid #bac8da;
        border-radius: 10px;
        background: #f7f9fc;
        color: #30415f;
        font-size: 11px;
        font-weight: 900;
    }
    .dashboard-season-overview > header button b { margin-left: 3px; color: var(--team-primary-dark); font-size: 17px; line-height: 0; }
    .dashboard-season-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .dashboard-season-summary > div {
        min-width: 0;
        min-height: 68px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border: 1px solid #dde5f0;
        border-radius: 12px;
        padding: 9px 10px;
        background: #f7f9fc;
    }
    .dashboard-season-summary strong { overflow: hidden; color: #10203b; font-size: 20px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-season-summary span { margin-top: 3px; color: #6b7b91; font-size: 8px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
    .dashboard-form-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-top: 1px solid #e0e7f0; padding-top: 2px; }
    .dashboard-form-heading strong { color: #30415f; font-size: 11px; font-weight: 950; }
    .dashboard-form-heading span { color: #7a889c; font-size: 8px; font-weight: 800; text-align: right; }
    .dashboard-recent-form { display: grid; gap: 7px; }
    .dashboard-form-match {
        min-width: 0;
        display: grid;
        grid-template-columns: 25px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        border-radius: 10px;
        padding: 8px 9px;
        background: #f3f6fa;
        color: #52637c;
        font-size: 9px;
        font-weight: 850;
    }
    .dashboard-form-match b:first-child { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 999px; color: white; font-size: 9px; }
    .dashboard-form-match.is-win b:first-child { background: #15803d; }
    .dashboard-form-match.is-loss b:first-child { background: #be123c; }
    .dashboard-form-match.is-draw b:first-child { background: #64748b; }
    .dashboard-form-match span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-form-match strong { color: #10203b; font-size: 10px; font-variant-numeric: tabular-nums; }
    .dashboard-recent-form-empty { border: 1px dashed #c4cfdd; border-radius: 11px; padding: 13px 10px; color: #718096; font-size: 10px; font-weight: 750; line-height: 1.4; text-align: center; }
    .dashboard-data-status {
        position: relative;
        border: 1px solid #cdd9e7;
        border-radius: 12px;
        padding: 11px 11px 11px 38px;
        background: #f7f9fc;
    }
    .dashboard-data-status::before {
        content: '';
        position: absolute;
        left: 12px;
        top: 12px;
        width: 16px;
        height: 12px;
        border: 2px solid currentColor;
        border-top: 0;
        border-radius: 0 0 8px 8px;
    }
    .dashboard-data-status::after {
        content: '';
        position: absolute;
        left: 13px;
        top: 8px;
        width: 14px;
        height: 10px;
        border: 2px solid currentColor;
        border-bottom: 0;
        border-radius: 10px 10px 0 0;
        background: #f7f9fc;
    }
    .dashboard-data-status[data-state="synced"] { border-color: #a7d7b7; background: #f0faf3; color: #16703a; }
    .dashboard-data-status[data-state="synced"]::after { background: #f0faf3; }
    .dashboard-data-status[data-state="attention"] { border-color: #efc19b; background: #fff8ef; color: #a65314; }
    .dashboard-data-status[data-state="attention"]::after { background: #fff8ef; }
    .dashboard-data-status[data-state="local"] { color: #52637c; }
    .dashboard-data-status strong { display: block; color: currentColor; font-size: 10px; font-weight: 950; }
    .dashboard-data-status span { display: block; margin-top: 2px; color: #718096; font-size: 8px; font-weight: 750; line-height: 1.35; }

    .dashboard-feed { align-content: start; }
    .dashboard-active {
        margin: 0;
        border-radius: 18px;
        padding: 16px;
        box-shadow: 0 7px 22px rgba(37, 99, 235, .09);
    }
    .dashboard-history {
        border: 1px solid #d4deeb;
        border-radius: 18px;
        padding: 17px;
        background: rgba(255, 255, 255, .9);
        box-shadow: 0 7px 22px rgba(30, 48, 77, .07);
    }
    .dashboard-heading-phone { display: none; }
    .dashboard-heading-large { display: inline; }
    .dashboard-history-cards { grid-template-columns: 1fr; }
    .dashboard-match-open { padding: 14px 15px; }
    .dashboard-match-delete { width: 70px; }
    .dashboard-empty { min-height: 180px; }

    .dashboard-wide-nav button:focus-visible,
    .dashboard-account:focus-visible,
    .dashboard-action:focus-visible,
    .dashboard-team-selector select:focus-visible,
    .dashboard-season-overview button:focus-visible,
    .dashboard-match-open:focus-visible,
    .dashboard-match-delete:focus-visible {
        outline: 3px solid rgba(37, 99, 235, .35);
        outline-offset: 2px;
    }
}

@media (min-width: 1160px) {
    .dashboard-workspace { grid-template-columns: minmax(235px, 260px) minmax(470px, 1fr) minmax(285px, 320px); gap: 20px; }
    .dashboard-command-rail { display: contents; }
    .dashboard-actions { grid-column: 1; grid-row: 1; }
    .dashboard-feed { grid-column: 2; grid-row: 1; }
    .dashboard-season-overview { grid-column: 3; grid-row: 1; }
    .dashboard-season-overview > header button { justify-self: stretch; }
}

/* Alpha 0.60 large-screen product surface. This is a separate dashboard,
   matching the approved concept rather than stretching the phone DOM. */
@media (min-width: 700px) {
    #main-dashboard:not(.hidden) {
        inset: var(--site-banner-height) 0 0;
        overflow: hidden;
        padding: 0;
        background: #edf3f9;
    }
    #main-dashboard > .dashboard-content { display: none; }
    #main-dashboard > .dashboard-pro {
        width: 100%;
        min-width: 0;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        color: #10203b;
    }

    .dashboard-pro button,
    .dashboard-pro select { font: inherit; }
    .dashboard-pro button { cursor: pointer; }
    .dashboard-pro svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

    .dashboard-pro-topbar {
        min-height: 82px;
        display: grid;
        grid-template-columns: minmax(170px, 1fr) minmax(285px, 420px) minmax(90px, 1fr);
        align-items: center;
        gap: 20px;
        flex: 0 0 auto;
        border-bottom: 1px solid rgba(255, 255, 255, .09);
        padding: 12px clamp(18px, 2.6vw, 38px);
        background: #0f1b31;
        color: #fff;
        box-shadow: 0 7px 25px rgba(10, 25, 50, .16);
        z-index: 2;
    }
    .dashboard-pro-brand { height: 100%; display: flex; align-items: center; min-width: 0; }
    .dashboard-pro-brand-mark {
        width: 210px;
        height: 56px;
        display: grid;
        place-items: center;
        flex: 0 0 210px;
    }
    .dashboard-pro-brand-mark img { border-radius: 0; object-fit: contain; }
    .dashboard-pro-team-switcher {
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 9px;
        border: 2px solid rgba(122, 173, 255, .42);
        border-radius: 14px;
        padding: 6px 7px 6px 14px;
        background: rgba(62, 116, 207, .18);
        box-shadow: 0 7px 20px rgba(0, 0, 0, .16);
    }
    .dashboard-pro-team-switcher > span { color: #c2d5f3; font-size: 9px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
    .dashboard-pro-team-switcher select {
        min-width: 0;
        min-height: 43px;
        border: 0;
        border-radius: 8px;
        padding: 0 29px 0 10px;
        background: #fff;
        color: #10203b;
        font-size: 14px;
        font-weight: 900;
    }
    .dashboard-pro-account {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        justify-self: end;
        gap: 8px;
        border: 1px solid rgba(255, 255, 255, .17);
        border-radius: 12px;
        padding: 0 14px;
        background: rgba(255, 255, 255, .08);
        color: #fff;
        font-size: 11px;
        font-weight: 900;
    }
    .dashboard-pro-account svg { width: 19px; height: 19px; }

    .dashboard-pro-frame {
        min-height: 0;
        display: grid;
        grid-template-columns: 142px minmax(0, 1fr);
        flex: 1 1 auto;
        overflow: hidden;
    }
    .dashboard-pro-sidebar {
        min-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow-y: auto;
        border-right: 1px solid #d5dfeb;
        padding: 23px 13px 18px;
        background: rgba(248, 251, 254, .9);
    }
    .dashboard-pro-sidebar nav { display: grid; gap: 7px; }
    .dashboard-pro-sidebar nav > button,
    .dashboard-pro-sidebar nav > span {
        min-height: 50px;
        display: grid;
        grid-template-columns: 27px minmax(0, 1fr);
        align-items: center;
        gap: 9px;
        border: 0;
        border-radius: 13px;
        padding: 0 11px;
        background: transparent;
        color: #62738b;
        text-align: left;
    }
    .dashboard-pro-sidebar nav > span[aria-current="page"] {
        background: linear-gradient(135deg, #e1ebff, #f3f7ff);
        color: #245fc3;
        box-shadow: inset 3px 0 #3376e8;
    }
    .dashboard-pro-sidebar nav > button:hover { background: #edf2f8; color: #203654; }
    .dashboard-pro-sidebar nav svg { width: 22px; height: 22px; }
    .dashboard-pro-sidebar nav > span:first-child svg { fill: currentColor; stroke: none; }
    .dashboard-pro-sidebar nav b { min-width: 0; font-size: 11px; font-weight: 900; white-space: nowrap; }
    .dashboard-pro-main {
        min-width: 0;
        min-height: 0;
        overflow-y: auto;
        padding: 25px clamp(20px, 3vw, 42px) 38px;
        background:
            radial-gradient(circle at 8% -8%, rgba(116, 69, 119, .10), transparent 31%),
            radial-gradient(circle at 96% 2%, rgba(37, 99, 235, .10), transparent 32%),
            #edf3f9;
    }
    .dashboard-pro-heading {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 22px;
        margin-bottom: 17px;
    }
    .dashboard-pro-heading > div:first-child { min-width: 0; }
    .dashboard-pro-heading > div:first-child > span,
    .dashboard-pro-card > header > div > span {
        display: block;
        color: var(--team-primary-dark);
        font-size: 8px;
        font-weight: 950;
        letter-spacing: .115em;
        text-transform: uppercase;
    }
    .dashboard-pro-heading h2 {
        overflow: hidden;
        margin-top: 4px;
        color: #10203b;
        font-size: clamp(27px, 3.1vw, 39px);
        font-weight: 950;
        letter-spacing: -.045em;
        line-height: 1.05;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .dashboard-pro-heading p { margin-top: 5px; color: #6f7f94; font-size: 10px; font-weight: 800; }
    .dashboard-pro-heading-actions { display: flex; align-items: end; justify-content: flex-end; gap: 10px; flex: 0 0 auto; }
    .dashboard-pro-heading-actions label { display: grid; gap: 4px; }
    .dashboard-pro-heading-actions label > span { color: #6c7c91; font-size: 7px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
    .dashboard-pro-heading-actions select {
        min-width: 132px;
        min-height: 44px;
        border: 1px solid #c7d3e1;
        border-radius: 11px;
        padding: 0 32px 0 12px;
        background: #fff;
        color: #263b57;
        font-size: 11px;
        font-weight: 900;
        box-shadow: 0 4px 12px rgba(28, 50, 80, .05);
    }
    #dashboard-pro-new-match {
        min-height: 44px;
        border: 0;
        border-radius: 11px;
        padding: 0 17px;
        background: linear-gradient(180deg, #4380ef, #2563eb);
        color: #fff;
        font-size: 12px;
        font-weight: 950;
        box-shadow: 0 7px 17px rgba(37, 99, 235, .22);
    }
    #dashboard-pro-new-match:disabled { opacity: .45; cursor: not-allowed; }

    .dashboard-pro-attention {
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
        border: 1px solid #efd2a4;
        border-radius: 13px;
        padding: 9px 13px;
        background: #fffaf1;
        color: #744219;
        box-shadow: 0 4px 14px rgba(101, 73, 28, .04);
    }
    .dashboard-pro-attention.hidden { display: none; }
    .dashboard-pro-attention > span { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; border-radius: 999px; background: #f4b84b; color: #3f290a; font-size: 13px; font-weight: 950; }
    .dashboard-pro-attention > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; }
    .dashboard-pro-attention strong { font-size: 10px; font-weight: 950; }
    .dashboard-pro-attention p { color: #876038; font-size: 9px; font-weight: 750; }

    .dashboard-pro-grid {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 16px;
    }
    .dashboard-pro-primary-column,
    .dashboard-pro-insights { min-width: 0; display: grid; align-content: start; gap: 16px; }
    .dashboard-pro-insights { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .dashboard-pro-card {
        min-width: 0;
        overflow: hidden;
        border: 1px solid #d5dfeb;
        border-radius: 18px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 8px 25px rgba(32, 54, 83, .065);
    }
    .dashboard-pro-card > header {
        min-height: 63px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid #e2e8f0;
        padding: 12px 16px;
    }
    .dashboard-pro-card > header h3 { margin-top: 3px; color: #172b47; font-size: 17px; font-weight: 950; letter-spacing: -.02em; }
    .dashboard-pro-card > header button {
        min-height: 34px;
        border: 1px solid #c9d5e4;
        border-radius: 9px;
        padding: 0 10px;
        background: #f8fafc;
        color: #425873;
        font-size: 9px;
        font-weight: 900;
    }
    .dashboard-pro-card > header button b { padding-left: 3px; color: #2563eb; font-size: 14px; }
    #dashboard-pro-next-status {
        border: 1px solid #b9d0f5;
        border-radius: 999px;
        padding: 6px 9px;
        background: #edf5ff;
        color: #2461be;
        font-size: 8px;
        font-weight: 950;
        letter-spacing: .05em;
        text-transform: uppercase;
    }
    #dashboard-pro-next-status.is-live { border-color: #f3b2bd; background: #fff0f2; color: #b4233d; }

    .dashboard-pro-next-match { min-height: 230px; display: grid; place-items: center; padding: 18px; }
    .dashboard-pro-fixture { width: 100%; display: grid; gap: 16px; }
    .dashboard-pro-fixture-meta { color: #6b7c91; font-size: 10px; font-weight: 800; text-align: center; }
    .dashboard-pro-fixture-teams { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, auto) minmax(0, 1fr); align-items: center; gap: 12px; }
    .dashboard-pro-fixture-team { min-width: 0; display: grid; justify-items: center; gap: 7px; text-align: center; }
    .dashboard-pro-crest {
        width: 61px;
        height: 61px;
        display: grid;
        place-items: center;
        border: 5px solid rgba(255, 255, 255, .88);
        border-radius: 50%;
        background: var(--team-primary);
        color: var(--team-foreground);
        font-size: 16px;
        font-weight: 950;
        box-shadow: 0 0 0 1px rgba(43, 64, 91, .14), 0 8px 17px rgba(32, 52, 80, .13);
        text-shadow: var(--team-text-shadow);
    }
    .dashboard-pro-crest[data-team-theme="red"] { background: #c81919; color: #fff; }
    .dashboard-pro-crest[data-team-theme="orange"] { background: #ff9f1c; color: #000; }
    .dashboard-pro-crest[data-team-theme="amber"] { background: #e3e31c; color: #000; }
    .dashboard-pro-crest[data-team-theme="lime"] { background: #80e31c; color: #000; }
    .dashboard-pro-crest[data-team-theme="emerald"] { background: #1ce31c; color: #000; }
    .dashboard-pro-crest[data-team-theme="teal"] { background: #1ce380; color: #000; }
    .dashboard-pro-crest[data-team-theme="sky"] { background: #1ce3e3; color: #000; }
    .dashboard-pro-crest[data-team-theme="blue"] { background: #1970c8; color: #fff; }
    .dashboard-pro-crest[data-team-theme="indigo"] { background: #1919c8; color: #fff; }
    .dashboard-pro-crest[data-team-theme="violet"] { background: #7019c8; color: #fff; }
    .dashboard-pro-crest[data-team-theme="fuchsia"] { background: #c819c8; color: #fff; }
    .dashboard-pro-crest[data-team-theme="rose"] { background: #e31c80; color: #000; }
    .dashboard-pro-crest[data-team-theme="brown"] { background: #8b5e3c; color: #fff; }
    .dashboard-pro-crest[data-team-theme="blush"] { background: #f5a3c7; color: #000; }
    .dashboard-pro-fixture-team strong { max-width: 100%; overflow: hidden; color: #142a47; font-size: 16px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-pro-fixture-team small { color: #7a899d; font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
    .dashboard-pro-versus { display: grid; justify-items: center; gap: 4px; color: #8593a6; font-size: 10px; font-weight: 950; text-align: center; }
    .dashboard-pro-versus > span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
    .dashboard-pro-versus > span > .match-cloud-status { width: auto; height: 14px; }
    .dashboard-pro-versus.is-live-score > small { color: #728197; font-size: 7px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
    .dashboard-pro-versus.is-live-score strong { display: inline-flex; align-items: baseline; gap: 4px; color: #142a47; font-size: 22px; font-weight: 950; letter-spacing: -.04em; }
    .dashboard-pro-versus.is-live-score i { color: #8b98a9; font-size: 13px; font-style: normal; }
    .dashboard-pro-fixture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
    .dashboard-pro-fixture-actions button {
        min-height: 43px;
        border: 1px solid #bfcde0;
        border-radius: 10px;
        background: #f8fafc;
        color: #304761;
        font-size: 10px;
        font-weight: 950;
    }
    .dashboard-pro-fixture-actions button:first-child { border-color: #2f6dd5; background: #2868d8; color: #fff; }
    .dashboard-pro-fixture-actions .dashboard-pro-fixture-delete { border-color: #fecaca; background: #fff5f5; color: #be123c; }
    .dashboard-pro-empty { width: 100%; display: grid; justify-items: center; gap: 7px; padding: 24px; color: #6f8095; text-align: center; }
    .dashboard-pro-empty > span { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 14px; background: #edf2f8; color: #51719e; font-size: 22px; }
    .dashboard-pro-empty strong { color: #2b415e; font-size: 13px; font-weight: 950; }
    .dashboard-pro-empty p { max-width: 310px; font-size: 9px; font-weight: 750; line-height: 1.45; }

    .dashboard-pro-recent-matches { display: grid; }
    .dashboard-pro-result-row {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        min-height: 69px;
        border-bottom: 1px solid #e7edf4;
        padding-right: 10px;
    }
    .dashboard-pro-result-row:last-child { border-bottom: 0; }
    .dashboard-pro-result-open {
        min-width: 0;
        min-height: 69px;
        display: grid;
        grid-template-columns: minmax(84px, .8fr) minmax(0, 1.7fr) auto;
        align-items: center;
        gap: 14px;
        border: 0;
        padding: 10px 6px 10px 15px;
        background: transparent;
        text-align: left;
    }
    .dashboard-pro-result-open:hover { background: #f8fbff; }
    .dashboard-pro-result-date span,
    .dashboard-pro-result-date small { display: block; }
    .dashboard-pro-result-date span { color: #263c59; font-size: 10px; font-weight: 950; }
    .dashboard-pro-result-date small { margin-top: 3px; color: #8491a3; font-size: 8px; font-weight: 750; }
    .dashboard-pro-result-teams { min-width: 0; display: grid; gap: 3px; }
    .dashboard-pro-result-teams strong,
    .dashboard-pro-result-teams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-pro-result-teams strong { color: #1c334f; font-size: 11px; font-weight: 950; }
    .dashboard-pro-result-teams span { color: #718096; font-size: 9px; font-weight: 800; }
    .dashboard-pro-result-score { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
    .dashboard-pro-result-score > strong { color: #10203b; font-size: 18px; font-weight: 950; font-variant-numeric: tabular-nums; }
    .dashboard-pro-result-delete { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #fecaca; border-radius: 8px; background: #fff5f5; color: #be123c; font-size: 17px; }

    .dashboard-pro-glance,
    .dashboard-pro-trends { min-height: 0; }
    .dashboard-pro-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e4eaf2; }
    .dashboard-pro-kpis > div { min-width: 0; min-height: 67px; display: flex; flex-direction: column; justify-content: center; padding: 10px 13px; background: #fff; }
    .dashboard-pro-kpis strong { overflow: hidden; color: #162c48; font-size: 20px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
    .dashboard-pro-kpis span { margin-top: 3px; color: #79889b; font-size: 7px; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
    .dashboard-pro-form-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 7px; }
    .dashboard-pro-form-heading strong { color: #354a65; font-size: 9px; font-weight: 950; }
    .dashboard-pro-form-heading span { color: #8794a6; font-size: 7px; font-weight: 800; }
    .dashboard-pro-form { display: flex; gap: 7px; padding: 0 14px 14px; }
    .dashboard-pro-form > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 950; }
    .dashboard-pro-form .is-win { background: #168044; }
    .dashboard-pro-form .is-loss { background: #bf2842; }
    .dashboard-pro-form .is-draw { background: #64748b; }
    .dashboard-pro-form .is-empty { width: auto; border-radius: 9px; padding: 0 10px; background: #edf2f7; color: #718096; }

    .dashboard-pro-trends-chart { min-height: 168px; display: grid; align-content: center; gap: 10px; padding: 15px; }
    .dashboard-pro-chart-wrap { height: 91px; overflow: hidden; border: 1px solid #e0e7f0; border-radius: 12px; background: linear-gradient(#f9fbfd, #fff); }
    .dashboard-pro-chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
    .dashboard-pro-chart-grid { stroke: #dfe7f0; stroke-width: 1; }
    .dashboard-pro-chart-score { fill: none; stroke: #2768d7; stroke-width: 3; }
    .dashboard-pro-chart-accuracy { fill: none; stroke: #8a4f92; stroke-width: 3; }
    .dashboard-pro-chart-dot-score { fill: #2768d7; stroke: #fff; stroke-width: 2; }
    .dashboard-pro-chart-dot-accuracy { fill: #8a4f92; stroke: #fff; stroke-width: 2; }
    .dashboard-pro-chart-wrap svg text { font-size: 9px; font-weight: 950; paint-order: stroke; stroke: #fff; stroke-width: 2.5px; stroke-linejoin: round; }
    .dashboard-pro-chart-label-score { fill: #1759c3; }
    .dashboard-pro-chart-label-accuracy { fill: #744577; }
    .dashboard-pro-chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; color: #6f7f93; font-size: 8px; font-weight: 850; }
    .dashboard-pro-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
    .dashboard-pro-chart-legend i { width: 8px; height: 8px; border-radius: 50%; background: #2768d7; }
    .dashboard-pro-chart-legend span:last-child i { background: #8a4f92; }
    .dashboard-pro-chart-legend b { margin-left: auto; color: #304762; font-size: 9px; }

    .dashboard-pro button:focus-visible,
    .dashboard-pro select:focus-visible {
        outline: 3px solid rgba(71, 133, 243, .42);
        outline-offset: 2px;
    }
}

@media (min-width: 980px) {
    .dashboard-pro-frame { grid-template-columns: 168px minmax(0, 1fr); }
    .dashboard-pro-sidebar { padding-right: 15px; padding-left: 15px; }
    .dashboard-pro-grid { grid-template-columns: minmax(430px, 1.6fr) minmax(250px, .9fr); gap: 18px; }
    .dashboard-pro-insights { grid-template-columns: 1fr; }
}

@media (min-width: 1260px) {
    .dashboard-pro-frame { grid-template-columns: 194px minmax(0, 1fr); }
    .dashboard-pro-sidebar { padding-right: 20px; padding-left: 20px; }
    .dashboard-pro-sidebar nav > button,
    .dashboard-pro-sidebar nav > span { min-height: 54px; padding-right: 14px; padding-left: 14px; }
    .dashboard-pro-sidebar nav b { font-size: 12px; }
    .dashboard-pro-grid { grid-template-columns: minmax(520px, 1.7fr) minmax(285px, .86fr); gap: 20px; }
    .dashboard-pro-next-match { min-height: 245px; padding-right: 25px; padding-left: 25px; }
    .dashboard-pro-crest { width: 70px; height: 70px; font-size: 18px; }
}

.history-association-overlay {
    position: fixed;
    inset: 0;
    z-index: 175;
    overflow-y: auto;
    padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    background: rgba(7, 16, 32, .94);
}
.history-association-panel {
    width: min(100%, 720px);
    margin: 0 auto;
    border: 1px solid #cbd6e6;
    border-radius: 20px;
    padding: 18px;
    background: #f6f8fc;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}
.history-association-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.history-association-header h2 { margin-top: 2px; color: #10203b; font-size: 23px; font-weight: 950; }
.history-association-header button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #dfe6f0;
    color: #10203b;
    font-size: 28px;
    font-weight: 800;
}
.history-association-intro { margin-top: 12px; color: #52637c; font-size: 12px; line-height: 1.5; }
.history-association-list { display: grid; gap: 10px; margin-top: 15px; }
.history-association-item { border: 1px solid #d3dce9; border-radius: 14px; padding: 13px; background: white; }
.history-association-item header { display: flex; flex-direction: column; gap: 2px; }
.history-association-item header strong { color: #10203b; font-size: 13px; }
.history-association-item header span { color: #607089; font-size: 11px; font-weight: 750; }
.history-association-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 11px; }
.history-association-fields label > span { display: block; margin-bottom: 4px; color: #607089; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.history-association-fields select { width: 100%; min-height: 44px; border: 1px solid #b8c5d7; border-radius: 10px; padding: 0 9px; background: #f9fbfe; color: #10203b; font-size: 12px; font-weight: 800; }
.history-association-fields select:disabled { opacity: .55; }
.history-association-item p { margin-top: 8px; color: #718096; font-size: 10px; font-style: italic; }
.history-association-empty { border: 1px dashed #b8c5d7; border-radius: 13px; padding: 18px; color: #607089; font-size: 12px; line-height: 1.5; text-align: center; }
.history-association-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; margin-top: 14px; padding-top: 10px; background: #f6f8fc; }
.history-association-actions button { min-height: 48px; border-radius: 11px; font-size: 12px; font-weight: 950; }
.history-association-cancel { border: 1px solid #b8c5d7; background: white; color: #30415f; }
.history-association-save { background: #2563eb; color: white; }
@media (max-width: 390px) {
    .history-association-fields { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
    .dashboard-header { gap: 6px; }
    .dashboard-brand-mark { width: 164px; height: 44px; }
    .dashboard-account { min-height: 38px; padding: 0 7px; font-size: 10px; }
    .dashboard-account-icon { width: 15px; height: 15px; flex-basis: 15px; }
    .dashboard-action { min-height: 76px; padding: 11px; }
    .dashboard-action-icon { width: 30px; height: 30px; font-size: 18px; }
    .dashboard-action small { display: none; }
    .resume-match-lower { flex-direction: column; }
    .active-match-actions { width: 100%; }
    .active-match-action { flex: 1 1 0; }
}

@media (max-width: 340px) {
    .dashboard-header { gap: 4px; }
    .dashboard-brand-mark { width: 146px; height: 39px; }
    .dashboard-account { min-height: 34px; padding: 0 5px; font-size: 9px; }
    .dashboard-account-icon { width: 14px; height: 14px; flex-basis: 14px; }
}

/* A phone in landscape gets one app-wide guard above every dashboard, team,
   account, report and modal surface. Tablets and pointer-driven computers keep
   their large-screen layouts. The compact-device class is the primary signal;
   the coarse-pointer height query covers iOS viewport/screen reporting quirks. */
@media (orientation: landscape) {
    html.app-phone-device body {
        overflow: hidden;
    }
    html.app-phone-device .app-phone-landscape-guard {
        display: flex;
    }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    body {
        overflow: hidden;
    }
    .app-phone-landscape-guard {
        display: flex;
    }
}

@media (orientation: landscape) {
    .app-phone-landscape-guard {
        position: fixed;
        inset: 0;
        z-index: 5000;
        min-width: 100vw;
        min-height: 100dvh;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding:
            calc(24px + env(safe-area-inset-top))
            calc(28px + env(safe-area-inset-right))
            calc(24px + env(safe-area-inset-bottom))
            calc(28px + env(safe-area-inset-left));
        text-align: center;
        background:
            radial-gradient(circle at 50% 20%, rgba(59, 130, 246, .2), transparent 42%),
            #0f172a;
        color: #f8fafc;
    }
    .app-phone-landscape-guard-icon {
        display: grid;
        width: clamp(54px, 15dvh, 86px);
        height: clamp(54px, 15dvh, 86px);
        place-items: center;
        border: 2px solid rgba(103, 232, 249, .55);
        border-radius: 24px;
        background: rgba(8, 145, 178, .16);
        color: #67e8f9;
        font-size: clamp(32px, 9dvh, 50px);
        font-weight: 900;
        line-height: 1;
    }
    .app-phone-landscape-guard h2 {
        margin: 0;
        color: #f8fafc;
        font-size: clamp(22px, 6dvh, 34px);
        font-weight: 950;
        line-height: 1.05;
    }
    .app-phone-landscape-guard p {
        max-width: 520px;
        margin: 0;
        color: #cbd5e1;
        font-size: clamp(14px, 3.6dvh, 18px);
        font-weight: 750;
        line-height: 1.25;
    }
}

/* Milestone 12 team and match setup surfaces. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#team-manager-screen:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% -10%, rgba(79, 131, 238, .13), transparent 34%),
        var(--solo-bg, #f4f7fb);
    color: var(--solo-ink, #10203b);
    padding:
        calc(14px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(92px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
}

.team-manager-content {
    width: min(100%, 760px);
    margin: 0 auto;
}

.team-manager-panel.hidden { display: none; }
.team-manager-bottom-nav {
    position: fixed;
    z-index: 42;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 760px);
    margin: 0 auto;
    border-top: 1px solid #cbd5e1;
    padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(248, 250, 252, .96);
    box-shadow: 0 -6px 22px rgba(15, 23, 42, .1);
    backdrop-filter: blur(14px);
}
.team-manager-bottom-nav button {
    display: grid;
    min-height: 52px;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    background: white;
    color: #475569;
    font-size: 10px;
    font-weight: 950;
}
.team-manager-bottom-nav button span { width: 20px; height: 20px; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.team-manager-bottom-nav button span svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.team-manager-bottom-nav button span svg text { fill: currentColor; stroke: none; font-size: 8px; font-weight: 950; }
.team-manager-bottom-nav button[aria-selected="true"] { border-color: var(--team-primary); background: var(--team-primary); color: var(--team-foreground); }

.team-management-heading { margin-bottom: 12px; }
.team-management-heading h3 { margin-top: 2px; color: #10203b; font-size: 21px; font-weight: 950; }
.team-management-heading p { margin-top: 4px; color: #607089; font-size: 11px; font-weight: 700; }
.team-management-actions { display: grid; gap: 9px; }
.team-management-actions button {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 10px;
    width: 100%;
    min-height: 62px;
    border: 1px solid #c8d3e2;
    border-radius: 13px;
    padding: 9px 12px;
    background: white;
    color: #10203b;
    text-align: left;
}
.team-management-actions button > span { grid-row: 1 / span 2; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--team-primary) 14%, white); color: var(--team-primary-dark); font-size: 18px; font-weight: 950; }
.team-management-actions button::after { grid-column: 3; grid-row: 1 / span 2; content: '›'; color: #64748b; font-size: 24px; font-weight: 700; }
.team-management-actions strong { font-size: 13px; font-weight: 950; }
.team-management-actions small { color: #64748b; font-size: 9px; font-weight: 750; }
.team-management-coach-note { display: none; border: 1px solid #cbd5e1; border-radius: 13px; padding: 14px; background: #f8fafc; color: #475569; font-size: 11px; font-weight: 750; line-height: 1.5; }

.subscreen-header {
    display: grid;
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.subscreen-header > div { min-width: 0; }
.subscreen-header h2 {
    margin-top: 2px;
    color: #10203b;
    font-size: clamp(21px, 5vw, 27px);
    font-weight: 950;
    letter-spacing: -.025em;
    line-height: 1;
}
.subscreen-eyebrow {
    display: block;
    color: #607089;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.subscreen-back {
    min-height: 44px;
    border: 1px solid var(--solo-border, #d6deea);
    border-radius: 12px;
    padding: 0 12px;
    background: white;
    color: #14213a;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 2px 7px rgba(25, 48, 83, .07);
}
.subscreen-back span { font-size: 12px; vertical-align: 2px; }
.subscreen-saved {
    border: 1px solid #a9d4b0;
    border-radius: 999px;
    padding: 5px 8px;
    background: #e8f7e9;
    color: #166534;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.team-manager-cloud-status { min-width: 29px; height: 29px; }

.team-selector-card,
.team-profile-card,
.team-roster-section,
.team-danger-section,
.team-deleted-section {
    border: 1px solid var(--solo-border, #d6deea);
    border-radius: 16px;
    background: white;
    box-shadow: 0 3px 10px rgba(25, 48, 83, .07);
}
.team-selector-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 1.35fr);
    align-items: end;
    gap: 14px;
    margin-bottom: 12px;
    padding: 15px;
}
.team-selector-card h3 {
    margin-top: 2px;
    color: #10203b;
    font-size: 17px;
    font-weight: 950;
}
.team-selector-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
}
.team-selector-controls select,
.team-selector-controls button {
    min-height: 46px;
    border: 1px solid #c8d3e2;
    border-radius: 11px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 900;
}
.team-selector-controls select { min-width: 0; background: #f9fbfe; color: #10203b; }
.team-selector-controls button { background: #2563eb; color: white; white-space: nowrap; }
.team-selector-controls button:disabled { background: #64748b; color: #cbd5e1; cursor: not-allowed; }
.team-portal-season-label { display: grid; gap: 5px; margin-top: 4px; }
.team-portal-season-label span { color: #607089; font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.team-portal-season-label select { width: 100%; }
#add-team-portal-season-button { border-color: var(--team-primary-dark); background: var(--team-primary); color: var(--team-foreground); }
.team-access-message { grid-column: 1 / -1; margin: 0; color: #9f1239; font-size: 0.78rem; font-weight: 800; }
.team-quick-actions {
    grid-column: 1 / -1;
    display: grid;
    gap: 9px;
}
.team-manager-panel > .team-quick-actions { margin-bottom: 12px; }
.team-quick-actions button {
    width: 100%;
    min-height: 46px;
    border: 1px solid #c8d3e2;
    border-radius: 11px;
    background: #f8fafc;
    color: #10203b;
    font-size: 13px;
    font-weight: 900;
}

.team-manager-modal:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    overflow-y: auto;
    padding:
        calc(14px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(24px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
    background: rgba(15, 27, 48, .82);
    backdrop-filter: blur(5px);
}
.team-manager-modal-content {
    width: min(100%, 680px);
    margin: 0 auto;
    border-radius: 18px;
    padding: 15px;
    background: var(--solo-bg, #f4f7fb);
    box-shadow: 0 18px 50px rgba(15, 27, 48, .28);
}
#new-team-modal .team-manager-modal-content { max-width: 520px; }
#new-team-modal .team-identity-fields { align-items: end; }
#new-team-modal .team-identity-fields input { height: 48px; }
#new-team-modal [data-action="create-team"] {
    width: 100%; margin-top: 18px; padding: 14px 20px; border-radius: 12px;
    background: var(--team-primary, #2459ed); color: var(--team-foreground, #fff);
    font-weight: 800; border: 0;
}
.team-manager-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.team-theme-fieldset {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}
.team-theme-fieldset legend {
    margin-bottom: 7px;
    color: #4c5e78;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.team-theme-options {
    display: grid;
    grid-template-columns: repeat(6, minmax(38px, 1fr));
    gap: 8px;
}
.team-theme-option {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 48px;
    cursor: pointer;
}
.team-theme-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.team-theme-option > span {
    display: block;
    border: 3px solid #fff;
    border-radius: 13px;
    box-shadow: 0 0 0 1px #c8d3e2, 0 3px 8px rgb(15 23 42 / .14);
}
.team-theme-option[data-theme="red"] > span { background: #c81919; }
.team-theme-option[data-theme="orange"] > span { background: #ff9f1c; }
.team-theme-option[data-theme="amber"] > span { background: #e3e31c; }
.team-theme-option[data-theme="lime"] > span { background: #80e31c; }
.team-theme-option[data-theme="emerald"] > span { background: #1ce31c; }
.team-theme-option[data-theme="teal"] > span { background: #1ce380; }
.team-theme-option[data-theme="sky"] > span { background: #1ce3e3; }
.team-theme-option[data-theme="blue"] > span { background: #1970c8; }
.team-theme-option[data-theme="indigo"] > span { background: #1919c8; }
.team-theme-option[data-theme="violet"] > span { background: #7019c8; }
.team-theme-option[data-theme="fuchsia"] > span { background: #c819c8; }
.team-theme-option[data-theme="rose"] > span { background: #e31c80; }
.team-theme-option[data-theme="brown"] > span { background: #8b5e3c; }
.team-theme-option[data-theme="blush"] > span { background: #f5a3c7; }
.team-theme-option > b {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    color: white;
    font-size: 22px;
    line-height: 1;
    text-shadow: 0 2px 3px rgb(15 23 42 / .65);
}
.team-theme-option:is([data-theme="orange"], [data-theme="amber"], [data-theme="lime"], [data-theme="emerald"], [data-theme="teal"], [data-theme="sky"], [data-theme="rose"], [data-theme="blush"]) > b {
    color: #000;
    text-shadow: 0 1px 2px rgb(255 255 255 / .55);
}
.team-theme-option input:checked + span {
    border-color: #fff;
    box-shadow: 0 0 0 3px #10203b, 0 4px 10px rgb(15 23 42 / .2);
}
.team-theme-option input:checked ~ b { display: grid; }
.team-theme-option[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
.team-manager-modal-header h2 { margin: 0; color: #10203b; font-size: 21px; font-weight: 950; }
.team-manager-modal-header button {
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    padding: 0 15px;
    background: #33445f;
    color: white;
    font-size: 13px;
    font-weight: 900;
}
.team-manager-modal .team-profile-card,
.team-manager-modal .team-competition-section { margin: 0; }
/* Explicit stacking for values absent from the precompiled utility sheet. */
#account-access-modal { z-index: 205; }
#account-invite-modal { z-index: 210; }
#account-member-modal { z-index: 215; }
#invite-code-modal { z-index: 225; }

html[data-server-access="restricted"][data-account-role="coach"] #history-organise-button,
html[data-server-access="restricted"][data-account-role="coach"] #sync-permanent-section,
html[data-server-access="restricted"][data-account-role="viewer"] #dashboard-team-action,
html[data-server-access="restricted"][data-account-role="viewer"] #new-match-button,
html[data-server-access="restricted"][data-account-role="viewer"] #history-organise-button,
html[data-server-access="restricted"][data-account-role="viewer"] .active-match-actions,
html[data-server-access="restricted"][data-account-role="viewer"] .active-match-edit,
html[data-server-access="restricted"][data-account-role="viewer"] .dashboard-match-delete,
html[data-server-access="restricted"][data-account-role="viewer"] #sync-deleted-section,
html[data-server-access="restricted"][data-account-role="viewer"] #sync-permanent-section {
    display: none !important;
}
html[data-team-collaboration="disabled"] [data-action="open-team-share-codes"],
html[data-team-collaboration="disabled"] [data-action="open-manage-access"] {
    display: none !important;
}
html[data-server-access="restricted"][data-account-role="coach"] .team-quick-actions,
html[data-server-access="restricted"][data-account-role="coach"] .team-add-player-button,
html[data-server-access="restricted"][data-account-role="coach"] .team-player-action,
html[data-server-access="restricted"][data-account-role="coach"] .team-danger-section,
html[data-server-access="restricted"][data-account-role="coach"] .team-deleted-section,
html[data-server-access="restricted"][data-account-role="coach"] .team-management-owner-only,
html[data-server-access="restricted"][data-account-role="coach"] #add-team-settings-button {
    display: none !important;
}
html[data-server-access="restricted"][data-account-role="coach"] .team-management-coach-note { display: block; }
html[data-server-access="restricted"][data-account-role="viewer"] .viewer-match-actions {
    display: flex;
}
.account-member-editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-member-editor-actions button { min-height: 44px; border-radius: 9px; color: white; font-size: 12px; font-weight: 900; }
#account-member-revoke { border: 1px solid rgb(225 29 72); background: rgb(225 29 72 / .2); }
#account-member-revoke[data-status="suspended"] { border-color: rgb(16 185 129); background: rgb(16 185 129 / .2); }
#account-member-save { border: 1px solid rgb(8 145 178); background: rgb(8 145 178); }
.invite-code-panel { max-height: calc(100dvh - 24px); overflow-y: auto; }
.invite-code-hint { display: block; margin-top: 4px; color: rgb(148 163 184); font-size: 10px; }
.invite-code-preview-card { border: 1px solid rgb(8 145 178); border-radius: 10px; padding: 11px; background: rgb(8 145 178 / .12); }
.invite-code-preview-card strong { display: block; color: rgb(103 232 249); font-size: 15px; }
.invite-code-preview-card span { display: block; margin-top: 4px; color: rgb(203 213 225); font-size: 11px; }
.invite-code-preview-card ul { display: grid; gap: 5px; margin-top: 9px; }
.invite-code-preview-card li { border-radius: 7px; padding: 7px 8px; background: rgb(30 41 59); color: white; font-size: 11px; font-weight: 750; }
.team-profile-card { padding: 15px; }

@media (max-width: 560px) {
    .team-selector-card { grid-template-columns: 1fr; align-items: stretch; }
}
.team-section-heading,
.team-roster-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.team-section-heading h3,
.team-roster-heading h3 {
    margin-top: 2px;
    color: #10203b;
    font-size: 17px;
    font-weight: 950;
}
.team-profile-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #edf3ff;
    color: #1d4ed8;
    font-size: 20px;
}
.team-profile-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.team-identity-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 11px;
}
.form-field { display: block; min-width: 0; }
.form-field > span {
    display: block;
    margin: 0 0 5px 2px;
    color: #4c5e78;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.form-field input,
.form-field select,
.team-player-row input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #c8d3e2;
    border-radius: 11px;
    padding: 0 12px;
    background: #f9fbfe;
    color: #10203b;
    font-size: 14px;
    font-weight: 800;
    outline: none;
    user-select: text;
}
.form-field select { appearance: auto; user-select: auto; }
.form-field input:focus,
.form-field select:focus,
.team-player-row input:focus {
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.team-abbrev-field input,
.team-player-abbrev input,
.match-opponent-abbrev input { text-align: center; text-transform: uppercase; }

.team-roster-section,
.team-competition-section { margin-top: 12px; padding: 15px; }
.team-roster-heading > span {
    max-width: 160px;
    color: #607089;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
}
.team-roster-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.team-roster-actions > button {
    min-height: 42px;
    border: 1px solid #744577;
    border-radius: 11px;
    padding: 0 14px;
    background: white;
    color: #744577;
    font-size: 12px;
    font-weight: 900;
}
.team-roster-list { display: grid; gap: 7px; margin-top: 13px; }
.team-add-player-button {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    border: 1px solid #744577;
    border-radius: 11px;
    background: white;
    color: #744577;
    font-size: 13px;
    font-weight: 900;
}
.team-player-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px 40px auto;
    align-items: center;
    gap: 9px;
    border: 1px solid #d6deea;
    border-radius: 12px;
    padding: 9px;
    background: #f9fbfe;
}
.team-player-summary { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; text-align: left; }
.team-player-summary strong { overflow: hidden; color: #10203b; font-size: 14px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.team-player-summary span { color: #744577; font-size: 11px; font-weight: 900; }
.team-player-action { min-height: 38px; border: 1px solid #c8d3e2; border-radius: 9px; padding: 0 10px; background: white; color: #10203b; font-size: 12px; font-weight: 900; }
.team-player-edit { padding: 0; font-size: 19px; }
.team-player-stats { width: 40px; display: grid; place-items: center; padding: 0; color: var(--team-primary-dark); }
.team-player-stats svg { width: 21px; height: 21px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.team-player-delete { width: 42px; padding: 0; border-color: #fecdd3; color: #be123c; font-size: 24px; line-height: 1; }
.team-player-archived { background: #f1f5f9; opacity: .84; }
.archived-player-section { margin-top: 18px; border-top: 1px solid #d6deea; padding-top: 14px; }
.archived-player-section h4 { margin: 0; color: #10203b; font-size: 14px; font-weight: 950; }
.archived-player-section > p { margin: 3px 0 0; color: #607089; font-size: 10px; font-weight: 700; }

.team-manager-panel[data-team-manager-panel="schedule"] {
    border: 1px solid var(--solo-border, #d6deea);
    border-radius: 16px;
    padding: 15px;
    background: white;
    box-shadow: 0 3px 10px rgba(25, 48, 83, .07);
}
.team-schedule-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.team-schedule-heading h3 { margin-top: 2px; color: #10203b; font-size: 20px; font-weight: 950; }
.team-schedule-heading button {
    min-height: 44px;
    border: 1px solid var(--team-primary-dark);
    border-radius: 11px;
    padding: 0 14px;
    background: var(--team-primary);
    color: var(--team-foreground);
    font-size: 12px;
    font-weight: 950;
}
.team-trends-card { margin-top: 13px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 14px; background: linear-gradient(145deg, #f8fafc, #eef4ff); }
.team-trends-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px 8px; }
.team-trends-card > header span { color: #607089; font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.team-trends-card h4 { margin: 2px 0 0; color: #10203b; font-size: 17px; font-weight: 950; }
.team-trends-card > header button { min-height: 36px; border: 1px solid var(--team-primary-dark); border-radius: 9px; padding: 0 11px; background: white; color: var(--team-primary-dark); font-size: 10px; font-weight: 950; }
.team-trends-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-top: 1px solid #dbe3ef; background: #dbe3ef; }
.team-trends-summary > div { min-width: 0; padding: 10px 7px; background: white; text-align: center; }
.team-trends-summary .team-trend-secondary,
.team-trends-summary .team-trend-wide { display: none; }
.team-trends-summary strong, .team-trends-summary span { display: block; }
.team-trends-summary strong { color: #10203b; font-size: 17px; font-weight: 950; }
.team-trends-summary span { margin-top: 2px; color: #607089; font-size: 8px; font-weight: 850; }
.team-trends-summary > p { grid-column: 1 / -1; margin: 0; padding: 14px; background: white; color: #607089; font-size: 11px; font-weight: 750; text-align: center; }
.team-trends-detail { border-top: 1px solid #dbe3ef; padding: 11px; background: white; }
.team-trends-detail.hidden { display: none; }
.team-trends-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.team-trends-form span { overflow: hidden; border-radius: 8px; padding: 7px 8px; background: #f1f5f9; color: #334155; font-size: 9px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.team-trends-form b { display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 5px; border-radius: 999px; color: white; font-size: 9px; }
.team-trends-form .is-win b { background: #15803d; }
.team-trends-form .is-loss b { background: #be123c; }
.team-trends-form .is-draw b { background: #64748b; }
.team-trends-metrics { display: grid; gap: 7px; margin-top: 10px; }
.team-trends-metrics article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; border: 1px solid #e2e8f0; border-radius: 9px; padding: 8px 9px; }
.team-trends-metrics article div { display: flex; justify-content: space-between; gap: 8px; }
.team-trends-metrics article span { color: #475569; font-size: 10px; font-weight: 850; }
.team-trends-metrics article strong { color: #10203b; font-size: 12px; font-weight: 950; }
.team-trends-metrics article > b { grid-column: 2; grid-row: 1 / span 2; font-size: 20px; }
.team-trends-metrics article > b.is-positive { color: #15803d; }
.team-trends-metrics article > b.is-negative { color: #be123c; }
.team-trends-metrics article > b.is-steady { color: #64748b; }
.team-trends-metrics small { overflow: hidden; color: #64748b; font-size: 8px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.team-trends-detail > p { margin: 9px 1px 0; color: #64748b; font-size: 8px; line-height: 1.35; }
.team-schedule-list { display: grid; gap: 10px; margin-top: 13px; }
.team-schedule-card { display: grid; grid-template-rows: auto minmax(52px, 1fr) auto; overflow: hidden; border: 1px solid #d6deea; border-radius: 14px; background: #f8fafc; }
.team-schedule-card > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 13px; }
.team-schedule-title-row { min-width: 0; display: flex; align-items: center; gap: 7px; }
.team-schedule-edit { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 0; background: white; color: #30415f; }
.team-schedule-edit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.team-schedule-card h4 { overflow: hidden; margin: 0; color: #10203b; font-size: 15px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.team-schedule-card time { grid-column: 1; color: #607089; font-size: 10px; font-weight: 800; }
.team-schedule-status { grid-column: 2; grid-row: 1 / span 2; align-self: center; border-radius: 999px; padding: 5px 8px; background: #dbeafe; color: #1d4ed8; font-size: 9px; font-weight: 950; text-transform: uppercase; }
.team-schedule-card.is-completed .team-schedule-status { background: #dcfce7; color: #166534; }
.team-schedule-score { min-height: 52px; display: flex; align-items: baseline; justify-content: center; gap: 8px; border-top: 1px solid #e2e8f0; padding: 11px; color: #10203b; }
.team-schedule-score strong { font-size: 22px; font-weight: 950; }
.team-schedule-score span { color: #607089; font-size: 11px; font-weight: 900; }
.team-schedule-plan { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 7px; border-top: 1px solid #e2e8f0; padding: 9px 11px; background: #f8fafc; }
.team-schedule-plan strong { color: var(--team-primary-dark); font-size: 14px; font-weight: 950; }
.team-schedule-plan span { color: #607089; font-size: 10px; font-weight: 800; }
.team-schedule-live { min-height: 52px; display: grid; place-content: center; gap: 3px; border-top: 1px solid #e2e8f0; padding: 8px 11px; background: #f0f7ff; text-align: center; }
.team-schedule-live strong { overflow: hidden; color: #17385f; font-size: 12px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.team-schedule-live span { color: #527197; font-size: 9px; font-weight: 850; }
.team-schedule-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-top: 1px solid #e2e8f0; padding: 9px; }
.team-schedule-actions > button:only-child { grid-column: 1 / -1; }
.team-schedule-actions button { min-height: 42px; border: 1px solid #cbd5e1; border-radius: 10px; background: white; color: #30415f; font-size: 11px; font-weight: 950; }
.team-schedule-actions button.team-schedule-primary { border-color: var(--team-primary-dark); background: var(--team-primary); color: var(--team-foreground); }
.team-schedule-actions button.team-schedule-delete { border-color: #fecaca; background: #fff5f5; color: #be123c; }

.team-manager-panel[data-team-manager-panel="results"] { display: grid; gap: 12px; }
.team-manager-panel[data-team-manager-panel="results"].hidden { display: none; }
.team-results-heading { border: 1px solid #d6deea; border-radius: 16px; padding: 15px; background: white; box-shadow: 0 3px 10px rgba(25, 48, 83, .07); }
.team-results-heading h3 { margin-top: 2px; color: #10203b; font-size: 21px; font-weight: 950; }
.team-results-heading p { margin: 4px 0 0; color: #607089; font-size: 11px; font-weight: 700; }
.team-season-results { display: grid; gap: 14px; }
.team-season-result-card { overflow: hidden; border: 1px solid #cbd5e1; border-radius: 16px; background: white; box-shadow: 0 3px 10px rgba(25, 48, 83, .07); }
.team-season-result-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; background: linear-gradient(145deg, #f8fafc, #eef4ff); }
.team-season-result-card > header span { color: #64748b; font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.team-season-result-card h4 { margin: 2px 0 0; color: #10203b; font-size: 18px; font-weight: 950; }
.team-season-result-card > header p { margin: 2px 0 0; color: #64748b; font-size: 9px; font-weight: 750; }
.team-season-result-card > header > strong { flex: 0 0 auto; color: var(--team-primary-dark); font-size: 22px; font-weight: 950; text-align: right; }
.team-season-result-card > header > strong small { display: block; color: #64748b; font-size: 8px; font-weight: 850; }
.team-season-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-top: 1px solid #e2e8f0; background: #e2e8f0; }
.team-season-summary div { min-width: 0; padding: 9px 5px; background: white; text-align: center; }
.team-season-summary b, .team-season-summary span { display: block; }
.team-season-summary b { color: #10203b; font-size: 13px; font-weight: 950; }
.team-season-summary span { margin-top: 2px; color: #64748b; font-size: 7px; font-weight: 800; }
.team-season-table-wrap { overflow-x: auto; border-top: 1px solid #e2e8f0; -webkit-overflow-scrolling: touch; }
.team-season-table-wrap table { width: max(100%, 920px); border-collapse: collapse; color: #334155; font-size: 9px; white-space: nowrap; }
.team-season-table-wrap th, .team-season-table-wrap td { border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 8px 9px; text-align: right; }
.team-season-table-wrap th { position: sticky; top: 0; background: #f1f5f9; color: #475569; font-size: 8px; font-weight: 950; text-transform: uppercase; }
.team-season-table-wrap th:first-child, .team-season-table-wrap th:nth-child(2), .team-season-table-wrap td:first-child, .team-season-table-wrap td:nth-child(2) { text-align: left; }
.team-season-table-wrap td button { border: 0; padding: 0; background: transparent; color: var(--team-primary-dark); font: inherit; font-weight: 950; text-decoration: underline; }
.team-season-table-wrap td b { display: inline-grid; width: 20px; height: 20px; place-items: center; border-radius: 999px; color: white; font-size: 8px; }
.team-season-table-wrap td b.is-win { background: #15803d; }
.team-season-table-wrap td b.is-loss { background: #be123c; }
.team-season-table-wrap td b.is-draw { background: #64748b; }
.team-season-table-wrap td button.team-season-delete { width: 24px; height: 24px; border: 1px solid #fecaca; border-radius: 7px; background: #fff5f5; color: #be123c; font-size: 14px; text-decoration: none; }

.report-action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-action-buttons > button { min-height: 42px; border-radius: 10px; padding: 8px 14px; font-size: 12px; font-weight: 900; }
.report-action-buttons .report-delete-match { border: 1px solid #fda4af; background: #fff1f2; color: #be123c; }
.report-action-buttons .report-delete-match.hidden { display: none; }

.team-lineup-planner:not(.hidden) {
    position: fixed;
    inset: var(--site-banner-height) 0 0;
    z-index: 220;
    display: block;
    overflow-y: auto;
    padding: 14px max(10px, env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: #f4f7fb;
    color: #10203b;
}
.team-lineup-planner-content { width: min(100%, 940px); margin: 0 auto; }
.team-lineup-bottom-nav { z-index: 225; }
.team-lineup-help { margin: 0 0 10px; border-radius: 12px; padding: 10px 12px; background: #e8eefc; color: #30415f; font-size: 11px; font-weight: 750; line-height: 1.4; }
.team-lineup-grid { overflow: hidden; border: 1px solid #cbd5e1; border-radius: 14px; background: white; box-shadow: 0 5px 16px rgba(15, 23, 42, .08); }
.team-lineup-row { display: grid; grid-template-columns: minmax(86px, 1.25fr) repeat(4, minmax(51px, 1fr)); }
.team-lineup-row + .team-lineup-row { border-top: 1px solid #e2e8f0; }
.team-lineup-header { position: sticky; top: -1px; z-index: 2; background: #e8eefc; }
.team-lineup-row > * { min-width: 0; border-right: 1px solid #e2e8f0; }
.team-lineup-row > :last-child { border-right: 0; }
.team-lineup-player { display: flex; min-height: 50px; align-items: center; justify-content: center; padding: 5px 7px; text-align: center; }
.team-lineup-player strong { display: -webkit-box; overflow: hidden; font-size: 10px; font-weight: 950; line-height: 1.15; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.team-lineup-availability { width: 100%; border: 0; border-radius: 0; background: white; color: #10203b; }
.team-lineup-row.is-unavailable { background: #e2e8f0; }
.team-lineup-row.is-unavailable .team-lineup-availability, .team-lineup-row.is-unavailable .team-lineup-cell { background: #e2e8f0; color: #64748b; }
.team-lineup-row.is-unavailable .team-lineup-availability strong { color: #64748b; text-decoration: line-through; }
.team-lineup-row.is-unavailable .team-lineup-cell { opacity: .5; }
.team-lineup-temporary-name { display: block; padding: 4px; }
.team-lineup-temporary-name input { width: 100%; min-width: 0; height: 38px; border: 1px solid #b8c5d8; border-radius: 7px; padding: 0 6px; background: white; color: #10203b; font-size: 9px; font-weight: 850; }
.team-lineup-header .team-lineup-player, .team-lineup-quarter-heading { min-height: 42px; justify-content: center; color: #30415f; font-size: 11px; font-weight: 950; text-align: center; }
.team-lineup-cell { display: flex; min-height: 50px; align-items: stretch; justify-content: stretch; border: 0; border-radius: 0; padding: 4px; background: #fff; color: #64748b; }
.team-lineup-cell:active { background: #e8eefc; }
.team-lineup-empty { display: grid; width: 100%; min-height: 38px; place-items: center; border: 1px dashed #cbd5e1; border-radius: 8px; color: #94a3b8; font-size: 17px; }
.team-lineup-badge { display: grid; width: 100%; min-height: 38px; place-items: center; border: 1px solid var(--team-primary-dark); border-radius: 8px; padding: 0; background: var(--team-primary); color: var(--team-foreground); font-size: 10px; font-weight: 950; }
.team-lineup-copy-row { background: #f8fafc; }
.team-lineup-copy-row .team-lineup-player, .team-lineup-copy-cell { min-height: 44px; }
.team-lineup-copy-cell { display: grid; place-items: center; }
.team-lineup-copy-cell button { display: grid; width: calc(100% - 8px); height: 32px; place-items: center; border: 1px solid #b8c5d8; border-radius: 8px; background: white; color: var(--team-primary-dark); font-size: 21px; font-weight: 950; line-height: 1; }
.team-lineup-empty-roster { grid-template-columns: 1fr; }
.team-lineup-add-row { background: #f8fafc; }
.team-lineup-add-row .team-lineup-player { padding: 5px; }
.team-lineup-add-row .team-lineup-player > button { width: 100%; min-height: 34px; border: 1px dashed var(--team-primary-dark); border-radius: 8px; background: white; color: var(--team-primary-dark); font-size: 8px; font-weight: 950; line-height: 1.15; }
.team-lineup-add-row .team-lineup-player > button:disabled { border-color: #cbd5e1; color: #94a3b8; }
.team-lineup-save-error { border-color: #fecaca; background: #fee2e2; color: #991b1b; }

.team-lineup-position-modal:not(.hidden) { position: fixed; inset: 0; z-index: 230; display: flex; align-items: flex-end; justify-content: center; padding: 14px max(14px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: rgba(15, 23, 42, .58); backdrop-filter: blur(5px); }
.team-lineup-position-panel { width: min(100%, 430px); border: 1px solid #cbd5e1; border-radius: 20px; padding: 16px; background: white; color: #10203b; box-shadow: 0 22px 55px rgba(15, 23, 42, .3); }
.team-lineup-position-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.team-lineup-position-panel header h2 { margin-top: 2px; font-size: 22px; font-weight: 950; }
.team-lineup-position-panel header p { margin-top: 3px; color: #64748b; font-size: 12px; font-weight: 850; }
.team-lineup-position-panel header > button { min-width: 64px; height: 40px; border: 1px solid #cbd5e1; border-radius: 11px; padding: 0 11px; background: #f8fafc; color: #475569; font-size: 11px; font-weight: 900; }
.team-lineup-position-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.team-lineup-position-options button { display: grid; min-height: 58px; place-items: center; align-content: center; gap: 2px; border: 1px solid var(--team-primary-dark); border-radius: 11px; background: var(--team-primary); color: var(--team-foreground); }
.team-lineup-position-options button strong { font-size: 13px; font-weight: 950; }
.team-lineup-position-options button:not(.team-lineup-position-clear) strong { display: flex; align-items: center; justify-content: center; gap: 7px; }
.team-lineup-position-options button:not(.team-lineup-position-clear) strong b { min-width: 29px; border-radius: 999px; padding: 4px 5px; background: rgba(255,255,255,.9); color: #475569; font-size: 10px; font-weight: 950; font-variant-numeric: tabular-nums; }
.team-lineup-position-options button:not(.team-lineup-position-clear) strong b.is-positive { background: #dcfce7; color: #166534; }
.team-lineup-position-options button:not(.team-lineup-position-clear) strong b.is-close { background: #fef3c7; color: #92400e; }
.team-lineup-position-options button:not(.team-lineup-position-clear) strong b.is-negative { background: #fee2e2; color: #b91c1c; }
.team-lineup-position-options button small { font-size: 7px; font-weight: 850; letter-spacing: .02em; text-transform: uppercase; }
.team-lineup-position-options button.is-used { border-color: #1e293b; background: #475569; color: #e2e8f0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.team-lineup-position-options button.is-used small { color: #cbd5e1; }
.team-lineup-position-options button[aria-pressed="true"] { outline: 3px solid #f59e0b; outline-offset: 1px; }
.team-lineup-position-options button.team-lineup-position-clear { border-color: #cbd5e1; background: #f1f5f9; color: #475569; }
.team-lineup-position-options button.team-lineup-position-clear strong { font-size: 22px; line-height: 1; }
@media (min-width: 700px) { .team-lineup-position-modal:not(.hidden) { align-items: center; } }

.report-section-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #d6deea;
    padding: 9px 0;
    background: white;
}
.report-section-header.hidden { display: none; }
.report-section-header button {
    min-height: 40px;
    border: 1px solid #c8d3e2;
    border-radius: 10px;
    padding: 0 12px;
    background: #f8fafc;
    color: #10203b;
    font-size: 12px;
    font-weight: 900;
}
.report-section-header h2 {
    grid-column: 2;
    margin: 0;
    color: #10203b;
    font-size: 15px;
    font-weight: 950;
    text-align: center;
}

.match-story-card {
    position: relative;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--team-primary, #744577) 30%, #dbe3ee);
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--team-primary, #744577) 12%, transparent) 0, transparent 42%),
        #fff;
}
.match-story-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--team-primary, #744577);
    content: '';
}
.match-story-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #dbe3ee;
    padding: 1px 0 10px 7px;
}
.match-story-heading h3 {
    margin: 1px 0 0;
    color: #10203b;
    font-size: 20px;
    font-weight: 950;
    letter-spacing: -.02em;
    text-transform: none;
}
.match-story-eyebrow {
    color: var(--team-primary-dark, #563258);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.match-story-stat-badge {
    flex: 0 0 auto;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 5px 8px;
    background: #f8fafc;
    color: #52627a;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.match-story-copy {
    padding: 13px 7px 4px;
    color: #263650;
    font-size: 14px;
    font-weight: 720;
    line-height: 1.58;
}
.match-story-section { padding: 0; }
.match-story-section p { margin: 0; }
.match-story-summary {
    color: #10203b;
}
.match-story-note {
    margin: 9px 7px 0;
    color: #718096;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.player-editor-content { display: grid; gap: 12px; }
.player-editor-season-fieldset { margin: 0; border: 1px solid #c8d3e2; border-radius: 12px; padding: 11px; }
.player-editor-season-fieldset legend { padding: 0 5px; color: #4c5e78; font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.player-editor-seasons { display: grid; gap: 8px; }
.player-editor-seasons h4 { margin: 7px 0 0; color: #744577; font-size: 11px; font-weight: 950; text-transform: uppercase; letter-spacing: .04em; }
.player-editor-seasons label { display: flex; align-items: center; gap: 9px; min-height: 38px; color: #10203b; font-size: 12px; font-weight: 800; }
.player-editor-seasons input { width: 20px; height: 20px; accent-color: #744577; }
.player-editor-seasons p { margin: 0; color: #607089; font-size: 11px; font-weight: 700; }
.player-editor-save { min-height: 48px; border: 0; border-radius: 12px; background: #744577; color: white; font-size: 14px; font-weight: 950; }

#player-cards-screen:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 36;
    display: block;
    overflow-y: auto;
    background: var(--solo-bg, #f4f7fb);
    color: var(--solo-ink, #10203b);
    padding:
        calc(14px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(24px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
}
.player-cards-content { width: min(100%, 760px); margin: 0 auto; }
.player-cards-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.player-cards-hero {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    border-radius: 18px;
    padding: 16px;
    background: #744577;
    color: white;
}
.player-cards-hero h3 { margin: 0; font-size: clamp(21px, 5vw, 29px); font-weight: 950; line-height: 1.05; }
.player-cards-hero p { margin: 5px 0 0; color: #eee5ef; font-size: 12px; font-weight: 700; }
.player-cards-hero > strong {
    display: grid;
    min-width: 58px;
    min-height: 58px;
    place-items: center;
    border-radius: 13px;
    background: white;
    color: #744577;
    font-size: 25px;
    font-weight: 950;
}
.player-cards-avatar {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 2px solid white;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    font-size: 25px;
    font-weight: 950;
}
.player-cards-position-tabs {
    display: flex;
    gap: 7px;
    margin: 12px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}
.player-cards-position-tabs button {
    flex: 1 0 58px;
    min-height: 44px;
    border: 1px solid #c8d3e2;
    border-radius: 11px;
    background: white;
    color: #10203b;
    font-size: 14px;
    font-weight: 950;
}
.player-cards-position-tabs button[aria-selected="true"] { border-color: #744577; background: #744577; color: white; }
.player-cards-position-tabs p { width: 100%; margin: 0; color: #607089; font-size: 12px; font-weight: 700; }
.player-cards-detail { display: grid; gap: 10px; }
.player-cards-comparison-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 105px 112px;
    gap: 8px;
    padding: 0 13px;
    color: #607089;
    font-size: 10px;
    font-weight: 900;
    text-align: right;
}
.player-cards-comparison-head span { text-align: left; }
.player-cards-comparison-head strong:nth-child(2) { color: #744577; }
.player-cards-comparison-head strong:nth-child(3) { color: #438d7c; }
.player-cards-stat-section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d6deea;
    border-radius: 16px;
    background: white;
    box-shadow: 0 3px 10px rgba(25, 48, 83, .06);
}
.player-cards-stat-section > h3 {
    margin: 0;
    padding: 13px 14px 9px;
    color: #744577;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.player-card-zone { display: block; width: min(100%, 470px); margin: 2px auto 14px; padding: 0 14px; }
.player-card-zone text { fill: #10203b; font-size: 3px; font-weight: 900; }
.player-cards-stat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 94px 98px 10px;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 51px;
    border: 0;
    border-top: 1px solid #edf1f6;
    padding: 8px 12px 8px 14px;
    background: white;
    color: #10203b;
    text-align: right;
}
.player-cards-stat-row > span { display: grid; gap: 2px; font-size: 12px; font-weight: 800; text-align: left; }
.player-cards-stat-row > span small { color: #64748b; font-size: 8px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.player-cards-stat-row strong { font-size: 13px; font-weight: 950; font-variant-numeric: tabular-nums; }
.player-cards-stat-row .player-cards-stat-value {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 1px;
    border-radius: 9px;
    padding: 5px 4px;
    background: #eef2f7;
    color: #475569;
    line-height: 1.05;
}
.player-cards-stat-row .player-cards-stat-value small {
    overflow: hidden;
    max-width: 100%;
    color: currentColor;
    font-size: 7px;
    font-style: normal;
    font-weight: 850;
    opacity: .72;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.player-cards-stat-row .player-cards-stat-value.is-positive { background: #dcfce7; color: #166534; }
.player-cards-stat-row .player-cards-stat-value.is-close { background: #fef3c7; color: #92400e; }
.player-cards-stat-row .player-cards-stat-value.is-negative { background: #fee2e2; color: #b91c1c; }
.player-cards-stat-row .player-cards-stat-value.is-neutral { background: #f1f5f9; color: #64748b; }
.player-cards-stat-row .player-cards-stat-value.is-benchmark { background: #e8eef5; color: #334155; }
.player-cards-stat-row b { color: #607089; font-size: 18px; }
.player-cards-sample,
.player-cards-empty {
    margin: 0;
    border-radius: 13px;
    padding: 13px;
    background: #f1eaf3;
    color: #512e54;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}
.player-cards-trend {
    margin-top: 12px;
    border: 1px solid #d6deea;
    border-radius: 16px;
    padding: 14px;
    background: white;
    box-shadow: 0 4px 14px rgba(25,48,83,.08);
}
.player-cards-trend header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.player-cards-trend header button { min-height: 42px; border: 1px solid #c8d3e2; border-radius: 11px; padding: 0 12px; background: #f8fafc; color: #10203b; font-weight: 900; }
.player-cards-trend header span { color: #607089; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.player-cards-trend h3 { margin: 2px 0 0; color: #10203b; font-size: 19px; font-weight: 950; }
.player-cards-trend-values { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: baseline; gap: 6px; margin: 15px 0 5px; }
.player-cards-trend-values strong { color: #744577; font-size: 22px; font-weight: 950; }
.player-cards-trend-values strong:nth-of-type(2) { color: #438d7c; }
.player-cards-trend-values span { color: #607089; font-size: 10px; font-weight: 700; }
.player-cards-trend svg { display: block; width: 100%; height: auto; }
.player-cards-trend svg line { stroke: #d6deea; stroke-width: 1.5; }
.player-cards-trend svg .chart-grid { stroke: #e8edf4; stroke-width: 1; }
.player-cards-trend svg .chart-axis { stroke: #9aa8bb; stroke-width: 1.5; }
.player-cards-trend svg text { fill: #607089; font-size: 10px; }
.player-cards-trend svg .chart-axis-label { font-size: 9px; font-weight: 800; }
.player-cards-trend svg .chart-axis-title { fill: #33445f; font-size: 11px; font-weight: 900; }
.player-cards-trend svg path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.player-cards-trend svg .player-line { stroke: #744577; }
.player-cards-trend svg .team-line { stroke: #84c5b1; stroke-dasharray: 9 7; }
.player-cards-trend svg circle.player-point { fill: #744577; stroke: white; stroke-width: 2; }
.player-cards-trend svg circle.team-point { fill: #84c5b1; stroke: white; stroke-width: 2; }
.player-cards-trend-legend { display: flex; flex-wrap: wrap; gap: 14px; color: #10203b; font-size: 11px; font-weight: 800; }
.player-cards-trend-legend span::before { content: ''; display: inline-block; width: 19px; height: 3px; margin-right: 6px; vertical-align: middle; background: #744577; }
.player-cards-trend-legend .team::before { background: #84c5b1; }
.player-cards-trend > p { margin: 13px 0 0; border-radius: 11px; padding: 11px; background: #f1eaf3; color: #512e54; font-size: 11px; font-weight: 700; }

@media (max-width: 520px) {
    .player-cards-filters { grid-template-columns: 1fr; }
    .player-cards-hero { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 13px; }
    .player-cards-avatar { width: 56px; height: 56px; font-size: 21px; }
    .player-cards-hero > strong { min-width: 50px; min-height: 50px; font-size: 21px; }
    .player-cards-comparison-head { grid-template-columns: minmax(0, 1fr) 78px 82px; padding-inline: 9px; font-size: 9px; }
    .player-cards-stat-row { grid-template-columns: minmax(0, 1fr) 69px 73px 8px; gap: 5px; padding-inline: 10px 8px; }
    .player-cards-stat-row > span { font-size: 11px; }
    .player-cards-stat-row > span small { font-size: 7px; }
    .player-cards-stat-row strong { font-size: 11px; }
    .player-cards-trend-values { grid-template-columns: auto 1fr; }
}

.competition-empty-message {
    margin: 12px 0 0;
    border: 1px dashed #b8c5d8;
    border-radius: 12px;
    padding: 13px;
    color: #607089;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}
.competition-opponent-heading { margin: 16px 0 8px; }
.competition-opponent-heading h4 { margin-top: 2px; color: #10203b; font-size: 15px; font-weight: 950; }
.competition-opponent-list { display: grid; gap: 7px; margin-top: 10px; }
.competition-opponent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #d6deea;
    border-radius: 11px;
    padding: 9px 10px;
    background: #f9fbfe;
}
.competition-opponent-item strong { color: #10203b; font-size: 13px; }
.competition-opponent-item small { display: block; color: #607089; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.competition-opponent-item span { margin-left: 6px; color: #607089; font-size: 10px; font-weight: 800; }
.competition-opponent-item .league-opponent-logo { width: 40px; height: 40px; flex: 0 0 40px; margin-left: 0; overflow: hidden; border-radius: 50%; }
.league-opponent-identity { min-width: 0; flex: 1 1 auto; }
.league-opponent-identity strong,
.league-opponent-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-opponent-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; }
.competition-opponent-item button {
    border: 0;
    padding: 6px;
    background: transparent;
    color: #315f9f;
    font-size: 11px;
    font-weight: 900;
}
.competition-opponent-list > p { color: #607089; font-size: 11px; font-style: italic; }

/* Current-team league and opponent editor. */
.league-workspace-step { display: grid; gap: 8px; }
.league-workspace-full-action {
    width: 100%;
    min-height: 50px;
    border: 1px solid #1d4ed8;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    font-size: 14px;
    font-weight: 950;
}
.league-workspace-full-action:disabled { border-color: #cbd5e1; background: #e2e8f0; color: #94a3b8; }
.league-workspace-delete-season { border-color: #e5a1a1; background: #fff5f5; color: #b42323; }
.league-existing-opponent-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 9px;
    margin: 10px 0 4px;
    border: 1px solid #c8d3e2;
    border-radius: 12px;
    padding: 10px;
    background: #f7f9fd;
}
.league-existing-opponent-row.hidden { display: none; }
.league-existing-opponent-row button {
    min-height: 46px;
    border: 1px solid #33445f;
    border-radius: 10px;
    padding: 0 13px;
    background: #33445f;
    color: white;
    font-size: 12px;
    font-weight: 900;
}
.league-existing-opponent-row button:disabled { opacity: .5; }
.league-editor-modal:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding:
        calc(18px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(18px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
    background: rgba(15, 27, 48, .82);
    backdrop-filter: blur(5px);
}
.league-editor-panel {
    width: min(100%, 520px);
    margin-block: auto;
    display: grid;
    gap: 14px;
    border-radius: 18px;
    padding: 18px;
    background: var(--solo-bg, #f4f7fb);
    box-shadow: 0 18px 50px rgba(15, 27, 48, .3);
}
.league-editor-panel h2 { margin: 0; color: #10203b; font-size: 21px; font-weight: 950; }
.league-team-editor-fields { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 10px; }
.league-team-editor-fields .team-theme-fieldset { margin-top: 4px; }
.league-editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.league-editor-actions button {
    min-height: 48px;
    border: 1px solid #c8d3e2;
    border-radius: 11px;
    background: white;
    color: #30415f;
    font-size: 13px;
    font-weight: 950;
}
.league-editor-actions button:last-child { border-color: #1d4ed8; background: #2563eb; color: white; }
.league-opponent-delete { color: #b91c1c !important; }
.match-opponent-selector { margin-bottom: 10px; }

#opponent-history-screen:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% -10%, rgba(132, 197, 177, .18), transparent 34%),
        var(--solo-bg, #f4f7fb);
    color: var(--solo-ink, #10203b);
    padding:
        calc(14px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(24px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
}
.opponent-history-content { width: min(100%, 760px); margin: 0 auto; }
.opponent-history-abbrev { border-radius: 10px; padding: 8px 10px; background: var(--solo-team-b, #84C5B1); color: var(--opponent-foreground, #10203b); font-size: 12px; font-weight: 950; }
.opponent-history-filter,
.opponent-history-summary,
.opponent-history-reports {
    border: 1px solid var(--solo-border, #d6deea);
    border-radius: 16px;
    background: white;
    box-shadow: 0 3px 10px rgba(25, 48, 83, .07);
}
.opponent-history-filter { padding: 14px; }
.opponent-history-filter select { min-height: 46px; }
.opponent-history-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin-top: 12px; background: #d9e2ee; }
.opponent-history-summary div { display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 14px 5px; background: white; }
.opponent-history-summary strong { color: #10203b; font-size: 24px; font-weight: 950; font-variant-numeric: tabular-nums; }
.opponent-history-summary span { margin-top: 2px; color: #607089; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.opponent-history-reports { margin-top: 12px; padding: 15px; }
.opponent-history-reports h3 { margin-top: 2px; color: #10203b; font-size: 18px; font-weight: 950; }
.opponent-history-list { display: grid; gap: 9px; margin-top: 12px; }
.opponent-history-match { overflow: hidden; border: 1px solid #d6deea; border-radius: 13px; background: #f9fbfe; }
.opponent-history-match button { display: grid; width: 100%; gap: 5px; padding: 13px; color: #10203b; text-align: left; }
.opponent-history-match button > span { color: #607089; font-size: 9px; font-weight: 800; }
.opponent-history-match button > strong { font-size: 16px; font-weight: 950; font-variant-numeric: tabular-nums; }
.opponent-history-match button > small { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #607089; font-size: 10px; font-weight: 750; }
.opponent-history-match button > small b { color: #2563eb; font-weight: 900; white-space: nowrap; }
.opponent-history-empty { border: 1px dashed #b9c5d7; border-radius: 13px; padding: 20px; color: #607089; text-align: center; }
.opponent-history-empty strong { display: block; color: #30415f; font-size: 13px; }
.opponent-history-empty p { margin-top: 4px; font-size: 11px; line-height: 1.45; }
@media (min-width: 700px) {
    .opponent-history-list { grid-template-columns: 1fr 1fr; }
}

.team-danger-section,
.team-deleted-section {
    margin-top: 12px;
    padding: 15px;
}
.team-danger-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-color: #efb4b4;
    background: #fff8f8;
}
.team-danger-section h3,
.team-deleted-section h3 {
    margin-top: 2px;
    color: #10203b;
    font-size: 17px;
    font-weight: 950;
}
.team-danger-section p,
.team-deleted-section p {
    margin-top: 5px;
    color: #607089;
    font-size: 11px;
    line-height: 1.4;
}
.team-danger-section button,
.team-deleted-item button {
    min-height: 44px;
    border: 1px solid #b91c1c;
    border-radius: 11px;
    padding: 0 13px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.team-danger-section button:disabled { opacity: .45; }
#team-deleted-list { display: grid; gap: 8px; margin-top: 12px; }
.team-deleted-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #d6deea;
    border-radius: 12px;
    padding: 10px;
    background: #f9fbfe;
}
.team-deleted-item strong { display: block; color: #10203b; font-size: 13px; }
.team-deleted-item span { color: #607089; font-size: 10px; }
@media (max-width: 480px) {
    .team-danger-section { align-items: stretch; flex-direction: column; }
    .team-deleted-item { align-items: stretch; flex-direction: column; }
}

.match-setup-overlay:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding:
        calc(16px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(16px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
    background: rgba(15, 32, 59, .58);
    backdrop-filter: blur(8px);
}
.match-setup-panel {
    width: min(100%, 480px);
    border: 1px solid #d1dbea;
    border-radius: 20px;
    padding: 18px;
    background: var(--solo-bg, #f4f7fb);
    color: #10203b;
    box-shadow: 0 24px 60px rgba(15, 32, 59, .28);
}
.match-setup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.match-setup-header h2 {
    margin-top: 2px;
    font-size: 24px;
    font-weight: 950;
    letter-spacing: -.025em;
}
.match-setup-close {
    width: 44px;
    height: 44px;
    border: 1px solid #c8d3e2;
    border-radius: 12px;
    background: white;
    color: #30415f;
    font-size: 25px;
    line-height: 1;
}
.match-setup-intro {
    margin: 8px 0 14px;
    color: #607089;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}
.match-versus-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    margin-bottom: 14px;
}
.match-team-preview {
    min-width: 0;
    min-height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    border-radius: 14px;
    padding: 10px;
    text-align: center;
}
.match-team-preview span { font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.match-team-preview strong { width: 100%; margin-top: 6px; overflow: hidden; font-size: 14px; font-weight: 950; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.match-team-home { border-color: #8bc996; background: #e8f7e9; color: #14532d; }
.match-team-away { border-color: #f3a0a0; background: #ffe9e9; color: #8f1717; }
.match-versus-mark { align-self: center; color: #607089; font-size: 10px; font-weight: 950; }
.match-season-selector { margin-bottom: 10px; }
.match-schedule-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.match-schedule-fields .form-field { min-width: 0; overflow: hidden; }
.match-schedule-fields input { box-sizing: border-box; width: 100%; min-width: 0 !important; max-width: 100%; padding-right: 7px; padding-left: 7px; }
.match-schedule-fields input::-webkit-date-and-time-value { min-width: 0; text-align: left; }
.match-schedule-now { width: 100%; min-height: 42px; margin: -1px 0 10px; border: 1px solid #93a9c8; border-radius: 11px; background: #edf3ff; color: #1d4ed8; font-size: 12px; font-weight: 950; }
.match-opponent-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 10px;
}
.match-setup-actions { display: grid; grid-template-columns: .8fr 1.25fr 1.25fr; gap: 8px; margin-top: 17px; }
.match-setup-cancel,
.match-setup-queue,
.match-setup-start {
    min-height: 50px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 950;
}
.match-setup-cancel { border-color: #c8d3e2; background: white; color: #30415f; }
.match-setup-queue { border-color: #744577; background: #f4eaf4; color: #5c315f; }
.match-setup-start { border-color: #1d4ed8; background: linear-gradient(180deg, #4f83ee, #2563eb); color: white; box-shadow: 0 4px 11px rgba(37, 99, 235, .2); }
.match-setup-start:disabled { border-color: #cbd5e1; background: #e2e8f0; color: #94a3b8; box-shadow: none; cursor: not-allowed; }
.subscreen-back:active,
.match-setup-close:active,
.match-setup-cancel:active,
.match-setup-queue:active,
.match-setup-start:active { transform: scale(.98); }

@media (min-width: 700px) {
    .team-roster-list { grid-template-columns: 1fr 1fr; column-gap: 14px; }
    .team-roster-labels { display: none; }
    .team-roster-heading { margin-bottom: 13px; }
}

@media (max-width: 390px) {
    .subscreen-header { grid-template-columns: auto minmax(0, 1fr); }
    .subscreen-saved { display: none; }
    .team-identity-fields { grid-template-columns: minmax(0, 1fr) 92px; }
    .team-roster-heading > span { display: none; }
    .match-setup-panel { padding: 15px; }
	.resume-match-lower { gap: 8px; }
	.resume-match-clock-group { gap: 4px; }
	.resume-match-clock-state { padding-inline: 6px; font-size: 8px; }
	.active-match-action { padding-inline: 10px; }
    .match-opponent-fields { grid-template-columns: minmax(0, 1fr) 92px; }
    .league-team-editor-fields { grid-template-columns: minmax(0, 1fr) 88px; }
}

@media (max-width: 480px) {
    .match-schedule-fields { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media (max-height: 620px) {
    .match-setup-overlay:not(.hidden) { align-items: flex-start; }
    .match-team-preview { min-height: 70px; }
    .match-setup-intro { margin-bottom: 10px; }
}

/* Milestone 12.2 shared confirmation dialog. */
.confirmation-overlay:not(.hidden) {
    position: fixed;
    inset: 0;
    /* Confirmations can be opened from account reconciliation (250) and other
       nested dialogs, so this shared layer must remain above every caller. */
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding:
        calc(16px + env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        calc(16px + env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
    background: rgba(15, 32, 59, .58);
    backdrop-filter: blur(8px);
}

.confirmation-panel {
    width: min(100%, 390px);
    border: 1px solid #d1dbea;
    border-radius: 20px;
    padding: 20px;
    background: #f9fbfe;
    color: #10203b;
    box-shadow: 0 24px 60px rgba(15, 32, 59, .28);
    text-align: center;
}

.confirmation-symbol {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin: 0 auto 11px;
    border: 1px solid #a9bee7;
    border-radius: 14px;
    background: #edf3ff;
    color: #1d4ed8;
    font-size: 22px;
    font-weight: 950;
}

.confirmation-overlay[data-tone="danger"] .confirmation-symbol {
    border-color: #f3a0a0;
    background: #ffe9e9;
    color: #a61b1b;
}

.confirmation-eyebrow {
    display: block;
    color: #607089;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.confirmation-panel h3 {
    margin-top: 4px;
    color: #10203b;
    font-size: 20px;
    font-weight: 950;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.confirmation-panel p {
    margin: 10px auto 0;
    color: #53657f;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.overtime-panel { display: grid; gap: 14px; }
.overtime-panel .confirmation-actions { margin-top: 4px; }
.overtime-super-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}
.overtime-super-field input { width: 22px; height: 22px; flex: 0 0 auto; }

.confirmation-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 10px;
    margin-top: 19px;
}

.confirmation-overlay[data-choices="three"] .confirmation-actions { grid-template-columns: 1fr; }
.confirmation-overlay[data-choices="three"] #confirm-btn-yes { grid-row: 1; }
.dashboard-backup-now {
    min-height: 44px; padding: 8px 14px; border: 1px solid #a3b8db;
    border-radius: 10px; background: white; color: #173f89;
    font-size: 12px; font-weight: 800; cursor: pointer;
}
.dashboard-pro-attention { flex-wrap: wrap; }
.dashboard-pro-attention .dashboard-backup-now { margin-left: auto; }
.dashboard-data-status .dashboard-backup-now { grid-column: 1 / -1; margin-top: 8px; }

.confirmation-cancel,
.confirmation-proceed {
    min-height: 50px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 950;
}

.confirmation-cancel {
    border-color: #c8d3e2;
    background: white;
    color: #30415f;
}

.confirmation-proceed {
    border-color: #1d4ed8;
    background: linear-gradient(180deg, #4f83ee, #2563eb);
    color: white;
    box-shadow: 0 4px 11px rgba(37, 99, 235, .2);
}

.confirmation-overlay[data-tone="danger"] .confirmation-proceed {
    border-color: #a61b1b;
    background: linear-gradient(180deg, #e54c4c, #c62828);
    box-shadow: 0 4px 11px rgba(198, 40, 40, .2);
}

.confirmation-proceed:disabled { cursor: not-allowed; opacity: .45; }

.confirmation-cancel:active,
.confirmation-proceed:active { transform: scale(.98); }

@media (max-width: 390px) {
    .confirmation-panel { padding: 18px 15px 15px; }
}

@media (max-height: 500px) {
    .confirmation-overlay:not(.hidden) { align-items: flex-start; }
    .confirmation-symbol { width: 38px; height: 38px; margin-bottom: 7px; }
    .confirmation-actions { margin-top: 14px; }
}

/* Team identity assets retain a strong colour/abbreviation fallback while an
   independently cached logo is loading or unavailable offline. */
.netball-team-logo {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-width: 40px;
    min-height: 40px;
    overflow: hidden;
    border-radius: inherit;
    isolation: isolate;
}

.netball-team-logo-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #2929c9;
    color: #fff;
    font-weight: 900;
    letter-spacing: .02em;
}

.netball-team-logo[data-team-theme="red"] .netball-team-logo-fallback { background: #c81919; }
.netball-team-logo[data-team-theme="orange"] .netball-team-logo-fallback { background: #ff9f1c; color: #111; }
.netball-team-logo[data-team-theme="amber"] .netball-team-logo-fallback { background: #e3e31c; color: #111; }
.netball-team-logo[data-team-theme="lime"] .netball-team-logo-fallback { background: #80e31c; color: #111; }
.netball-team-logo[data-team-theme="emerald"] .netball-team-logo-fallback { background: #1fbf64; color: #111; }
.netball-team-logo[data-team-theme="teal"] .netball-team-logo-fallback { background: #159b9d; color: #fff; }
.netball-team-logo[data-team-theme="sky"] .netball-team-logo-fallback { background: #32c7e8; color: #111; }
.netball-team-logo[data-team-theme="blue"] .netball-team-logo-fallback { background: #1970c8; }
.netball-team-logo[data-team-theme="violet"] .netball-team-logo-fallback { background: #7019c8; }
.netball-team-logo[data-team-theme="fuchsia"] .netball-team-logo-fallback { background: #c819c8; }
.netball-team-logo[data-team-theme="rose"] .netball-team-logo-fallback { background: #e35a99; color: #111; }
.netball-team-logo[data-team-theme="brown"] .netball-team-logo-fallback { background: #8b5e3c; }
.netball-team-logo[data-team-theme="blush"] .netball-team-logo-fallback { background: #f5a3c7; color: #111; }

.netball-team-logo img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    padding: 5%;
    object-fit: contain;
    background: rgba(255,255,255,.92);
}

.team-logo-editor {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #d8e1ef;
    border-radius: 14px;
    background: #f8fbff;
}

.team-logo-editor-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #d4deed;
    background: #fff;
}

.team-logo-editor strong,
.team-logo-editor small { display: block; }
.team-logo-editor small { margin-top: 3px; color: #63708a; line-height: 1.35; }
.team-logo-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.team-logo-editor-actions button { min-height: 38px; padding: 7px 13px; border: 1px solid #3a68d8; border-radius: 9px; background: #fff; color: #184abf; font-weight: 800; }
.team-logo-editor-actions button:disabled { opacity: .42; }
.logo-save-first { display: grid; place-items: center; width: 100%; height: 100%; padding: 7px; color: #6b7280; font-size: 10px; text-align: center; }

@media (max-width: 560px) {
    .team-logo-editor { grid-template-columns: 64px minmax(0, 1fr); padding: 10px; }
    .team-logo-editor-preview { width: 60px; height: 60px; }
}
/* Ownership dialogs retain the shared ad-safe overlay and full-width fields. */
#team-transfer-form { display: grid; gap: 1rem; }
#team-transfer-role:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: #e5e7eb;
    color: #475569;
    -webkit-text-fill-color: #475569;
}
#team-transfer-modal .account-fine-print,
#account-transfer-section .account-fine-print {
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}
.team-transfer-confirm { display: flex; align-items: flex-start; gap: .65rem; font-size: .9rem; line-height: 1.5; }
.team-transfer-confirm input { flex: 0 0 auto; width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
.team-transfer-request { padding: 1rem 0; border-top: 1px solid #d8e0eb; }
.team-transfer-request p { margin: .5rem 0; }
.team-transfer-request .account-plan-actions { margin-top: .75rem; }
#team-transfer-offer-modal { z-index: 275; }
#team-transfer-offer-modal .account-dialog { width: min(100%, 580px); max-height: calc(100dvh - var(--site-banner-height) - 32px); display: flex; flex-direction: column; }
#team-transfer-offer-modal .account-dialog > header { flex-shrink: 0; }
#team-transfer-offer-modal .account-dialog-fields { overflow-y: auto; min-height: 0; }
#team-transfer-offer-modal h2 { font-size: clamp(18px, 4.5vw, 23px); }
#team-transfer-offer-modal .account-fine-print { color: #475569; font-size: 12px; line-height: 1.55; }
.team-transfer-offer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.team-transfer-offer-actions .account-primary-button { grid-column: 1 / -1; }
