/* Runtime skin for approved community leagues. Geometry comes from the shared
   domestic setup, season and commentary-match screens; only creator colours
   and the deliberately unavailable achievement/pitch surfaces are changed. */
:root {
  --community-league-canvas: #045d80;
  --community-league-header: #034864;
  --community-league-header-text: #ffffff;
  --community-league-header-muted: #d5ecf4;
  --community-league-panel: #176b89;
  --community-league-panel-raised: #0f5b78;
  --community-league-panel-soft: #1e7391;
  --community-league-text: #ffffff;
  --community-league-muted: #afd6e4;
  --community-league-border: #4aa5c6;
  --community-league-accent: #66cef0;
  --community-league-accent-text: #07131a;
}

html.route-community-league-loading,
html.route-community-league-loading body {
  min-height: 100%;
  background: var(--community-league-canvas);
}

html.route-community-league-loading #appShell { display: none !important; }
html.route-community-league-loading #premierLeagueSeasonScreen { display: block !important; }

body.community-league-route-setup-active {
  --domestic-setup-border: color-mix(in srgb, var(--community-league-accent) 54%, transparent);
  --domestic-setup-panel: linear-gradient(145deg, color-mix(in srgb, var(--community-league-panel) 94%, #fff 6%), var(--community-league-header));
  --domestic-setup-card: linear-gradient(180deg, color-mix(in srgb, var(--community-league-panel) 92%, #fff 8%), var(--community-league-panel));
  --domestic-setup-surface: color-mix(in srgb, var(--community-league-header) 90%, transparent);
  --domestic-setup-text: var(--community-league-text);
  --domestic-setup-muted: var(--community-league-muted);
  --domestic-setup-accent: var(--community-league-accent);
  --domestic-setup-accent-text: var(--community-league-accent-text);
  --domestic-setup-selected: linear-gradient(145deg, color-mix(in srgb, var(--community-league-accent) 78%, #fff 22%), var(--community-league-accent));
  --domestic-setup-shadow: color-mix(in srgb, var(--community-league-header) 72%, #000);
}

body.community-league-route-setup-active .pl-season-header,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header {
  --domestic-banner-border: color-mix(in srgb, var(--community-league-accent) 52%, transparent);
  --domestic-banner-surface: color-mix(in srgb, var(--community-league-header) 90%, transparent);
  --domestic-banner-text: var(--community-league-text);
  --domestic-banner-muted: var(--community-league-muted);
  --domestic-banner-active-text: var(--community-league-accent-text);
  --domestic-banner-active: var(--community-league-accent);
  --domestic-banner-shadow: color-mix(in srgb, var(--community-league-header) 72%, #000);
  --domestic-banner-brand-border: color-mix(in srgb, var(--community-league-text) 64%, transparent);
  --domestic-banner-brand-text: var(--community-league-accent-text);
  --domestic-banner-brand: linear-gradient(145deg, color-mix(in srgb, var(--community-league-accent) 74%, #fff 26%), var(--community-league-accent));
  --domestic-banner-brand-shadow: color-mix(in srgb, var(--community-league-header) 68%, #000);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex !important;
  min-height: 68px;
  align-items: center;
  gap: 8px;
  padding: 0 clamp(20px, 3vw, 52px);
  border-color: var(--domestic-banner-border);
  background: var(--community-league-header);
  backdrop-filter: none;
}

body.community-league-route-setup-active .pl-season-site-brand,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-site-brand {
  position: static;
  order: 1;
  margin: 0;
  transform: none;
}

body.community-league-route-setup-active .pl-season-site-brand .brand-mark,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-site-brand .brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--domestic-banner-brand-border);
  border-radius: 12px;
  color: var(--domestic-banner-brand-text);
  background: var(--domestic-banner-brand) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .4), 0 3px 0 var(--domestic-banner-brand-shadow) !important;
}

body.community-league-route-setup-active .pl-season-header-left,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header-left {
  position: static;
  order: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  transform: none;
}

body.community-league-route-setup-active .pl-season-utility-actions,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-utility-actions {
  position: static;
  order: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  transform: none;
}

body.community-league-route-setup-active .pl-season-header :is(.utility-button, .pl-season-restart-button),
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header :is(.utility-button, .pl-season-restart-button) {
  display: inline-flex;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 1px solid var(--domestic-banner-border) !important;
  border-radius: 999px;
  color: var(--domestic-banner-text) !important;
  background: var(--domestic-banner-surface) !important;
}

body.community-league-route-setup-active .pl-season-header .utility-button > span:last-child,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header .utility-button > span:last-child { display: none; }

body.community-league-route-setup-active .pl-season-header .main-account-button,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header .main-account-button {
  width: auto;
  gap: 8px;
  padding-inline: 14px;
}

body.community-league-route-setup-active .pl-season-header .main-account-button > span:last-child,
body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header .main-account-button > span:last-child { display: inline; }

body.community-league-route-setup-active #plRestartSeasonButton { display: none !important; }
body.community-league-route-setup-active #communityLeagueTeamPickerButton { display: none !important; }

body.community-league-route-setup-active .domestic-route-setup-intro {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--community-league-text);
  transform: translateX(-50%);
}

body.community-league-route-setup-active .domestic-route-setup-intro[hidden] { display: none; }
body.community-league-route-setup-active .domestic-route-setup-intro img { width: 44px; height: 44px; object-fit: contain; }
body.community-league-route-setup-active .domestic-route-setup-intro h1 { margin: 0; color: inherit; font-size: clamp(1.1rem, 2vw, 1.55rem); white-space: nowrap; }

body.community-league-route-setup-active .mode-route-setup-pl {
  color: var(--domestic-setup-text);
  background:
    radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--community-league-accent) 20%, transparent), transparent 32rem),
    var(--community-league-canvas);
}

body.community-league-route-setup-active #premierLeagueRouteSetupControls,
body.community-league-route-setup-active .community-league-settings {
  border-color: var(--domestic-setup-border);
}

body.community-league-route-setup-active #startCommunityLeagueSeasonButton {
  border-color: var(--community-league-accent) !important;
  color: var(--community-league-accent-text) !important;
  background: var(--community-league-accent) !important;
}

.community-league-team-toolbar { justify-content: flex-end; }
.community-league-team-mark img,
.community-league-runtime .domestic-inline-team-badge { width: 100%; height: 100%; object-fit: contain; }

.pl-season-screen[data-league-competition="community-league"] {
  --pl-bg: var(--community-league-canvas);
  --pl-surface: var(--community-league-panel);
  --pl-surface-light: color-mix(in srgb, var(--community-league-panel) 84%, var(--community-league-text) 16%);
  --pl-line: color-mix(in srgb, var(--community-league-border) 68%, transparent);
  --pl-muted: var(--community-league-muted);
  --pl-soft: color-mix(in srgb, var(--community-league-text) 9%, transparent);
  color: var(--community-league-text);
  background:
    radial-gradient(circle at 82% -10%, color-mix(in srgb, var(--community-league-accent) 22%, transparent), transparent 38rem),
    var(--community-league-canvas);
}

.pl-season-screen[data-league-competition="community-league"] :is(.pl-season-header, .pl-table thead, .pl-standings-table thead) { background: var(--community-league-header); }
.pl-season-screen[data-league-competition="community-league"] :is(.pl-primary-button, .primary-button, .pl-season-tabs button.active) { color: var(--community-league-accent-text); background: var(--community-league-accent); }
.pl-season-screen[data-league-competition="community-league"] :is(.pl-panel, .pl-season-card, .pl-fixture-card, .pl-squad-card, .pl-table-row) { border-color: var(--pl-line); background-color: var(--community-league-panel); }
.pl-season-screen[data-league-competition="community-league"] :is(.pl-club-code, .pl-team-code) { color: var(--community-league-accent-text); background: var(--community-league-accent); }
.pl-season-screen[data-league-competition="community-league"] :is(.pl-fixture-play, .pl-matchweek-nav button):not(:disabled) { color: var(--community-league-accent-text); border-color: var(--community-league-accent); background: var(--community-league-accent); }

.community-league-runtime #openAchievementsButton,
body[data-domestic-league-competition="community-league"] .achievements-header-button,
#premierLeagueSeasonScreen[data-league-competition="community-league"] #plSeasonAchievementsButton { display: none !important; }

body.pl-match-mode-active[data-domestic-league-competition="community-league"] {
  --shared-live-accent: var(--community-league-accent);
  --shared-live-accent-text: var(--community-league-accent-text);
  --shared-live-surface: var(--community-league-header);
  --shared-live-panel: var(--community-league-panel);
  --shared-live-border: var(--community-league-border);
  color: var(--community-league-text);
  background: var(--community-league-canvas);
}

body.pl-match-mode-active[data-domestic-league-competition="community-league"] :is(.sidebar, .topbar) { border-color: var(--community-league-border); background: var(--community-league-header); }
body.pl-match-mode-active[data-domestic-league-competition="community-league"] :is(.panel, .match-stage, .standard-match-tactics, .fixture, .spoiler-panel, .match-commentary-feed) { border-color: var(--community-league-border); color: var(--community-league-text); background: var(--community-league-panel); }
body.pl-match-mode-active[data-domestic-league-competition="community-league"] :is(.stage-topline, .panel-heading span, .muted, small) { color: var(--community-league-muted); }
body.pl-match-mode-active[data-domestic-league-competition="community-league"] :is(.standard-tactic-buttons button.active, .score-live-controls button.active, .fixture.selected, .pl-engine-table-row.is-selected) { color: var(--community-league-accent-text); border-color: var(--community-league-accent); background: var(--community-league-accent); }
body.pl-match-mode-active[data-domestic-league-competition="community-league"] :is(.event-live-clock, .match-commentary-feed .commentary-minute, .golden-boot-panel em) { color: var(--community-league-accent); }

body.pl-match-mode-active[data-domestic-league-competition="community-league"] :is(#match2dViewer, .match-2d-viewer, .pl-pitch-shell, .pl-pitch-management) { display: none !important; }

/* Complete creator-theme cascade. This file loads after the shared Premier
   League match skin so a community pack never inherits its purple palette. */
.pl-season-screen[data-league-competition="community-league"] {
  --pl-bg: var(--community-league-canvas);
  --pl-surface: var(--community-league-panel);
  --pl-surface-light: var(--community-league-panel-raised);
  --pl-line: var(--community-league-border);
  --pl-muted: var(--community-league-muted);
  --pl-soft: color-mix(in srgb, var(--community-league-text) 8%, transparent);
  color: var(--community-league-text);
  background: var(--community-league-canvas);
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-header {
  border-bottom-color: var(--community-league-border);
  color: var(--community-league-header-text);
  background: var(--community-league-header) !important;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--community-league-text) 18%, transparent);
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-header :is(
  .pl-season-restart-button,
  .utility-button,
  .main-account-button,
  #mainAccountLabel
) {
  border-color: color-mix(in srgb, var(--community-league-header-text) 34%, transparent) !important;
  color: var(--community-league-header-text) !important;
  background: transparent !important;
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-header :is(
  .pl-season-restart-button,
  .utility-button,
  .main-account-button
) :is(span, svg) {
  color: inherit !important;
  stroke: currentColor !important;
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-site-brand .brand-mark {
  border-color: var(--community-league-border);
  color: var(--community-league-accent-text) !important;
  background: var(--community-league-accent) !important;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--community-league-text) 24%, transparent) !important;
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-season-action-row .pl-back-button,
  .pl-season-date span,
  .pl-season-date strong,
  .pl-season-kicker,
  .pl-matchweek-toolbar span
) {
  color: var(--community-league-text) !important;
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-tabs {
  border-color: var(--community-league-border);
  background: var(--community-league-panel-raised);
  box-shadow: none;
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-tabs button {
  color: var(--community-league-text);
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-tabs button.active {
  color: var(--community-league-accent-text);
  background: var(--community-league-accent);
  box-shadow: none;
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-panel,
  .pl-season-card,
  .pl-fixture-card,
  .pl-squad-card,
  .pl-season-progress-card,
  .pl-season-finale,
  .pl-finale-place,
  .pl-finale-award,
  .pl-finale-promoted-club
) {
  border-color: var(--community-league-border);
  color: var(--community-league-text);
  background: var(--community-league-panel);
  box-shadow: none;
}

.pl-season-screen[data-league-competition="community-league"] .pl-season-finale {
  background: var(--community-league-panel);
}

.pl-season-screen[data-league-competition="community-league"] .pl-finale-hero {
  border-color: var(--community-league-border);
  color: var(--community-league-text);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--community-league-accent) 28%, transparent), transparent 52%),
    var(--community-league-panel-raised);
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-finale-hero h1,
  .pl-finale-hero p strong,
  .pl-finale-promoted h2,
  .pl-finale-promoted-copy strong
) {
  color: var(--community-league-text);
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-finale-hero p,
  .pl-finale-section-title,
  .pl-finale-place > b,
  .pl-finale-award-copy > span,
  .pl-finale-promoted-copy small
) {
  color: var(--community-league-muted);
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-finale-place,
  .pl-finale-award,
  .pl-finale-promoted-club
) {
  border-color: var(--community-league-border);
  background: var(--community-league-panel-raised);
  box-shadow: inset 3px 0 var(--community-league-accent);
}

.pl-season-screen[data-league-competition="community-league"] .pl-finale-award-mark {
  color: var(--community-league-accent-text);
  background: var(--community-league-accent);
}

.pl-season-screen[data-league-competition="community-league"] .pl-finale-actions button {
  border-color: var(--community-league-border);
  color: var(--community-league-text);
  background: var(--community-league-panel-raised);
}

.pl-season-screen[data-league-competition="community-league"] .pl-finale-actions button:is(:hover, :focus-visible),
.pl-season-screen[data-league-competition="community-league"] .pl-finale-actions .is-primary {
  border-color: var(--community-league-accent);
  color: var(--community-league-accent-text);
  background: var(--community-league-accent);
}

.pl-season-screen[data-league-competition="community-league"] .pl-finale-actions button:focus-visible {
  outline-color: var(--community-league-accent);
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-panel-heading,
  .pl-panel-footer,
  .pl-fixture-row,
  .pl-table-row,
  .pl-squad-detail
) {
  border-color: var(--community-league-border);
}

.pl-season-screen[data-league-competition="community-league"] :is(
  h1,
  h2,
  h3,
  .pl-panel-heading h2,
  .pl-fixture-team,
  .pl-fixture-score strong,
  .pl-table-team,
  .pl-table-row > strong,
  .pl-squad-card-copy strong,
  .pl-squad-rating strong,
  .pl-matchweek-toolbar h2,
  .pl-finale-place strong,
  .pl-finale-award-copy strong
) {
  color: var(--community-league-text);
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-panel-heading span,
  .pl-panel-heading button,
  .pl-panel-heading a,
  .pl-panel-footer button,
  .pl-fixture-score small,
  .pl-squad-card-copy small,
  .pl-squad-rating span,
  .pl-table-head,
  .pl-finale-place small,
  .pl-finale-award-copy small
) {
  color: var(--community-league-muted);
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-primary-button,
  .primary-button,
  .pl-fixture-play,
  .pl-matchweek-nav button:not(:disabled),
  .pl-club-code,
  .pl-team-code,
  .pl-squad-arrivals span
) {
  border-color: var(--community-league-accent);
  color: var(--community-league-accent-text);
  background: var(--community-league-accent);
  box-shadow: none;
}

.pl-season-screen[data-league-competition="community-league"] :is(
  .pl-primary-button,
  .primary-button,
  .pl-fixture-play,
  .pl-matchweek-nav button,
  .pl-season-tabs button
):active:not(:disabled) {
  transform: scale(.97);
}

.pl-season-screen[data-league-competition="community-league"] .pl-matchweek-nav button:disabled,
.pl-season-screen[data-league-competition="community-league"] .pl-fixture-play:disabled {
  border-color: var(--community-league-border);
  color: var(--community-league-muted);
  background: var(--community-league-panel-raised);
  opacity: 1;
}

.pl-season-screen[data-league-competition="community-league"] .pl-table-row.is-selected {
  color: var(--community-league-accent-text);
  background: var(--community-league-accent);
  box-shadow: inset 4px 0 var(--community-league-border);
}

.pl-season-screen[data-league-competition="community-league"] .pl-table-row.is-selected :is(span, strong, b, small) {
  color: var(--community-league-accent-text);
}

.pl-season-screen[data-league-competition="community-league"] :is(button, a, .pl-squad-card):focus-visible {
  outline: 3px solid var(--community-league-accent);
  outline-offset: 3px;
}

body.community-league-runtime.pl-match-mode-active {
  --bg: var(--community-league-canvas);
  --surface: var(--community-league-panel);
  --surface-2: var(--community-league-panel-raised);
  --text: var(--community-league-text);
  --line: var(--community-league-border);
  --line-strong: var(--community-league-border);
  --muted: var(--community-league-muted);
  --soft: var(--community-league-text);
  color: var(--community-league-text) !important;
  background: var(--community-league-canvas) !important;
}

body.community-league-runtime.pl-match-mode-active :is(#appShell, .main, #mainContent) {
  color: var(--community-league-text);
  background: var(--community-league-canvas) !important;
}

body.community-league-runtime.pl-match-mode-active #appShell > .sidebar {
  border-bottom-color: var(--community-league-border) !important;
  color: var(--community-league-header-text) !important;
  background: var(--community-league-header) !important;
}

body.community-league-runtime.pl-match-mode-active #appShell > .sidebar .brand-mark {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-accent-text) !important;
  background: var(--community-league-accent) !important;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--community-league-text) 22%, transparent) !important;
}

