:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --surface: #fffaf4;
  --surface-strong: #ffffff;
  --text: #171513;
  --muted: #686159;
  --line: #ded6cc;
  --primary: #006847;
  --primary-strong: #005139;
  --accent: #ce1126;
  --gold: #d6a443;
  --shadow: 0 18px 50px rgba(38, 31, 24, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1116;
  --surface: #161b22;
  --surface-strong: #1e252e;
  --text: #eef2f5;
  --muted: #9ea8b3;
  --line: #2b3440;
  --primary: #16a86b;
  --primary-strong: #30c984;
  --accent: #ff4d5e;
  --gold: #e5bd63;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 104, 71, 0.12), transparent 34rem),
    linear-gradient(180deg, rgba(206, 17, 38, 0.05), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

body.is-loading {
  overflow: hidden;
}

#app-loader {
  align-items: center;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 26px;
  inset: 0;
  justify-content: center;
  position: fixed;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 9999;
}

#app-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.loader-brand {
  align-items: center;
  display: flex;
  font-family: Sora, sans-serif;
  font-size: 25px;
  font-weight: 800;
  gap: 14px;
}

.loader-brand img {
  height: 42px;
  width: 42px;
}

.loader-brand span span {
  color: var(--primary);
}

.loader-bar {
  background: color-mix(in srgb, var(--text) 12%, transparent);
  height: 3px;
  overflow: hidden;
  position: relative;
  width: 150px;
}

.loader-bar::after {
  animation: loader-slide 1.1s infinite ease-in-out;
  background: var(--primary);
  content: "";
  height: 100%;
  left: -42%;
  position: absolute;
  top: 0;
  width: 42%;
}

@keyframes loader-slide {
  from {
    left: -42%;
  }
  to {
    left: 100%;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1220px;
  padding: 22px 22px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 10px 28px rgba(38, 31, 24, 0.08);
}

.brand {
  align-items: center;
  display: flex;
  font-family: Sora, sans-serif;
  font-size: 20px;
  font-weight: 800;
  gap: 10px;
}

.brand span span {
  color: var(--primary);
}

.brand-logo {
  height: 40px;
  width: 40px;
}

.top-nav {
  align-items: center;
  display: flex;
  gap: 6px;
}

.top-nav a,
.theme-toggle,
.small-button {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 13px;
}

.top-nav a:hover,
.theme-toggle:hover,
.small-button:hover {
  border-color: var(--primary);
  color: var(--text);
}

.top-nav a.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.lang-toggle {
  align-items: center;
  display: flex;
  gap: 4px;
}

.lang-toggle button,
.team-toolbar button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 9px 12px;
}

.lang-toggle button.is-active,
.team-toolbar button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

[hidden] {
  display: none !important;
}

.theme-toggle,
.small-button {
  background: var(--surface);
  cursor: pointer;
}

main {
  margin: 0 auto;
  max-width: 1220px;
  padding: 22px;
}

.hero {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  min-height: 470px;
  padding: 48px 0 34px;
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Sora, sans-serif;
}

