/* AFC uses the same UEFA setup shell and controls as the UCL route. */
#afcSimulatorScreen[hidden] { display: none !important; }

/* Palette only: geometry and controls come from the shared match workspace. */
body.afc-elite-match-mode-active {
  --accent: #b79af3; --accent-color: #b79af3; --accent-strong: #8257c7;
  --bg: #11091f; --surface: #21113e; --surface-2: #312052;
  --panel: #241542; --panel-soft: #312052; --panel-2: #312052; --panel-3: #3a245e;
  --text: #ffffff; --muted: #c9b8df; --soft: #c9b8df;
  --border: #8257c7; --line: #caabf74d; --line-strong: #caabf780;
  --lime: #d7bdf8; --lime-dark: #8257c7; --orange: #e2c58c;
  --pl-bg: #11091f; --pl-surface: #21113e; --pl-purple: #8257c7; --pl-line: #caabf74d; --pl-muted: #c9b8df;
  color: #fff; background: #11091f;
}
body.afc-elite-match-mode-active #appShell { background: radial-gradient(ellipse at 80% 0%, #44266b, transparent 70%), #11091f !important; }
body.afc-elite-match-mode-active #appShell .sidebar { background: #21113e !important; border-color: #caabf74d; }
body.afc-elite-match-mode-active #appShell :is(.topbar, #roundBoard, #storyStrip, .plot-panel, #fieldOverview, .page-kicker, #uclEngineTablePanel, #plEngineTablePanel) { display: none !important; }
body.afc-elite-match-mode-active #appShell :is(.panel, .match-stage, .lineup-panel, .lineup-bench, .team-management-panel, #standardMatchTactics, #matchAnalysis, #matchStatsGrid) { background: #241542 !important; color: #fff; border-color: #8257c7 !important; }
body.afc-elite-match-mode-active #appShell :is(.match-analysis-heading, .standard-tactic-options) { background: #312052 !important; border-color: #8257c7 !important; }
body.afc-elite-match-mode-active #appShell :is(.utility-button, .live-control, #uclLiveBackButton) { color: #fff !important; border-color: #8257c7 !important; background: #312052 !important; }
body.afc-elite-match-mode-active #appShell :is(.primary-button, .play-button) { background: #b79af3 !important; color: #21113e !important; }
body.afc-elite-match-mode-active #afcEliteMatchPanel { min-width: 0; width: 100%; align-self: start; overflow: hidden; }
#afcEliteMatchPanel .afc-panel { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#afcEliteMatchPanel .afc-table { min-width: 0; font-size: 10px; }
#afcEliteMatchPanel .afc-table th, #afcEliteMatchPanel .afc-table td { padding: 7px 3px; }
#afcEliteMatchPanel .afc-table-club span { max-width: 108px; }
#afcEliteMatchPanel .afc-table-club img { width: 23px; height: 23px; }
#afcEliteMatchPanel .text-button { color: #d7bdf8; }
.afc-match-rules { padding: 0 16px; color: #c9b8df; font-size: 12px; }
body.afc-elite-match-mode-active :focus-visible { outline-color: #d4b9ff; }

@media (min-width: 851px) {
/* Keep the shared match central, with stats left and tactics first on the right. */
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent.content {
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(230px, 270px) !important;
  grid-template-areas: "stats stage support" !important;
  width: min(1600px, calc(100% - 28px)) !important;
  max-width: none !important;
  gap: 16px !important;
  padding: 24px 0 50px !important;
}
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent > .insight-left {
  grid-area: stats !important; display: grid !important; gap: 16px !important; margin-top: 86px !important; min-width: 0;
}
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent > .insight-right {
  grid-area: support !important; display: grid !important; gap: 16px !important; margin-top: 86px !important; min-width: 0;
}
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent > .stage-column { grid-area: stage !important; width: 100% !important; min-width: 0; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent #matchStage.pl-prematch { min-height: 0 !important; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent #matchAnalysis:not([hidden]) {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  align-self: start;
  min-height: var(--afc-summary-height, 0px) !important;
  margin-bottom: 0;
}
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #matchAnalysis .match-analysis-heading { flex: 0 0 auto; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent #matchStatsGrid {
  display: grid !important;
  flex: 1 1 auto;
  grid-auto-rows: minmax(min-content, 1fr);
  border-bottom: 0;
}
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent #matchStatsGrid .match-stat-row { align-content: center; }
}

body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel h2 { margin: 0; font: 800 15px/1.3 Manrope, sans-serif; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .panel-heading > span { color: #c9b8df; font-size: 11px; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel :is(.pl-engine-table-head, .pl-engine-table-row) { display: grid; grid-template-columns: 25px minmax(0, 1fr) 25px 26px !important; align-items: center; gap: 5px; padding: 9px 10px; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .pl-engine-table-row > span { display: flex; align-items: center; min-width: 0; gap: 7px; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .pl-engine-table-row img { width: 24px; height: 24px; object-fit: contain; flex: none; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .pl-engine-table-row > span strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .pl-engine-table-row > :is(b, i, strong) { color: #fff; font: 700 12px/1.3 Manrope, sans-serif !important; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .pl-engine-table-row.is-selected { background: #69469a; box-shadow: inset 3px 0 #e1ccff; }
body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #afcEliteMatchPanel .pl-engine-full-table { width: 100%; min-height: 40px; }
@media (min-width: 851px) and (max-width: 1150px) {
  body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent.content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas: "stage stage" "stats support" !important;
  }
  body:is(.afc-elite-match-mode-active, .libertadores-match-mode-active, .club-world-cup-match-mode-active) #mainContent > :is(.insight-left, .insight-right) {
    margin-top: 0 !important;
  }
}
@media (max-width: 700px) {
  body.afc-elite-match-mode-active #afcEliteMatchPanel :is(.pl-engine-table-head, .pl-engine-table-row) { grid-template-columns: 16px minmax(0, 1fr) 18px 19px !important; gap: 3px; padding-inline: 6px; }
  body.afc-elite-match-mode-active #afcEliteMatchPanel .pl-engine-table-row > span { gap: 4px; }
  body.afc-elite-match-mode-active #afcEliteMatchPanel .pl-engine-table-row img { width: 19px; height: 19px; }
  body.afc-elite-match-mode-active #afcEliteMatchPanel .pl-engine-table-row > span strong { font-size: 10px; }
  body.afc-elite-match-mode-active #afcEliteMatchPanel .panel-heading { padding: 8px; }
  body.afc-elite-match-mode-active #afcEliteMatchPanel h2 { font-size: 12px; }
  body.afc-elite-match-mode-active #afcEliteMatchPanel .panel-heading > span { display: none; }
}

html:has(> body.afc-route-setup-active),
body.afc-route-setup-active .afc-route-setup {
  scrollbar-width: none;
}

html:has(> body.afc-route-setup-active)::-webkit-scrollbar,
body.afc-route-setup-active .afc-route-setup::-webkit-scrollbar {
  display: none;
}

body.afc-route-setup-active {
  --uefa-setup-accent: #b79af3;
  --uefa-setup-accent-strong: #8257c7;
  --uefa-setup-header: #21113e;
  --uefa-setup-header-soft: #3a245e;
  --uefa-setup-panel: #241542;
  --uefa-setup-card: #312052;
  --uefa-setup-border: rgba(202, 171, 247, .3);
  --uefa-setup-muted: #c9b8df;
  --line: rgba(202, 171, 247, .3);
  --muted: #c9b8df;
  color: #f9f6ff;
  background: #11091f;
}

body.afc-route-setup-active .afc-simulator-screen {
  background: radial-gradient(circle at 82% -8%, rgba(127, 77, 203, .26), transparent 34rem),
    radial-gradient(circle at -8% 55%, rgba(91, 49, 143, .15), transparent 28rem), #11091f;
}

body.afc-route-setup-active .afc-simulator-header {
  border-color: var(--uefa-setup-border);
  background: var(--uefa-setup-header);
}

body.afc-route-setup-active .afc-simulator-header .brand-mark {
  border-color: var(--uefa-setup-border);
  background: var(--uefa-setup-header-soft);
}

body.afc-route-setup-active .afc-simulator-header .utility-button {
  color: #f7f2ff;
  text-decoration: none;
}

body.afc-route-setup-active .afc-simulator-header .utility-button:hover {
  border-color: #b79af3;
  background: #4b3174;
}

body.afc-route-setup-active .afc-simulator-header .account-avatar-icon svg { stroke: #d7bff6; }

body.afc-route-setup-active .afc-route-setup {
  background: radial-gradient(circle at 50% -14%, rgba(173, 126, 226, .18), transparent 39rem);
}

body.afc-route-setup-active .mode-route-setup-ucl .afc-route-setup-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.afc-route-setup-active .afc-route-setup .mode-route-setup-back {
  display: inline-flex !important;
  width: max-content;
  align-items: center;
  gap: 8px;
  color: #f9f6ff;
  text-decoration: none;
}
body.afc-route-setup-active .afc-route-setup .mode-route-setup-back > span:last-child { display: inline !important; }

body.afc-route-setup-active .afc-inline-team-toolbar { margin-bottom: 4px; }

body.afc-route-setup-active .afc-inline-team-toolbar > .setup-neutral-choice,
body.afc-route-setup-active .afc-inline-team-toolbar > .afc-view-squad,
body.afc-route-setup-active .afc-region-filter button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--uefa-setup-border);
  border-radius: 999px;
  color: #f9f6ff;
  background: var(--uefa-setup-card);
  font: 800 11px/1.2 Manrope, sans-serif;
  cursor: pointer;
}