body.community-league-runtime.pl-match-mode-active #appShell > .sidebar .brand-mark > * {
  color: inherit !important;
}

body.community-league-runtime.pl-match-mode-active #appShell > .sidebar :is(
  #newTournamentButton,
  .utility-button,
  .main-account-button,
  .header-donate-link,
  #mainAccountLabel
) {
  border-color: color-mix(in srgb, var(--community-league-header-text) 34%, transparent) !important;
  color: var(--community-league-header-text) !important;
  background: transparent !important;
}

body.community-league-runtime.pl-match-mode-active #appShell > .sidebar :is(
  #newTournamentButton,
  .utility-button,
  .main-account-button,
  .header-donate-link
) :is(span, svg) {
  color: inherit !important;
  stroke: currentColor !important;
}

body.community-league-runtime.pl-match-mode-active :is(
  .panel,
  .match-stage,
  .match-detail-panel,
  .fixture,
  .round-link,
  .match-queue-item,
  #retroMatchLineupsPanel,
  #matchAnalysis,
  .pl-engine-table-panel,
  .round-board,
  .pl-watch-tactics,
  .standard-match-tactics,
  .spoiler-panel
) {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel) !important;
  box-shadow: none !important;
}

body.community-league-runtime.pl-match-mode-active .match-stage {
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--community-league-text) 7%, transparent), transparent 24rem),
    var(--community-league-panel-soft) !important;
}