h1 {
  font-size: clamp(44px, 7vw, 86px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 22px;
  max-width: 870px;
}

.hero-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.live-panel,
.section-main,
.side-panel,
.section {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.live-panel {
  align-self: center;
  padding: 22px;
}

.panel-top {
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 10px;
  padding-bottom: 18px;
}

.panel-top strong {
  color: var(--primary);
  margin-left: auto;
}

.live-dot {
  animation: pulse 1.4s infinite;
  background: var(--accent);
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.score-card {
  background:
    linear-gradient(135deg, rgba(0, 104, 71, 0.9), rgba(18, 26, 37, 0.94)),
    var(--primary);
  color: #fff;
  margin: 22px 0;
  min-height: 230px;
  padding: 24px;
}

.score-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.score-card h2 {
  font-size: 32px;
  line-height: 1.1;
  margin: 54px 0 12px;
}

.score-card p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.mini-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.mini-stats div {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  padding: 14px;
}

.hero-scoreboard {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  margin: 18px 0 8px;
}

.hero-score {
  background: #ffffff;
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 34px;
  line-height: 1;
  padding: 10px 14px;
}

.hero-team {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.hero-team b {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-team.is-away {
  justify-content: flex-end;
}

.mini-stats strong {
  display: block;
  font-family: Sora, sans-serif;
  font-size: 24px;
}

.mini-stats span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.ticker {
  align-items: center;
  background: var(--text);
  color: var(--bg);
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
  overflow: hidden;
  padding: 14px 18px;
}

.ticker span {
  color: var(--gold);
  flex: 0 0 auto;
  font-family: Sora, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticker div {
  color: color-mix(in srgb, var(--bg) 82%, transparent);
  white-space: nowrap;
}

.section-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-bottom: 24px;
}

.fixtures-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.section-main,
.side-panel,
.section {
  padding: 22px;
}

.two-column-section {
  display: grid;
  gap: 24px;
  grid-template-columns: 0.8fr 1.2fr;
}

#venuesSection.two-column-section {
  grid-template-columns: 1fr;
}

.section {
  margin-bottom: 24px;
}

.section-title {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.section-title h2 {
  font-size: 28px;
  margin-bottom: 0;
}

.section-title.compact {
  margin-bottom: 16px;
}

.sync-label {
  color: var(--muted);
  font-size: 13px;
}

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

.match-card {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  padding: 16px;
}

.match-date,
.match-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-teams {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: Sora, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.team-inline {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
}

.team-inline.small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flag,
.flag-fallback {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  flex: 0 0 auto;
  object-fit: contain;
}

.flag.md,
.flag-fallback.md {
  height: 28px;
  width: 28px;
}

.flag.sm,
.flag-fallback.sm {
  height: 22px;
  width: 22px;
}

.flag.lg,
.flag-fallback.lg {
  height: 42px;
  margin-bottom: 12px;
  width: 42px;
}

.flag-fallback {
  align-items: center;
  color: var(--primary);
  display: inline-flex;
  font-family: Sora, sans-serif;
  font-size: 10px;
  font-weight: 800;
  justify-content: center;
}

.match-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.match-score {
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 22px;
  font-weight: 800;
  min-width: 54px;
  text-align: right;
}

.text-link {
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.news-item {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 260px;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.news-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.news-item h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
}

.news-image {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  object-fit: cover;
  width: 100%;
}

.news-body {
  padding: 14px;
}

.news-source {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.news-source img {
  height: 16px;
  object-fit: contain;
  width: 16px;
}

.news-source span:last-child {
  margin-left: auto;
}

.groups-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.group-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  overflow: hidden;
}

.group-card-head {
  align-items: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.group-card h3 {
  color: var(--primary);
  font-size: 15px;
  margin: 0;
}

.group-card-head span {
  color: var(--muted);
  font-family: Sora, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 34px 42px 42px 82px;
  padding: 9px 14px;
}

.group-row-head {
  background: var(--surface);
  color: var(--muted);
  font-family: Sora, sans-serif;
  font-size: 10px;
  font-weight: 800;
  min-height: 30px;
  text-transform: uppercase;
}

.group-row-head span {
  text-align: right;
}

.group-row-head span:first-child {
  text-align: left;
}

.group-row span:first-child {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-team-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.group-team-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-team-button:hover span {
  color: var(--primary);
  text-decoration: underline;
}

.group-row span:not(:first-child) {
  color: var(--muted);
  font-family: Sora, sans-serif;
  font-size: 12px;
  text-align: right;
}

.group-row em {
  border: 1px solid var(--line);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  padding: 5px 7px;
  text-align: center;
  text-transform: uppercase;
}

.group-row.is-advance {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.group-row.is-advance em {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
}

.group-row.is-third em {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: #9b6a08;
}

.group-row.is-risk {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.group-row.is-risk em {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.team-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.back-link {
  color: var(--primary);
  display: inline-block;
  font-family: Sora, sans-serif;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
  text-decoration: none;
  text-transform: uppercase;
}

.team-page {
  max-width: 1180px;
}

.team-page-hero,
.team-page-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.team-page-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
}

.team-page-identity {
  align-items: center;
  display: flex;
  gap: 18px;
}

.team-page-identity h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
  margin: 4px 0 10px;
}

.team-page-identity p:last-child {
  color: var(--muted);
  margin: 0;
  max-width: 760px;
}

.team-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-page-meta span,
.card-title-row > span {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid var(--line);
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 9px;
  text-transform: uppercase;
}

.team-page-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.25fr 0.75fr;
  margin-bottom: 18px;
}

.team-page-card {
  padding: 18px;
}

.card-title-row {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.card-title-row h2,
.team-page-card h2 {
  font-size: 26px;
  margin: 0;
}

.team-fixture-list,
.team-action-list,
.team-profile-lines {
  display: grid;
  gap: 10px;
}

.team-fixture-card,
.team-action-row,
.squad-table-row {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.team-fixture-card {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.team-fixture-card > span,
.team-fixture-card em,
.team-action-row span,
.team-action-row em,
.squad-table-row span,
.squad-table-row em {
  color: var(--muted);
  font-style: normal;
}

.team-fixture-card strong {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.team-fixture-card b {
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 20px;
}

.team-profile-lines p {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin: 0;
  padding-top: 10px;
}

.team-profile-lines b {
  font-family: Sora, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
}

.team-squad-section {
  margin-bottom: 18px;
}

.squad-table {
  display: grid;
}

.squad-table-row {
  align-items: center;
  border-top: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1.1fr) 80px;
  padding: 10px 12px;
}

.squad-table-row + .squad-table-row {
  border-top: 1px solid var(--line);
}

.squad-table-row strong,
.squad-table-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-action-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1.4fr) auto;
  padding: 11px 12px;
}

.team-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 18px;
}

.team-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-height: 118px;
  padding: 14px;
}

.team-card:hover {
  border-color: var(--primary);
}

.team-card strong {
  display: block;
  font-family: Sora, sans-serif;
  font-size: 14px;
  margin-bottom: 4px;
}

.team-card span {
  color: var(--muted);
  font-size: 12px;
}

.team-meta-row,
.team-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.team-meta-row small,
.team-modal-meta b {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid var(--line);
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 7px;
}

.stats-subtitle {
  color: var(--muted);
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 8px 0 0;
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-board {
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.see-more {
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--primary);
  cursor: pointer;
  font-family: Sora, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 13px 16px;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.fixture-summary {
  display: grid;
  gap: 14px;
}

.summary-card {
  background:
    linear-gradient(135deg, rgba(0, 104, 71, 0.94), rgba(14, 17, 22, 0.94)),
    var(--primary);
  color: #fff;
  padding: 18px;
}

.summary-card span {
  color: rgba(255, 255, 255, 0.72);
  display: block;
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  font-family: Sora, sans-serif;
  font-size: 20px;
  line-height: 1.25;
}

.summary-card p {
  color: rgba(255, 255, 255, 0.75);
  margin: 10px 0 0;
}

.summary-list {
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.summary-list h3 {
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  margin: 0;
  padding: 12px;
}

.summary-list div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 12px;
}

.summary-list div:last-child {
  border-bottom: 0;
}

.summary-list span {
  font-weight: 700;
}

.summary-list b {
  color: var(--muted);
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-board-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.stat-board-head h3 {
  font-size: 18px;
  margin: 0;
}

.stat-board-head span {
  color: var(--muted);
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scorers-list,
.assists-list,
.venue-grid {
  display: grid;
}

.stat-row {
  align-items: center;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px 38px minmax(0, 1fr) 42px;
  padding: 14px 16px;
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-rank {
  align-items: center;
  background: color-mix(in srgb, var(--gold) 24%, transparent);
  color: var(--gold);
  display: inline-flex;
  font-family: Sora, sans-serif;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.stat-player strong,
.venue-card strong {
  display: block;
  font-family: Sora, sans-serif;
}

.stat-player button,
.player-link,
.squad-player {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: block;
  font-family: Sora, sans-serif;
  font-size: 16px;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.stat-player button:hover,
.player-link:hover,
.squad-player:hover b {
  color: var(--primary);
}

.stat-player span {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 5px;
  font-size: 12px;
  margin-top: 3px;
}

.stat-player small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 5px;
}

.stat-row b {
  color: var(--primary);
  font-family: Sora, sans-serif;
  font-size: 24px;
  text-align: right;
}

.player-photo {
  background: var(--surface);
  border: 1px solid var(--line);
  height: 34px;
  object-fit: cover;
  width: 34px;
}

.player-initials {
  align-items: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-strong));
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 34px;
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.02em;
}

.player-photo.fallback {
  align-items: center;
  color: var(--primary);
  display: inline-flex;
  font-family: Sora, sans-serif;
  font-weight: 800;
  justify-content: center;
}

.flag.xs,
.flag-fallback.xs {
  height: 14px;
  width: 14px;
}

.venue-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.venue-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent),
    var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.venue-card:hover,
.match-card:hover {
  border-color: var(--primary);
}

.venue-image {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  object-fit: cover;
  width: 100%;
}

.venue-body {
  padding: 16px;
}

.venue-card span {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.venue-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 6px 0 14px;
}

.venue-card div {
  color: var(--muted);
  font-family: Sora, sans-serif;
  font-size: 12px;
}

.empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 20px;
}

.site-footer {
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1220px;
  padding: 28px 22px 44px;
}

.site-footer span:first-child {
  color: var(--text);
  font-family: Sora, sans-serif;
  font-weight: 800;
}

.team-modal {
  display: none;
  inset: 0;
  position: fixed;
  z-index: 9998;
}

.team-modal.is-open {
  display: block;
}

.team-modal-backdrop {
  background: rgba(0, 0, 0, 0.52);
  inset: 0;
  position: absolute;
}

.team-modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 48px);
  max-width: 980px;
  overflow: auto;
  padding: 24px;
  position: relative;
  margin: 24px auto;
  width: calc(100% - 32px);
}

.modal-close {
  background: var(--text);
  border: 0;
  color: var(--bg);
  cursor: pointer;
  font-size: 24px;
  height: 40px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 40px;
}

.team-modal-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.team-modal-head h2 {
  font-size: 34px;
  margin: 8px 0;
}

.team-modal-head span {
  color: var(--muted);
}

.team-detail-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.2fr 0.8fr;
}

.venue-detail-head,
.match-detail-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.venue-detail-head {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 260px minmax(0, 1fr);
}

.venue-detail-head img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.venue-detail-grid,
.match-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.venue-detail-grid article,
.match-detail-grid article,
.match-events article {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  padding: 14px;
}

.venue-detail-grid span,
.match-detail-grid span {
  color: var(--primary);
  display: block;
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.match-card {
  color: var(--text);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.match-detail-head h2 {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.match-detail-head h2 span {
  color: var(--primary);
}

.match-events {
  margin-top: 18px;
}

.match-events article {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.goal-event {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) minmax(150px, auto);
}

.assist-chip {
  align-items: center;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid var(--line);
  display: grid;
  gap: 2px 8px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 8px 10px;
}

.assist-chip small {
  color: var(--primary);
  display: block;
  font-family: Sora, sans-serif;
  font-size: 10px;
  font-weight: 800;
  grid-column: 2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assist-chip b {
  display: block;
  font-family: Sora, sans-serif;
  grid-column: 2;
}

.assist-chip .player-photo {
  grid-row: 1 / span 2;
  height: 30px;
  width: 30px;
}

.squad-card {
  display: grid;
  gap: 8px;
}

.squad-player {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  display: flex;
  gap: 10px;
  padding: 10px;
}

.squad-player > span {
  display: block;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.squad-player em {
  color: var(--muted);
  display: block;
  font-style: normal;
  margin-top: 3px;
}

.player-detail-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.player-detail-head .player-photo {
  height: 64px;
  width: 64px;
}

.team-matches,
.team-scorers {
  display: grid;
  gap: 10px;
}

.team-match-row,
.team-scorer-row,
.qualification-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  padding: 12px;
}

button.qualification-card {
  color: var(--text);
  cursor: pointer;
  display: block;
  text-align: left;
  width: 100%;
}

button.qualification-card:hover {
  border-color: var(--primary);
}

.team-profile-card strong {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.team-profile-card em {
  color: var(--primary);
  display: block;
  font-family: Sora, sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  margin-top: 8px;
  text-transform: uppercase;
}

.team-profile-panel[hidden] {
  display: none;
}

.profile-player-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin-top: 8px;
  padding: 9px;
  text-align: left;
  width: 100%;
}

.profile-player-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-player-row em,
.profile-player-row small {
  color: var(--muted);
  font-style: normal;
}

.team-match-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 130px minmax(86px, auto);
}

.team-match-row div,
.team-match-opponent,
.team-scorer-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.team-match-opponent {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.team-match-row span,
.team-scorer-row span,
.qualification-card span {
  color: var(--muted);
  font-size: 13px;
}

.team-match-row b {
  color: var(--primary);
  font-family: Sora, sans-serif;
  text-align: right;
  white-space: nowrap;
}

.team-match-row div,
.team-match-row strong,
.team-modal-head span,
.qualification-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .site-header,
  .top-nav,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .section-grid,
  .two-column-section {
    grid-template-columns: 1fr;
  }

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

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

  .news-grid,
  .stats-grid,
  .venue-grid,
  .team-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-detail-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  .site-header,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: 44px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .match-score {
    text-align: left;
  }

  .groups-grid,
  .team-grid,
  .mini-stats,
  .news-grid,
  .stats-grid,
  .venue-grid {
    grid-template-columns: 1fr;
  }

  .team-match-row {
    grid-template-columns: 1fr;
  }

  .group-row {
    grid-template-columns: minmax(0, 1fr) 24px 24px 28px;
  }

  .group-row em {
    grid-column: 1 / -1;
    text-align: left;
  }

  .team-match-row b {
    text-align: left;
  }
}
