		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;
}

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: #c87019; --team-primary-dark: #78430f; --team-accent: #f3cba6; --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; }

.dashboard-action-primary,
.match-setup-start,
.team-player-cards-button { background-color: var(--team-primary) !important; }
.dashboard-action-primary,
.match-setup-start,
.team-player-cards-button {
    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;
}

.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: #c87019; }
.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; }

/* 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 {
    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 {
    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-backup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.account-file-button { cursor: pointer; }

.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; }

.account-dialog {
    width: min(100%, 410px);
    overflow: hidden;
    border: 1px solid #d6dfec;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgb(15 32 59 / .35);
}

.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; }
}


.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="local_only"],
.sync-item[data-sync-status="server_copy"],
.sync-item[data-sync-status="blocked"] { border-color: rgb(190 24 93); }
.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-local_only, .sync-status-server_copy,
.sync-status-blocked { color: rgb(253 164 175); }

.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-phone-landscape-guard { display: none; }

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

.dashboard-brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #4f83ee, #2563eb);
    color: white;
    font-size: 27px;
    font-weight: 900;
    box-shadow: 0 5px 13px rgba(37, 99, 235, .22);
}

.dashboard-header h1 {
    color: #10203b;
    font-size: clamp(21px, 5vw, 28px);
    font-weight: 950;
    letter-spacing: -.025em;
    line-height: 1;
}

.dashboard-brand-copy { min-width: 0; }

.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: 1.15em; height: .95em; flex: 0 0 auto; align-items: center; justify-content: center; color: #dc2626; line-height: 1; filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .15)); vertical-align: -.04em; }
.match-cloud-status svg { display: block; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
.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; }
}

.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: 38px; height: 38px; border-radius: 12px; font-size: 24px; }
    .dashboard-header h1 { font-size: 19px; }
    .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; }
    .dashboard-active-main { align-items: stretch; 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: 34px; height: 34px; font-size: 21px; }
    .dashboard-header h1 { font-size: 17px; }
    .dashboard-account { min-height: 34px; padding: 0 5px; font-size: 9px; }
    .dashboard-account-icon { width: 14px; height: 14px; flex-basis: 14px; }
}

/* Phones use the same portrait-only boundary on the dashboard and tracker.
   Tablets and computers do not receive the dashboard-phone-device class. */
@media (orientation: landscape) {
    #main-dashboard:not(.hidden).dashboard-phone-device {
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    #main-dashboard:not(.hidden).dashboard-phone-device .dashboard-content {
        display: none;
    }
    #main-dashboard:not(.hidden).dashboard-phone-device .dashboard-phone-landscape-guard {
        display: flex;
        max-width: 560px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-align: center;
    }
    .dashboard-phone-landscape-guard h2 {
        margin: 0;
        color: var(--solo-ink, #10203b);
        font-size: clamp(22px, 6dvh, 34px);
        font-weight: 950;
        line-height: 1.05;
    }
    .dashboard-phone-landscape-guard p {
        margin: 0;
        color: var(--solo-muted, #607089);
        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 { font-size: 18px; line-height: 1; }
.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-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);
}
.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: #c87019; }
.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 > 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"]) > 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-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-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) 44px 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-delete { border-color: #fecdd3; color: #be123c; }
.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-player-cards-button {
    min-height: 42px;
    border: 1px solid #744577;
    border-radius: 11px;
    padding: 0 14px;
    background: #744577;
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.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 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 { 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-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 { 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 { 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-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-top: 1px solid #e2e8f0; padding: 9px; }
.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-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-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 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;
}
.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 { font-size: 12px; font-weight: 800; text-align: left; }
.player-cards-stat-row strong { font-size: 13px; font-weight: 950; font-variant-numeric: tabular-nums; }
.player-cards-stat-row strong:nth-child(2) { color: #744577; }
.player-cards-stat-row strong:nth-child(3) { color: #438d7c; }
.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 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 button {
    border: 0;
    padding: 6px;
    background: transparent;
    color: #b91c1c;
    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;
    /* Must sit above Account & Sync (170) when recovery requests confirmation. */
    z-index: 230;
    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;
}

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

.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; }
}