body.community-league-runtime.pl-match-mode-active .match-stage.is-live:not(.is-shootout) :is(
  .team h2,
  .team h2 span,
  .match-score
) {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active .match-stage.is-live:not(.is-shootout) .score-separator {
  color: var(--community-league-muted) !important;
}

body.community-league-runtime.pl-match-mode-active :is(
  .team-name,
  .team-name > span,
  .match-score,
  .score-separator,
  .match-analysis-heading strong,
  .panel-heading strong,
  .fixture-team,
  .fixture-team .name,
  .pl-engine-table-row,
  .pl-engine-table-row strong,
  .pl-watch-tactics-copy strong,
  .match-stat-row b,
  .team-match-events .timeline-event,
  .team-match-events .timeline-event span
) {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active :is(
  .stage-topline,
  .stage-round,
  .panel-heading span,
  .match-analysis-heading span,
  .match-stat-row,
  .match-stat-row span,
  .match-stats-empty span,
  .pl-watch-tactics-copy span,
  .standard-match-tactics > span,
  .standard-match-tactics > small,
  .pl-engine-table-head,
  .pl-engine-table-row i,
  .fixture small
) {
  color: var(--community-league-muted) !important;
}

body.community-league-runtime.pl-match-mode-active :is(.match-analysis-heading, .panel-heading, .standard-match-tactics > span) {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel-raised) !important;
  box-shadow: none !important;
}

body.community-league-runtime.pl-match-mode-active :is(.match-stats-grid, .standard-tactic-buttons) {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel-soft) !important;
}