body.afc-route-setup-active .afc-inline-team-toolbar > .afc-view-squad:disabled {
  opacity: .58;
  cursor: not-allowed;
}

body.afc-route-setup-active .afc-inline-team-toolbar > .afc-view-squad[hidden] { display: none !important; }

body.afc-route-setup-active .afc-inline-team-toolbar > .afc-view-squad:not(:disabled):hover {
  border-color: var(--uefa-setup-accent);
  background: #4b3174;
}

body.afc-route-setup-active .afc-inline-team-toolbar > .setup-neutral-choice[aria-pressed="true"],
body.afc-route-setup-active .afc-region-filter button[aria-pressed="true"] {
  border-color: var(--uefa-setup-accent);
  color: #25143c;
  background: var(--uefa-setup-accent);
}

.afc-club-filter-row {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 10px;
}
.afc-region-filter { display: flex; flex-wrap: wrap; gap: 7px; }

body.afc-route-setup-active .afc-live-start-options {
  display: grid;
  width: 100%;
  flex: 1 0 100%;
  gap: 8px;
  padding: 12px 0 4px;
}

body.afc-route-setup-active .afc-live-start-options > span {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

body.afc-route-setup-active .afc-live-start-options .segmented {
  display: flex;
  width: 100%;
  padding: 3px;
  border: 1px solid var(--uefa-setup-border) !important;
  border-radius: 9px;
  background: rgba(255, 255, 255, .055) !important;
}

body.afc-route-setup-active .afc-live-start-options .segmented button {
  min-height: 42px;
  flex: 1 1 160px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--uefa-setup-muted);
  background: transparent;
  font: 800 12px/1.2 Manrope, sans-serif;
  cursor: pointer;
}