body.community-league-runtime.pl-match-mode-active .standard-tactic-buttons button {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active :is(
  .standard-tactic-buttons button.active,
  .live-control,
  .skip-control,
  .primary-button,
  .play-button,
  #snapshotButton,
  .snapshot-actions button
) {
  border-color: var(--community-league-accent) !important;
  color: var(--community-league-accent-text) !important;
  background: var(--community-league-accent) !important;
  box-shadow: none !important;
}

body.community-league-runtime.pl-match-mode-active :is(
  .standard-tactic-buttons button,
  .live-control,
  .skip-control,
  .primary-button,
  .play-button,
  #snapshotButton,
  .snapshot-actions button
):active:not(:disabled) {
  transform: scale(.97);
}

body.community-league-runtime.pl-match-mode-active .match-commentary-feed {
  --goal-flash-color: var(--community-league-accent);
  --goal-flash-text-color: var(--community-league-accent-text);
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel-raised) !important;
  box-shadow: none !important;
}

body.community-league-runtime.pl-match-mode-active .match-commentary-feed :is(.commentary-line, .commentary-line span) {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active .match-commentary-feed:is(.is-major, .is-goal, .is-goal-flash, .is-goal-flashing) {
  border-color: var(--community-league-accent) !important;
  color: var(--community-league-accent-text) !important;
  background: var(--community-league-accent) !important;
}

body.community-league-runtime.pl-match-mode-active .match-commentary-feed:is(.is-major, .is-goal, .is-goal-flash, .is-goal-flashing) :is(.commentary-line, .commentary-line span) {
  color: var(--community-league-accent-text) !important;
}

body.community-league-runtime.pl-match-mode-active :is(
  .event-live-clock > span,
  .event-live-clock strong,
  .event-live-clock small,
  .team-match-events .timeline-event b,
  .match-stage.pl-full-time .result-note:not([hidden])
) {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active .event-live-clock > span i {
  background: var(--community-league-accent) !important;
  box-shadow: none !important;
}

body.community-league-runtime.pl-match-mode-active .pl-live-back-button {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel-raised) !important;
}

body.community-league-runtime.pl-match-mode-active #roundBoard .fixture {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel) !important;
}