body.afc-route-setup-active .afc-live-start-options .segmented button.active {
  color: #25143c;
  background: var(--uefa-setup-accent);
  box-shadow: inset 0 1px rgba(255, 255, 255, .28);
}

body.afc-route-setup-active .afc-live-start-options .pl-live-start-copy {
  margin: 8px 0 0;
  color: var(--uefa-setup-muted);
  font-size: 12px;
  line-height: 1.5;
}

body.afc-route-setup-active .afc-club-grid .afc-club-option {
  border-color: var(--uefa-setup-border);
  background: var(--uefa-setup-card);
}

body.afc-route-setup-active .afc-club-grid .afc-club-option[aria-selected="true"] {
  border-color: var(--uefa-setup-accent);
  background: #543879;
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 0 0 1px rgba(183, 154, 243, .3);
}

body.afc-route-setup-active .afc-club-grid .afc-club-option:hover { border-color: var(--uefa-setup-accent); }

.afc-club-grid .uefa-inline-team-copy small { color: var(--uefa-setup-muted); }
.afc-club-grid .uefa-inline-team-check { color: var(--uefa-setup-accent); }

.afc-squad-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: min(82dvh, 900px);
  padding: 0;
  border: 1px solid rgba(202, 171, 247, .46);
  border-radius: 16px;
  color: #f9f6ff;
  background: #241542;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  font-family: Manrope, sans-serif;
}
.afc-squad-dialog::backdrop { background: rgba(9, 5, 20, .78); }
.afc-squad-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 8px;
}
.afc-squad-dialog h2 {
  margin: 0;
  font: 800 clamp(18px, 3vw, 24px)/1.15 Manrope, sans-serif;
}
.afc-squad-dialog-head button {
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid rgba(202, 171, 247, .46);
  border-radius: 50%;
  color: #fff;
  background: #382157;
  font: 26px/1 Manrope, sans-serif;
  cursor: pointer;
}
#afcSquadSummary {
  margin: 0;
  padding: 0 20px 14px;
  color: #d0bce6;
  font-size: 12px;
  line-height: 1.5;
}
.afc-squad-table-wrap {
  max-height: calc(82dvh - 180px);
  overflow: auto;
  border-top: 1px solid rgba(202, 171, 247, .3);
  border-bottom: 1px solid rgba(202, 171, 247, .3);
}
.afc-squad-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.afc-squad-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  color: #d0bce6;
  background: #2e1b4a;
  text-align: left;
}
.afc-squad-table td { padding: 10px 12px; border-top: 1px solid rgba(202, 171, 247, .16); }
.afc-squad-table th:first-child, .afc-squad-table td:first-child { width: 52px; text-align: center; }
.afc-squad-table th:last-child, .afc-squad-table td:last-child { width: 58px; text-align: center; font-weight: 800; }
.afc-squad-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }
.afc-squad-rating-note { margin: 0; padding: 12px 20px 16px; color: #bda8d4; font-size: 11px; }

body.afc-route-setup-active .afc-setup-actions { margin-top: 16px; }
body.afc-route-setup-active .afc-launch-button {
  min-height: 48px;
  flex: 1 1 auto;
  border-color: #cfb4ff;
  color: #26123f;
  background: #bc9af4;
  box-shadow: 0 10px 28px rgba(71, 37, 113, .26);
  cursor: pointer;
}
body.afc-route-setup-active .afc-launch-button:hover { background: #d2b8ff; }

#afcSetup[hidden], #afcSeason[hidden], #afcSeasonTabs[hidden] { display: none !important; }

body.afc-route-setup-active #uclSimulatorScreen { display: none !important; }
.afc-simulator-screen {
  --ucl-line: rgba(202, 171, 247, .2);
  --ucl-gold: #c7a5f8;
  --ucl-blue-bright: #c9b8df;
}
.afc-season { min-height: calc(100dvh - 68px); }
.afc-season-shell { width: 100%; }
#afcStageBar { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
body.afc-route-setup-active #afcSimulatorScreen .ucl-back-button {
  justify-self: start;
  width: max-content;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--uefa-setup-border);
  border-radius: 8px;
  color: #f9f6ff;
  background: var(--uefa-setup-card);
  text-decoration: none;
}
body.afc-route-setup-active #afcSimulatorScreen .ucl-back-button > span:last-child { display: inline; }
body.afc-route-setup-active #afcSimulatorScreen .ucl-back-button:hover { border-color: #b79af3; background: #4b3174; }
#afcStageBar .afc-stage-identity { display: grid; grid-template-columns: 38px minmax(0, auto) 38px; gap: 12px; justify-content: center; text-align: center; }
/* Balance the trophy so the matchday text itself stays at the page centre. */
#afcStageBar .afc-stage-identity::after { content: ""; }
#afcStageBar .afc-stage-identity img { width: 38px; height: 52px; }
body.afc-route-setup-active #afcSimulatorScreen #afcRestartButton { width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; border: 1px solid var(--uefa-setup-border); border-radius: 50%; color: #f7f2ff; background: var(--uefa-setup-header-soft); font-size: 20px; }
body.afc-route-setup-active #afcSimulatorScreen #afcRestartButton:hover { border-color: #b79af3; background: #4b3174; }
.afc-stage-identity h1 { margin: 0; font: 800 20px/1.2 Manrope, sans-serif; color: #fff; }
.afc-stage-identity p { margin: 5px 0 0; color: #c9b8df; font: 600 11px/1.4 Manrope, sans-serif; }
.afc-season-tabs button { color: #c3afd9; }
.afc-season-tabs button.active { color: #fff; }
.afc-season-content { min-width: 0; }
.afc-panel {
  min-width: 0;
  border: 1px solid rgba(206, 176, 246, .19);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(48, 29, 78, .93), rgba(30, 17, 54, .96));
  box-shadow: 0 12px 34px rgba(5, 2, 13, .12);
}
.afc-panel-heading { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--ucl-line); background: rgba(82, 49, 124, .24); }
.afc-panel-heading h2, .afc-panel-heading h3 { margin: 0; color: #fff; font: 800 16px/1.2 Manrope, sans-serif; letter-spacing: -.02em; }
.afc-panel-heading span { color: #c2addb; font: 700 11px/1.3 Manrope, sans-serif; text-align: right; }
.afc-overview-layout { grid-template-columns: minmax(0, .94fr) minmax(360px, 1.06fr); gap: 18px; }
.afc-overview-matches { display: grid; min-width: 0; gap: 18px; }
.afc-overview-standings { min-width: 0; }
.afc-next-panel, .afc-round-panel { overflow: hidden; }
.afc-recent-panel, .afc-fixtures-panel, .afc-empty-knockout { padding: 20px; }
.afc-panel-copy { max-width: 55ch; margin: 12px 0 0; color: #c8b7df; font: 500 12px/1.55 Manrope, sans-serif; }
.afc-next-matchup { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 27px 18px 20px; }
.afc-next-club { display: flex; align-items: center; gap: 10px; min-width: 0; }
.afc-next-home { justify-content: flex-end; text-align: right; }
.afc-next-away { justify-content: flex-start; text-align: left; }
.afc-next-club > div { display: grid; gap: 6px; min-width: 0; }
.afc-next-matchup img { flex: none; width: 42px; height: 42px; object-fit: contain; }
.afc-next-matchup strong { color: #fff; font: 800 clamp(13px, 1.4vw, 17px)/1.25 Manrope, sans-serif; }
.afc-next-matchup small { color: #c9b4df; font: 700 11px/1.2 Manrope, sans-serif; }
.afc-next-matchup > b { color: #e2c58c; font: 800 17px/1 Manrope, sans-serif; text-transform: uppercase; }
.afc-next-date { margin: 0 0 19px; color: #d4bee9; font: 700 12px/1.4 Manrope, sans-serif; text-align: center; }
.afc-next-actions { display: flex; gap: 9px; padding: 0 18px 18px; }
.afc-round-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 18px; }
.afc-action-primary, .afc-action-secondary, .afc-champion-panel button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: 800 12px/1.2 Manrope, sans-serif;
  cursor: pointer;
}
.afc-action-primary, .afc-champion-panel button { border-color: #d1b4ff; color: #291442; background: #c6a4fa; }
.afc-action-primary:hover, .afc-champion-panel button:hover { background: #dcc4ff; }
.afc-action-secondary { border-color: rgba(206, 176, 246, .34); color: #faf7ff; background: #432d65; }
.afc-action-secondary:hover { border-color: #c6a4fa; background: #543774; }
.afc-next-actions > button { flex: 1 1 50%; }
.afc-round-fixtures { display: grid; }
.afc-round-panel > .afc-text-action { margin: 12px 17px; }
.afc-round-fixtures .afc-fixture-card { border: 0; border-bottom: 1px solid var(--ucl-line); border-radius: 0; min-height: 46px; background: transparent; padding: 10px 17px; }
.afc-round-fixtures .afc-fixture-card.is-managed { background: rgba(139, 99, 200, .09); }
.afc-round-fixtures .afc-fixture-card.is-managed:hover { background: rgba(139, 99, 200, .22); }
.afc-text-action { display: inline-flex; gap: 6px; align-items: center; margin-top: 13px; padding: 0; border: 0; color: #d7bdf8; background: none; font: 800 11px/1.3 Manrope, sans-serif; cursor: pointer; }
.afc-text-action:hover { color: #fff; }
.afc-fixture-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 5px 12px;
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(206, 176, 246, .2);
  border-radius: 10px;
  color: #fff;
  background: rgba(19, 9, 36, .42);
  font-family: Manrope, sans-serif;
  text-align: left;
  cursor: pointer;
}
.afc-fixture-card:hover { border-color: #bc9af4; background: rgba(69, 42, 106, .54); }
.afc-fixture-card.is-managed { border-color: rgba(218, 190, 126, .56); }
.afc-fixture-club { display: flex; align-items: center; gap: 7px; min-width: 0; }
.afc-fixture-club img { width: 28px; height: 28px; flex: none; object-fit: contain; }
.afc-fixture-club strong { min-width: 0; overflow: hidden; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.afc-fixture-home { justify-content: flex-end; text-align: right; }
.afc-fixture-away { justify-content: flex-start; text-align: left; }
.afc-fixture-score { display: flex; align-items: center; justify-content: center; gap: 5px; color: #fff; font: 800 17px/1 Manrope, sans-serif; white-space: nowrap; }
.afc-fixture-score i { color: #b59bd0; font-style: normal; }
.afc-fixture-score small { margin-left: 3px; color: #c5afd9; font: 700 9px/1.2 Manrope, sans-serif; }
.afc-fixture-time { color: #ccb6e4; font: 800 10px/1.2 Manrope, sans-serif; text-align: center; white-space: nowrap; }
.afc-fixture-detail { grid-column: 1 / -1; color: #bda9d3; font: 600 10px/1.2 Manrope, sans-serif; text-align: center; }
.afc-fixture-card.is-compact { padding: 9px 10px; }
.afc-fixture-card.is-compact .afc-fixture-club img { width: 24px; height: 24px; }
.afc-fixture-card.is-compact .afc-fixture-detail { display: none; }
.afc-overview-columns, .afc-tables-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.afc-overview-columns { margin-top: 16px; }
.afc-table-panel { overflow: hidden; }
.afc-table-panel > .afc-panel-heading { padding: 19px 19px 12px; }
.afc-table-scroll { overflow-x: auto; scrollbar-width: none; }
.afc-table-scroll::-webkit-scrollbar { display: none; }
.afc-table { width: 100%; min-width: 490px; border-collapse: collapse; color: #e7ddf0; font: 600 11px/1.25 Manrope, sans-serif; }
.afc-table thead { color: #ad97c6; background: rgba(13, 6, 26, .26); }
.afc-table th, .afc-table td { padding: 9px 5px; border-top: 1px solid rgba(206, 176, 246, .09); text-align: center; }
.afc-table th:nth-child(2) { text-align: left; }
.afc-table th:first-child { width: 34px; }
.afc-table th:last-child, .afc-table td:last-child { padding-right: 16px; }
.afc-table-club { display: flex; align-items: center; gap: 8px; min-width: 0; }
.afc-table-club img { width: 24px; height: 24px; flex: none; object-fit: contain; }
.afc-table-club span { overflow: hidden; color: #f8f4fd; font: 700 11px/1.2 Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.afc-table tr.is-qualified > :first-child { box-shadow: inset 3px 0 #8c66c4; }
.afc-table tr.is-managed { background: rgba(214, 183, 119, .12); }
.afc-table td strong { color: #f4d69d; }
.afc-recent-panel { margin-top: 16px; }
.afc-recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.afc-tables-intro { margin: 2px 0 20px; }
.afc-tables-intro h2 { margin: 0; color: #fff; font: 800 23px/1.2 Manrope, sans-serif; }
.afc-tables-intro p { margin: 8px 0 0; color: #c8b7df; font: 500 12px/1.5 Manrope, sans-serif; }
.afc-fixture-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 18px 0 22px; }
.afc-matchday-picker, .afc-fixture-region { display: flex; flex-wrap: wrap; gap: 5px; }
.afc-matchday-picker button, .afc-fixture-region button {
  min-height: 33px;
  padding: 6px 11px;
  border: 1px solid rgba(206, 176, 246, .24);
  border-radius: 7px;
  color: #d6c8e6;
  background: #35214f;
  font: 800 10px/1.2 Manrope, sans-serif;
  cursor: pointer;
}
.afc-matchday-picker button[aria-pressed="true"], .afc-fixture-region button[aria-pressed="true"] { border-color: #c7a5f8; color: #261340; background: #c7a5f8; }
.afc-fixture-region-group + .afc-fixture-region-group { margin-top: 24px; }
.afc-fixture-region-group h3 { margin: 0 0 11px; color: #fff; font: 800 15px/1.2 Manrope, sans-serif; }
.afc-fixture-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.afc-empty-knockout { max-width: 670px; }
.afc-empty-knockout h2 { margin: 0; color: #fff; font: 800 20px/1.2 Manrope, sans-serif; }
.afc-empty-knockout p { color: #c8b7df; font: 500 13px/1.55 Manrope, sans-serif; }
.afc-bracket { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 12px; }
.afc-bracket-stage { padding: 15px; }
.afc-bracket-stage > p { margin: 5px 0 16px; color: #bda9d4; font: 600 10px/1.3 Manrope, sans-serif; }
.afc-bracket-list { display: grid; gap: 9px; }
.afc-bracket-pending { display: block; padding: 16px; border: 1px dashed rgba(206, 176, 246, .24); border-radius: 8px; color: #bba9d0; font: 600 11px/1.4 Manrope, sans-serif; }
.afc-tie-card, .afc-knockout-match { display: grid; width: 100%; padding: 10px; border: 1px solid rgba(206, 176, 246, .18); border-radius: 9px; background: rgba(16, 8, 31, .54); }
.afc-tie-club, .afc-knockout-match > span { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 29px; color: #d8c9e9; }
.afc-tie-club img, .afc-knockout-match img { width: 25px; height: 25px; object-fit: contain; }
.afc-tie-club span, .afc-knockout-match strong { overflow: hidden; font: 700 10px/1.2 Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.afc-tie-club strong, .afc-knockout-match b { color: #fff; font: 800 13px/1 Manrope, sans-serif; }
.afc-tie-club.is-winner, .afc-knockout-match .is-winner { color: #f1d49b; }
.afc-tie-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 7px; border-top: 1px solid rgba(206, 176, 246, .14); padding-top: 7px; }
.afc-tie-meta span { width: 100%; color: #b9a6ce; font: 600 9px/1.3 Manrope, sans-serif; }
.afc-tie-meta button { padding: 3px 5px; border: 0; border-radius: 4px; color: #d8bdf8; background: #3e285b; font: 800 9px/1.2 Manrope, sans-serif; cursor: pointer; }
.afc-tie-meta button:hover { background: #644189; }
.afc-knockout-match { gap: 3px; color: #fff; text-align: left; cursor: pointer; }
.afc-knockout-match:hover { border-color: #c6a4fa; }
.afc-knockout-match small { margin-top: 6px; color: #b9a6ce; font: 600 9px/1.2 Manrope, sans-serif; }
.afc-champion-panel { display: grid; justify-items: center; gap: 10px; padding: 36px 20px; border: 1px solid rgba(226, 198, 141, .45); border-radius: 15px; background: radial-gradient(circle at 50% 0, rgba(170, 123, 210, .31), transparent 65%), #2b1947; text-align: center; }
.afc-champion-emblem { display: grid; place-items: center; width: 112px; height: 112px; border: 1px solid rgba(226, 198, 141, .42); border-radius: 50%; background: rgba(19, 9, 36, .44); }
.afc-champion-emblem img { width: 82px; height: 82px; object-fit: contain; }
.afc-champion-panel h2 { margin: 8px 0 0; color: #fff; font: 800 clamp(22px, 3vw, 34px)/1.16 Manrope, sans-serif; }
.afc-champion-panel p { margin: 0 0 12px; color: #d2c0e7; font: 600 13px/1.45 Manrope, sans-serif; }
.afc-restart-dialog { width: min(420px, calc(100vw - 28px)); padding: 22px; border: 1px solid rgba(206, 176, 246, .4); border-radius: 14px; color: #fff; background: #281740; box-shadow: 0 22px 65px rgba(0, 0, 0, .5); font-family: Manrope, sans-serif; }
.afc-restart-dialog::backdrop { background: rgba(8, 4, 17, .74); }
.afc-restart-dialog h2 { margin: 0; font: 800 18px/1.25 Manrope, sans-serif; }
.afc-restart-dialog p { margin: 9px 0 20px; color: #c9b6df; font: 600 12px/1.5 Manrope, sans-serif; }
.afc-restart-dialog > div { display: flex; justify-content: flex-end; gap: 8px; }
.afc-restart-dialog button { min-height: 38px; padding: 8px 12px; border: 1px solid rgba(206, 176, 246, .32); border-radius: 8px; color: #fff; background: #43295f; font: 800 11px/1.2 Manrope, sans-serif; cursor: pointer; }
.afc-restart-dialog button:last-child { border-color: #c7a5f8; color: #281740; background: #c7a5f8; }
body.afc-route-setup-active :is(.afc-season, .afc-restart-dialog) :focus-visible { outline: 2px solid #d4b9ff; outline-offset: 3px; }

@media (max-width: 1050px) {
  .afc-bracket { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .afc-overview-layout { grid-template-columns: 1fr; }
  #afcStageBar { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
}

@media (max-width: 700px) {
  #afcEliteMatchPanel .afc-panel-heading { padding: 8px; }
  #afcEliteMatchPanel .afc-panel-heading h2 { font-size: 12px; }
  #afcEliteMatchPanel .afc-panel-heading > span { display: none; }
  #afcEliteMatchPanel .afc-table-club { gap: 3px; }
  #afcEliteMatchPanel .afc-table-club img { width: 19px; height: 19px; }
  #afcEliteMatchPanel .afc-table-club span { max-width: 54px; }
  #afcEliteMatchPanel .afc-table :is(th, td):is(:nth-child(4), :nth-child(5), :nth-child(6)) { display: none; }
  .afc-season { padding: 18px 11px 60px; }
  .afc-season-hero { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 18px; }
  .afc-season-identity { gap: 11px; }
  .afc-season-identity > img { width: 50px; height: 50px; }
  .afc-season-identity h1 { font-size: 21px; }
  .afc-season-identity p { margin-top: 4px; font-size: 11px; }
  .afc-season-header-actions { justify-content: flex-start; }
  .afc-stage-bar { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px; }
  .afc-stage-progress { width: 100%; text-align: left; }
  .afc-season-tabs { gap: 21px; margin: 11px 0 18px; }
  .afc-overview-columns, .afc-tables-layout, .afc-recent-grid, .afc-fixture-list { grid-template-columns: 1fr; }
  .afc-bracket { grid-template-columns: 1fr; }
  .afc-recent-panel, .afc-fixtures-panel, .afc-empty-knockout { padding: 15px; }
  .afc-next-matchup { gap: 8px; margin-inline: 14px; }
  .afc-next-club { gap: 7px; }
  .afc-next-matchup img { width: 32px; height: 32px; }
  .afc-table { min-width: 420px; }
  .afc-table-panel.is-compact .afc-table { min-width: 0; }
  .afc-table-panel.is-compact .afc-table th, .afc-table-panel.is-compact .afc-table td { padding: 7px 3px; }
  .afc-table-panel.is-compact .afc-table-club span { max-width: 145px; }
}

@media (max-width: 380px) {
  .afc-next-actions { flex-direction: column; }
  .afc-season-identity h1 { font-size: 19px; }
  .afc-matchday-picker button { padding-inline: 8px; }
  .afc-fixture-club strong { font-size: 10px; }
  .afc-fixture-card { gap: 4px; padding-inline: 9px; }
}

body.afc-route-setup-active :focus-visible { outline: 2px solid #d4b9ff; outline-offset: 3px; }

@media (max-width: 850px) {
  #afcSeason { width: calc(100% - 28px); padding: 22px 0 60px; }
  #afcStageBar { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-inline: 0; padding: 0; }
  #afcStageBar > .ucl-back-button { grid-area: 1 / 1; }
  #afcStageBar .afc-stage-identity { grid-area: 2 / 1; }
  #afcSeasonTabs { margin: 0; gap: 0; }
  #afcSeasonTabs button { min-width: 0; padding: 0 10px; }
  #afcSeason .afc-overview-layout { grid-template-columns: minmax(0, 1fr); }
  #afcSeason .afc-table { min-width: 0; }
  #afcSeason .afc-table-club span { max-width: 130px; }
  #afcStageBar h1 { font-size: 17px; }
}

@media (max-width: 640px) {
  body.afc-route-setup-active #afcSimulatorScreen #afcRestartButton { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
}

@media (max-width: 600px) {
  body.afc-route-setup-active .afc-inline-team-toolbar { display: flex !important; align-items: flex-start; flex-wrap: wrap; }
  body.afc-route-setup-active .afc-inline-team-toolbar > .setup-neutral-choice,
  body.afc-route-setup-active .afc-inline-team-toolbar > .afc-view-squad { width: auto !important; flex: 1 1 calc(50% - 6px); }
  .afc-club-filter-row { align-items: flex-start; }
}

@media (max-width: 390px) {
  body.afc-route-setup-active .afc-simulator-header .ucl-header-actions a[aria-label="Feedback"],
  body.afc-route-setup-active .afc-simulator-header .ucl-header-actions a[aria-label="Achievements"] { display: none; }
}

/* Shared account achievements keep the AFC palette on every entry surface. */
html body [data-achievement-theme="afc-champions-league-elite-2026-27"] {
  --popup-blue-850: #3e1b54;
  --popup-blue-950: #11091f;
  --popup-blue-text: #ffffff;
  --popup-blue-muted: #e1d1f4;
  --popup-blue-accent: #d7bdf8;
  --popup-blue-accent-bright: #eadbff;
  --popup-blue-line: #a782d5;
}
html body #achievementsScreen[data-achievement-theme="afc-champions-league-elite-2026-27"],
html body #retroAchievementsModal[data-achievement-theme="afc-champions-league-elite-2026-27"] {
  --achievement-accent: #d7bdf8;
  --achievement-accent-text: #21113e;
  --achievement-surface: #3e1b54;
  --achievement-surface-deep: #11091f;
  --achievement-tab-surface: #21113e;
  --achievement-card: #312052;
  --achievement-card-complete: #563777;
  --achievement-copy: #f5efff;
  --achievement-muted: #c9b8df;
  --achievement-points: #e2c58c;
  --achievement-shadow: #11091f80;
}
html body :is(.achievement-unlock-banner, .achievement-unlock-modal)[data-achievement-theme="afc-champions-league-elite-2026-27"] {
  border-top-color: #d7bdf8;
  color: #fff;
  background: linear-gradient(145deg, #3e1b54, #11091f);
}
html body [data-achievement-theme="afc-champions-league-elite-2026-27"] :is(.achievement-unlock-mark, .achievement-unlock-banner-mark, .achievement-unlock-action) {
  color: #21113e;
  background: #d7bdf8;
}
html body [data-achievement-theme="afc-champions-league-elite-2026-27"] :is(.retro-achievements-logo, .achievement-unlock-tournament-logo) { filter: none; }
html body .achievement-unlock-modal[data-achievement-theme="afc-champions-league-elite-2026-27"] p { color: #e1d1f4; }
html body #achievementUnlockModal[data-achievement-theme="afc-champions-league-elite-2026-27"][open] {
  background: linear-gradient(145deg, #3e1b54, #11091f) !important;
}
html body #achievementUnlockModal[data-achievement-theme="afc-champions-league-elite-2026-27"] .achievement-unlock-kicker { display: none; }
html body #achievementUnlockModal[data-achievement-theme="afc-champions-league-elite-2026-27"] .achievement-unlock-action {
  color: #21113e !important;
  background: #d7bdf8 !important;
}
html body #achievementUnlockModal[data-achievement-theme="afc-champions-league-elite-2026-27"][open] .achievement-unlock-close {
  color: #e1d1f4 !important;
  background: #312052 !important;
  border-color: #a782d5 !important;
}
html body #achievementUnlockModal[data-achievement-theme="afc-champions-league-elite-2026-27"][open]::backdrop { background: #11091fc7 !important; }
#afcSetup .afc-achievement-note { color: #e1d1f4; margin-top: 4px; }
#afcAchievementFilter[aria-pressed="true"] { background: #563777; border-color: #d7bdf8; }