body.community-league-runtime.pl-match-mode-active #roundBoard .fixture:not(.selected) :is(
  .fixture-card-head span,
  .fixture-card-head small,
  .fixture-team,
  .fixture-team .name,
  .fixture-team b
) {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active #roundBoard .fixture.selected,
body.community-league-runtime.pl-match-mode-active .pl-engine-table-row.is-selected {
  border-color: var(--community-league-accent) !important;
  color: var(--community-league-accent-text) !important;
  background: var(--community-league-accent) !important;
  box-shadow: inset 3px 0 var(--community-league-border) !important;
}

body.community-league-runtime.pl-match-mode-active #roundBoard .fixture.selected :is(.fixture-team, .name, small, span, b),
body.community-league-runtime.pl-match-mode-active .pl-engine-table-row.is-selected :is(span, strong, b, i) {
  color: var(--community-league-accent-text) !important;
}

body.community-league-runtime.pl-match-mode-active #roundBoard :is(
  .team-filter-search,
  .history-round-button,
  #newerRoundButton,
  #simulateRoundButton,
  #unresolvedFilter,
  .team-filter-chip,
  .go-to-top
) {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel-raised) !important;
  box-shadow: none !important;
}

body.community-league-runtime.pl-match-mode-active #roundBoard .team-filter-search input,
body.community-league-runtime.pl-match-mode-active #roundBoard .team-filter-search input::placeholder {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active #roundBoard #teamFilterControl :is(.search-result-popover, .search-result) {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel) !important;
}

body.community-league-runtime.pl-match-mode-active :is(
  .golden-boot-row,
  .golden-boot-player,
  .golden-boot-player strong,
  .golden-boot-rank,
  .golden-boot-row > b,
  .pl-engine-full-table
) {
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active .golden-boot-row {
  border-color: var(--community-league-border) !important;
}

body.community-league-runtime.pl-match-mode-active .golden-boot-player :is(span, small) {
  color: var(--community-league-muted) !important;
}

body.community-league-runtime.pl-match-mode-active .pl-engine-full-table {
  border-color: var(--community-league-border) !important;
  background: transparent !important;
}

body.community-league-runtime.pl-match-mode-active :is(.snapshot-modal, .confirm-modal, .settings-modal),
body.community-league-runtime.pl-match-mode-active .snapshot-modal form {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
  background: var(--community-league-panel) !important;
}

body.community-league-runtime.pl-match-mode-active .snapshot-modal :is(
  .snapshot-modal-head,
  .section-kicker,
  h2
) {
  border-color: var(--community-league-border) !important;
  color: var(--community-league-text) !important;
}

body.community-league-runtime.pl-match-mode-active .snapshot-modal .close-modal {
  border-color: var(--community-league-accent) !important;
  color: var(--community-league-accent-text) !important;
  background: var(--community-league-accent) !important;
}

body.community-league-runtime.pl-match-mode-active .snapshot-preview {
  border-color: var(--community-league-border) !important;
  background: var(--community-league-canvas) !important;
  box-shadow: none !important;
}

body.community-league-runtime.pl-match-mode-active :is(button, a, input):focus-visible {
  outline: 3px solid var(--community-league-accent) !important;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .pl-season-screen[data-league-competition="community-league"] .pl-season-tabs button:hover:not(.active),
  body.community-league-runtime.pl-match-mode-active #roundBoard .fixture:hover:not(.selected) {
    color: var(--community-league-text) !important;
    background: var(--community-league-panel-raised) !important;
  }

  body.community-league-runtime.pl-match-mode-active :is(
    .live-control,
    .skip-control,
    .primary-button,
    .play-button,
    #snapshotButton,
    .snapshot-actions button
  ):hover:not(:disabled) {
    color: var(--community-league-accent-text) !important;
    background: var(--community-league-accent) !important;
    filter: brightness(1.08);
  }
}

@media (max-width: 760px) {
  .pl-season-screen[data-league-competition="community-league"] :is(
    .pl-finale-place strong,
    .pl-finale-award-copy strong
  ) {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  .pl-season-screen[data-league-competition="community-league"] .pl-finale-award-copy small {
    flex-wrap: wrap;
  }

  body.community-league-route-setup-active .domestic-route-setup-intro { position: static; justify-content: center; margin: 12px auto 0; transform: none; }
  body.community-league-route-setup-active .pl-season-header,
  body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header { padding-inline: 12px; }
  body.community-league-route-setup-active .pl-season-header .main-account-button,
  body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header .main-account-button { width: 42px; padding: 0; }
  body.community-league-route-setup-active .pl-season-header .main-account-button > span:last-child,
  body.pl-season-open #premierLeagueSeasonScreen[data-league-edition^="community-league-"] .pl-season-header .main-account-button > span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.community-league-runtime * { scroll-behavior: auto !important; }
}
