:root {
  --ink: #111312;
  --muted: #59605c;
  --paper: #f6f7f1;
  --panel: #ffffff;
  --line: rgba(17, 19, 18, 0.12);
  --pitch: #0f6b45;
  --pitch-dark: #073b29;
  --acid: #c9ff3d;
  --sun: #f4bd2f;
  --red: #e74734;
  --cyan: #0aa8ba;
  --violet: #6751e8;
  --shadow: 0 18px 60px rgba(17, 19, 18, 0.16);
  --side-ad-width: 72px;
  --fixed-header-height: 59px;
  --nav-item-width: 96px;
  --nav-item-height: 38px;
  --nav-font-size: 11.2px;
  --team-flag-width: 22px;
  --team-flag-height: 16px;
  --team-label-size: 10.9px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--fixed-header-height) + 18px);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: var(--fixed-header-height);
  min-height: var(--fixed-header-height);
  max-height: var(--fixed-header-height);
  padding: 10px 20px;
  overflow: hidden;
  color: #fff;
  background: rgba(17, 19, 18, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  backdrop-filter: blur(18px);
  font-size: 16px;
}

.ad-slot {
  position: fixed;
  pointer-events: auto;
}

.ad-slot-right {
  top: calc(var(--fixed-header-height) + 10px);
  bottom: 10px;
  right: 8px;
  z-index: 9;
  width: var(--side-ad-width);
  background:
    linear-gradient(180deg, rgba(201, 255, 61, 0.1), rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 28px);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.ad-slot .adsbygoogle {
  display: block;
  width: 100%;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  height: 38px;
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  border-radius: 8px;
  font-weight: 950;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex: 1 1 auto;
  height: 38px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 var(--nav-item-width);
  width: var(--nav-item-width);
  height: var(--nav-item-height);
  min-height: var(--nav-item-height);
  max-height: var(--nav-item-height);
  padding: 6px 5px;
  color: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  font-size: var(--nav-font-size);
  line-height: 1;
  font-weight: 800;
  text-align: center;
}

.top-nav a span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  display: inline-grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: var(--ink);
  background: rgba(201, 255, 61, 0.92);
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 950;
}

.nav-icon svg {
  width: 13px;
  height: 13px;
}

.top-nav a:hover,
.top-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  height: 38px;
  min-width: 170px;
  overflow: hidden;
}

.social-button,
.login-menu-button,
.lang-switch button,
.dialog-close {
  display: inline-flex;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
}

.login-menu-button {
  gap: 7px;
  width: auto;
  max-width: 190px;
  padding: 0 12px;
}

.login-menu-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-menu-button svg {
  width: 16px;
  height: 16px;
}

.social-button.google {
  background: #fff;
  color: #1f1f1f;
}

.social-button.facebook {
  background: #1877f2;
  border-color: #1877f2;
}

.social-button.instagram {
  background: linear-gradient(135deg, #f9ce34, #ee2a7b 44%, #6228d7);
  border-color: rgba(255, 255, 255, 0.28);
}

.lang-switch {
  display: inline-flex;
  padding: 2px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.lang-switch button {
  width: auto;
  min-width: 48px;
  height: 30px;
  gap: 5px;
  border-color: transparent;
  background: transparent;
}

.lang-switch button.active {
  color: var(--ink);
  background: var(--acid);
}

.hero {
  position: relative;
  min-height: 92svh;
  padding: 82px 20px 34px;
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 16, 13, 0.88), rgba(7, 16, 13, 0.54) 48%, rgba(7, 16, 13, 0.14)),
    url("assets/images/home-fans.jpg")
      center 36% / cover no-repeat;
}

.hero-home {
  min-height: 100svh;
}

@media (min-width: 1181px) {
  body[data-page="home"] {
    height: 100svh;
    overflow: hidden;
  }

  body[data-page="home"] .site-footer {
    display: none;
  }

  .hero-home {
    height: 100svh;
    min-height: 0;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(246, 247, 241, 0), var(--paper));
  pointer-events: none;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 74%, rgba(201, 255, 61, 0.2), transparent 20rem),
    radial-gradient(circle at 82% 30%, rgba(231, 71, 52, 0.18), transparent 23rem);
  mix-blend-mode: screen;
}

.hero-inner,
.section-inner,
.page-head {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.72fr);
  gap: 28px;
  align-items: end;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--pitch);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3.7rem, 10vw, 10rem);
  font-weight: 950;
}

.page-head h1 {
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(4.7rem, 14vw, 13.5rem);
}

.hero-home h1 {
  font-size: clamp(3.8rem, 10vw, 8.4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 930;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  font-weight: 880;
}

.hero-lede,
.page-head p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.08rem, 1.5vw, 1.34rem);
}

.page-head p:last-child {
  color: rgba(17, 19, 18, 0.68);
  max-width: 650px;
  margin-top: 6px;
  font-size: clamp(0.86rem, 1vw, 0.98rem);
}

.dark-page .page-head p:last-child {
  color: rgba(255, 255, 255, 0.74);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(17, 19, 18, 0.16);
}

.button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.button-primary {
  background: var(--acid);
}

.button-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.button-compact {
  min-height: 40px;
  padding: 9px 12px;
  background: var(--ink);
  color: #fff;
}

.button-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.hero-panel,
.feature-card,
.group-compact-card,
.bracket-shell,
.quiz-card,
.table-wrap,
.history-era,
.score-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(17, 19, 18, 0.08);
}

.hero-panel {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.panel-topline strong {
  color: var(--acid);
}

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

.hero-block {
  display: grid;
  grid-template-columns: auto 34px;
  gap: 7px;
  min-height: 92px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-block .mini-icon {
  grid-column: 2;
  grid-row: 1;
}

.hero-block h3 {
  grid-column: 1 / -1;
  align-self: end;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.08;
}

.hero-block p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.22;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.metric-grid div,
.summary-pill {
  padding: 12px;
  color: var(--ink);
  background: #f1f3ec;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-grid strong,
.summary-pill strong {
  display: block;
  font-size: 1.42rem;
  line-height: 1;
}

.metric-grid span,
.summary-pill span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mini-feature-list {
  display: grid;
  gap: 8px;
}

.mini-feature-list a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px;
  background: #f7f8f3;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--pitch-dark);
  background: var(--acid);
  border-radius: 8px;
}

.mini-icon svg {
  width: 18px;
  height: 18px;
}

.auth-status {
  min-height: 26px;
  margin-top: 16px;
  color: var(--acid);
  font-size: 0.88rem;
  font-weight: 850;
}

.page-main {
  min-height: 100svh;
  padding-top: 72px;
}

.simulation-main {
  padding-top: 62px;
}

body[data-page="simulation"] {
  color: #eef4ee;
  background: #0d1110;
}

body:not([data-page="home"]) {
  color: #eef4ee;
  background: #0d1110;
}

body:not([data-page="home"]) .page-main,
body:not([data-page="home"]) .section,
body:not([data-page="home"]) .section-squads,
body:not([data-page="home"]) .section-quiz {
  background: transparent;
}

body:not([data-page="home"]) .section-kicker {
  color: var(--acid);
}

body:not([data-page="home"]) .page-head p:last-child {
  color: rgba(238, 244, 238, 0.68);
}

body:not([data-page="home"]) .summary-pill,
body:not([data-page="home"]) .insight-card,
body:not([data-page="home"]) .calendar-day,
body:not([data-page="home"]) .venue-card,
body:not([data-page="home"]) .quiz-card,
body:not([data-page="home"]) .table-wrap {
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.12);
}

body:not([data-page="home"]) .summary-pill,
body:not([data-page="home"]) .calendar-day,
body:not([data-page="home"]) .venue-card,
body:not([data-page="home"]) .insight-card {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

body:not([data-page="home"]) .summary-pill span,
body:not([data-page="home"]) .insight-card span,
body:not([data-page="home"]) .insight-card p,
body:not([data-page="home"]) .calendar-day-head span,
body:not([data-page="home"]) .stage-pill,
body:not([data-page="home"]) .venue-title-row span,
body:not([data-page="home"]) .venue-card-body p,
body:not([data-page="home"]) .venue-match-chips small {
  color: rgba(238, 244, 238, 0.62);
}

body:not([data-page="home"]) .calendar-day-head,
body:not([data-page="home"]) .calendar-match,
body:not([data-page="home"]) .data-table th,
body:not([data-page="home"]) .data-table td {
  border-color: rgba(255, 255, 255, 0.1);
}

body:not([data-page="home"]) .data-table th {
  color: rgba(238, 244, 238, 0.62);
  background: #121817;
}

body:not([data-page="home"]) .calendar-meta span,
body:not([data-page="home"]) .calendar-venue-trigger,
body:not([data-page="home"]) .venue-facts span,
body:not([data-page="home"]) .venue-match-chips span,
body:not([data-page="home"]) .mini-list div,
body:not([data-page="home"]) .select,
body:not([data-page="home"]) .search-field {
  color: rgba(238, 244, 238, 0.78);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.1);
}

body:not([data-page="home"]) .search-field input {
  color: #eef4ee;
}

body[data-page="simulation"] .section {
  background: transparent;
}

body[data-page="simulation"] .group-compact-card {
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-page="simulation"] .matrix-corner {
  color: var(--ink);
  background: var(--acid);
}

body[data-page="simulation"] .matrix-head,
body[data-page="simulation"] .matrix-stat-head,
body[data-page="simulation"] .matrix-team,
body[data-page="simulation"] .matrix-cell,
body[data-page="simulation"] .matrix-stat {
  color: rgba(238, 244, 238, 0.82);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-page="simulation"] .matrix-empty {
  background: rgba(255, 255, 255, 0.035);
}

body[data-page="simulation"] .matrix-cell span {
  color: rgba(238, 244, 238, 0.34);
}

body[data-page="simulation"] .matrix-team.qualified,
body[data-page="simulation"] .matrix-stat.qualified {
  color: #c9ff3d;
  background: rgba(201, 255, 61, 0.14);
  border-color: rgba(201, 255, 61, 0.28);
}

body[data-page="simulation"] .matrix-team.third-qualified,
body[data-page="simulation"] .matrix-stat.third-qualified {
  color: #f4bd2f;
  background: rgba(244, 189, 47, 0.16);
  border-color: rgba(244, 189, 47, 0.3);
}

.dark-page {
  color: #fff;
  background: #161817;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px 8px;
}

.section {
  padding: 72px 20px;
}

.section-tight {
  padding-top: 22px;
}

.simulation-main .section-tight {
  padding-top: 14px;
}

.matches-main .section-tight {
  padding-top: 12px;
}

.matches-main .section-inner {
  width: 100%;
  max-width: none;
}

.sim-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  background: rgba(17, 19, 18, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
}

.sim-dock-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 850;
}

.sim-dock-status span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  white-space: nowrap;
}

.sim-dock-status strong {
  color: var(--acid);
}

.sim-view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.sim-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
}

.sim-view-switch button.active {
  color: var(--ink);
  background: var(--acid);
}

.sim-view-switch svg {
  width: 15px;
  height: 15px;
}

.sim-panel[hidden] {
  display: none !important;
}

.section-squads {
  background: #fdfdf9;
}

.squads-main {
  padding-top: 62px;
}

.squads-compact {
  padding-top: 14px;
}

.section-quiz {
  background: linear-gradient(135deg, #eef8f2 0%, #f8f1ec 52%, #eef7fb 100%);
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.matches-main .section-toolbar {
  position: sticky;
  top: calc(var(--fixed-header-height) + 6px);
  z-index: 12;
  margin-bottom: 8px;
  padding: 6px;
  background: rgba(13, 17, 16, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(14px);
}

.simple-main .section-tight {
  padding-top: 18px;
}

.simple-board {
  display: grid;
  min-height: calc(100svh - 180px);
  align-items: center;
}

.simple-card {
  max-width: 760px;
  padding: 22px;
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.simple-card h1 {
  margin: 6px 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.simple-card p {
  margin: 0;
  color: rgba(238, 244, 238, 0.7);
  font-weight: 800;
}

.news-main .section-tight {
  padding-top: 14px;
}

.news-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.news-intro h1 {
  margin: 2px 0 0;
  color: #eef4ee;
  font-size: 1.45rem;
  line-height: 1.05;
}

.news-intro p {
  max-width: 650px;
  margin: 0;
  color: rgba(238, 244, 238, 0.64);
  font-size: 0.82rem;
  font-weight: 750;
}

.news-feed-shell {
  display: grid;
  gap: 14px;
}

.news-lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.news-card {
  min-width: 0;
  overflow: hidden;
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.news-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #151b19;
}

.news-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-image > span {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  color: #17130a;
  background: var(--sun);
  border-radius: 5px;
  font-size: 0.6rem;
  font-weight: 950;
  text-transform: uppercase;
}

.news-card-body {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 188px;
  padding: 11px;
}

.news-published {
  display: flex;
  align-items: center;
  gap: 7px;
}

.news-published span {
  color: rgba(238, 244, 238, 0.5);
  font-size: 0.62rem;
  font-weight: 900;
}

.news-main-card {
  grid-row: 1 / span 2;
}

.news-main-card .news-card-image {
  aspect-ratio: 16 / 9.2;
}

.news-main-card .news-card-body {
  min-height: 200px;
  padding: 15px;
}

.news-main-card h2 {
  font-size: 1.42rem;
}

.news-main-card p {
  font-size: 0.82rem;
}

.news-side-card {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
}

.news-side-card .news-card-image {
  height: 100%;
  min-height: 170px;
  aspect-ratio: auto;
}

.news-side-card .news-card-body {
  min-height: 0;
  padding: 9px;
}

.news-side-card h2 {
  font-size: 0.82rem;
}

.news-side-card p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.66rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-side-card .news-tags span {
  font-size: 0.52rem;
}

.news-lower-card {
  display: grid;
  grid-template-columns: 38% minmax(0, 1fr);
  min-height: 170px;
}

.news-lower-card .news-card-image {
  height: 100%;
  aspect-ratio: auto;
}

.news-lower-card .news-card-body {
  min-height: 0;
}

.news-card time {
  color: var(--acid);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.news-card h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.16;
}

.news-card p {
  margin: 0;
  color: rgba(238, 244, 238, 0.66);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.42;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.news-tags span {
  padding: 3px 6px;
  color: rgba(238, 244, 238, 0.76);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 900;
}

.news-card.history-story {
  border-color: rgba(244, 189, 47, 0.34);
}

.news-card.history-story time {
  color: var(--sun);
}

.sim-console-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sim-console-head .section-kicker {
  margin-bottom: 4px;
}

.sim-console-head h1 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

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

.feature-card {
  min-height: 260px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7, 59, 41, 0.94), rgba(15, 107, 69, 0.78)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 34px);
}

.feature-card:nth-child(2) {
  background: linear-gradient(145deg, #1b3f4a, #0aa8ba);
}

.feature-card:nth-child(3) {
  background: linear-gradient(145deg, #3c2d7d, #6751e8);
}

.feature-card:nth-child(4) {
  background: linear-gradient(145deg, #5b261f, #e74734);
}

.feature-number {
  display: inline-grid;
  width: 38px;
  height: 30px;
  place-items: center;
  margin-bottom: 50px;
  color: var(--ink);
  background: var(--acid);
  border-radius: 8px;
  font-weight: 950;
}

.feature-card h2 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.05;
}

.feature-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-pill {
  min-width: 120px;
  background: #fff;
}

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

.group-compact-card {
  display: grid;
  gap: 0;
  padding: 7px;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.group-compact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.group-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.group-card-head strong {
  font-size: 1.18rem;
}

.seed-count {
  padding: 4px 8px;
  color: var(--pitch-dark);
  background: rgba(201, 255, 61, 0.5);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.standings-list,
.score-chip-list,
.seed-list {
  display: grid;
  gap: 6px;
}

.standings-row,
.seed-row,
.fixture-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 7px;
  background: #f7f8f3;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.86rem;
}

.standings-row.qualifies {
  background: rgba(15, 107, 69, 0.09);
}

.standings-row.third {
  background: rgba(244, 189, 47, 0.14);
}

.team-label,
.history-country {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  font-weight: 800;
}

.flag {
  display: inline-grid;
  width: var(--team-flag-width);
  height: var(--team-flag-height);
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--flag-bg, #fff);
  border: 1px solid rgba(17, 19, 18, 0.12);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.flag-emoji {
  background: #fff;
  font-size: 1rem;
  line-height: 1;
}

.flag-code {
  color: var(--ink);
  background: #fff;
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0;
}

.flag-img {
  display: block;
  object-fit: cover;
  background: #fff;
}

.team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.score-chip {
  padding: 6px;
  background: #f1f3ec;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.group-score-matrix {
  display: grid;
  grid-template-columns: minmax(48px, 0.82fr) repeat(4, minmax(42px, 1fr)) 30px 30px 34px;
  gap: 2px;
  align-items: stretch;
}

.matrix-corner,
.matrix-head,
.matrix-stat-head,
.matrix-team,
.matrix-cell,
.matrix-stat {
  min-width: 0;
  min-height: 30px;
  padding: 3px;
  background: #f7f8f3;
  border: 1px solid rgba(17, 19, 18, 0.08);
  border-radius: 6px;
  font-size: 0.68rem;
}

.matrix-corner {
  display: grid;
  place-items: center;
  gap: 0;
  color: var(--ink);
  background: var(--acid);
  font-weight: 950;
  line-height: 1;
}

.matrix-corner small {
  color: rgba(17, 19, 18, 0.68);
  font-size: 0.58rem;
  font-weight: 950;
}

.matrix-head,
.matrix-stat-head,
.matrix-team,
.matrix-stat {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 950;
}

.matrix-stat {
  color: var(--ink);
  background: rgba(201, 255, 61, 0.2);
}

.matrix-team.qualified,
.matrix-stat.qualified {
  color: var(--pitch-dark);
  background: rgba(15, 107, 69, 0.13);
  border-color: rgba(15, 107, 69, 0.24);
}

.matrix-team.third-qualified,
.matrix-stat.third-qualified {
  color: #5b3b05;
  background: rgba(244, 189, 47, 0.24);
  border-color: rgba(244, 189, 47, 0.38);
}

.matrix-team .team-label {
  gap: 4px;
}

.matrix-team .team-name {
  max-width: 34px;
}

.matrix-team .flag {
  width: var(--team-flag-width);
  height: var(--team-flag-height);
}

.matrix-cell {
  display: grid;
  place-items: center;
  line-height: 1.05;
}

.matrix-cell strong {
  color: #f7ffcf;
  font-size: 0.78rem;
}

.matrix-cell span {
  color: rgba(238, 244, 238, 0.38);
  font-size: 0.58rem;
  font-weight: 850;
}

.matrix-empty {
  background: rgba(17, 19, 18, 0.04);
}

.bracket-shell {
  position: relative;
  padding: 8px;
  color: #eef4ee;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 255, 61, 0.13), transparent 32%),
    linear-gradient(135deg, #070a09 0%, #111817 48%, #080c0b 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
}

.bracket-grid {
  width: 100%;
  min-width: 0;
  min-height: 540px;
}

.bracket-transposed {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
}

.bracket-spine {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 50%;
  z-index: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(201, 255, 61, 0.72), rgba(244, 189, 47, 0.5), transparent);
  box-shadow: 0 0 26px rgba(201, 255, 61, 0.34);
  transform: translateX(-50%);
  pointer-events: none;
}

.bracket-path {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 48px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(201, 255, 61, 0.04);
}

.bracket-path.top {
  align-content: end;
}

.bracket-path.bottom {
  align-content: start;
}

.bracket-path.top::after,
.bracket-path.bottom::before {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  width: 2px;
  height: 12px;
  background: rgba(201, 255, 61, 0.55);
}

.bracket-path.top::after {
  bottom: -12px;
}

.bracket-path.bottom::before {
  top: -12px;
}

.bracket-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.bracket-path.top .bracket-row[data-count="1"] {
  transform: translateY(5px);
}

.bracket-path.bottom .bracket-row[data-count="1"] {
  transform: translateY(-5px);
}

.bracket-row-matches {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.bracket-row-matches .match-card {
  grid-column: span var(--slot-span);
  justify-self: center;
  width: min(100%, 158px);
}

.bracket-final-center {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 2px 0;
}

.final-stage {
  display: grid;
  width: min(860px, 100%);
  grid-template-columns: minmax(0, 0.9fr) minmax(190px, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 6px;
}

.final-side {
  min-width: 0;
}

.final-stack {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 6px;
  background: linear-gradient(135deg, rgba(201, 255, 61, 0.16), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(201, 255, 61, 0.24);
  border-radius: 12px;
  box-shadow: 0 0 36px rgba(201, 255, 61, 0.12);
}

.winner-card {
  display: grid;
  min-height: 58px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  color: #eef4ee;
  background: linear-gradient(145deg, rgba(201, 255, 61, 0.18), rgba(255, 255, 255, 0.075));
  border: 1px solid rgba(201, 255, 61, 0.26);
  border-radius: 8px;
}

.winner-card small {
  color: rgba(238, 244, 238, 0.6);
  font-size: 0.58rem;
  font-weight: 950;
  text-transform: uppercase;
}

.winner-card strong {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.round-title {
  z-index: 2;
  padding: 4px 3px;
  color: var(--acid);
  font-size: 0.56rem;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
  text-align: right;
}

.match-card {
  position: relative;
  min-height: 58px;
  padding: 4px;
  color: #eef4ee;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.065));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.match-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 255, 61, 0.7), transparent);
}

.match-card.final-match {
  color: var(--ink);
  background: linear-gradient(145deg, #c9ff3d 0%, #f4bd2f 100%);
  border-color: rgba(201, 255, 61, 0.9);
  box-shadow: 0 14px 40px rgba(201, 255, 61, 0.24);
}

.match-card.bronze-match {
  border-color: rgba(244, 189, 47, 0.34);
  background: linear-gradient(180deg, rgba(244, 189, 47, 0.18), rgba(255, 255, 255, 0.07));
}

.match-meta {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  color: rgba(238, 244, 238, 0.58);
  font-size: 0.51rem;
  font-weight: 900;
  text-transform: uppercase;
}

.final-match .match-meta,
.final-match .match-venue-line {
  color: rgba(17, 19, 18, 0.66);
}

.match-meta-center {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-trigger {
  min-width: 0;
  padding: 0;
  color: inherit;
  overflow: hidden;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-trigger:hover {
  color: var(--acid);
}

.final-match .venue-trigger:hover {
  color: var(--ink);
  text-decoration: underline;
}

.match-team-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.match-venue-button {
  display: block;
  width: 100%;
  margin-top: 3px;
  color: rgba(238, 244, 238, 0.7);
  font-size: 0.53rem;
  font-weight: 900;
  text-align: center;
}

.final-match .match-venue-button {
  color: rgba(17, 19, 18, 0.68);
}

.match-team-line .team-label {
  justify-content: center;
  gap: 7px;
  font-size: var(--team-label-size);
}

.match-team-line .flag {
  width: var(--team-flag-width);
  height: var(--team-flag-height);
}

.match-team-line .team-name {
  max-width: 56px;
}

.match-separator {
  color: rgba(238, 244, 238, 0.48);
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
}

.final-match .match-separator {
  color: rgba(17, 19, 18, 0.62);
}

.match-venue-line {
  margin-top: 3px;
  color: rgba(238, 244, 238, 0.66);
  font-size: 0.55rem;
  font-weight: 820;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 20px;
  margin-top: 0;
  padding: 3px;
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 880;
}

.final-match .pick-button {
  color: var(--ink);
  background: rgba(17, 19, 18, 0.13);
  border-color: rgba(17, 19, 18, 0.18);
}

.pick-button:not(:disabled):hover,
.pick-button.selected {
  color: var(--ink);
  background: var(--acid);
  border-color: rgba(201, 255, 61, 0.75);
}

.final-match .pick-button:not(:disabled):hover,
.final-match .pick-button.selected {
  color: #eef4ee;
  background: var(--ink);
  border-color: rgba(17, 19, 18, 0.78);
}

.pick-button:disabled {
  color: rgba(238, 244, 238, 0.78);
  cursor: default;
  opacity: 1;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  border-style: dashed;
}

.final-match .pick-button:disabled {
  color: rgba(17, 19, 18, 0.72);
  background: rgba(17, 19, 18, 0.08);
  border-color: rgba(17, 19, 18, 0.2);
}

.pick-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100svh - 34px);
  padding: 18px;
  color: var(--ink);
  overflow: auto;
}

body:not([data-page="home"]) .score-dialog {
  color: #eef4ee;
  background: #0d1110;
  border-color: rgba(255, 255, 255, 0.14);
}

body:not([data-page="home"]) .score-dialog .dialog-head p,
body:not([data-page="home"]) .score-dialog .dialog-head small {
  color: rgba(238, 244, 238, 0.68);
}

body:not([data-page="home"]) .score-dialog .section-kicker {
  color: var(--acid);
}

body:not([data-page="home"]) .fixture-row,
body:not([data-page="home"]) .dialog-standings .standings-row {
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

body:not([data-page="home"]) .score-input {
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.login-dialog {
  width: min(420px, calc(100vw - 28px));
}

.login-choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.provider-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px;
  color: var(--ink);
  background: #f7f8f3;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.provider-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
}

.provider-mark.google {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.provider-mark.facebook {
  background: #1877f2;
}

.score-dialog::backdrop {
  background: rgba(17, 19, 18, 0.58);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--ink);
  background: #f1f3ec;
  border-color: var(--line);
}

.dialog-close svg {
  width: 18px;
  height: 18px;
}

.dialog-head {
  padding-right: 44px;
  margin-bottom: 18px;
}

.dialog-fixtures {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.fixture-row {
  grid-template-columns: minmax(0, 1fr) 48px 18px 48px minmax(0, 1fr);
}

.fixture-row .team-label:last-child {
  justify-content: flex-end;
}

.score-input {
  width: 48px;
  height: 36px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
  font-weight: 900;
}

.dialog-standings {
  display: grid;
  gap: 6px;
}

.select,
.search-field {
  min-height: 40px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.select {
  min-width: 180px;
  padding: 0 12px;
  font-weight: 800;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(340px, 100%);
  padding: 0 12px;
}

.search-field svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 120px;
  border: 0;
  outline: 0;
  background: transparent;
}

.source-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.match-switch-panel {
  display: grid;
  width: 100%;
  gap: 8px;
}

.match-tab-strip {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 6px;
  padding: 5px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  scrollbar-width: none;
}

.match-tab-strip::-webkit-scrollbar {
  display: none;
}

.match-tab-strip button {
  flex: 1 0 max-content;
  min-height: 32px;
  padding: 6px 10px;
  color: rgba(238, 244, 238, 0.74);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.match-tab-strip button.active,
.match-tab-strip button:hover {
  color: var(--ink);
  background: var(--acid);
}

.table-wrap {
  max-height: 760px;
  overflow: auto;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.insight-card {
  min-height: 150px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(17, 19, 18, 0.06);
}

.insight-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.insight-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.5rem;
  line-height: 1.05;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-list {
  display: grid;
  gap: 6px;
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 850;
}

.mini-list span {
  display: inline;
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: none;
}

.mini-list strong {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}

.squad-group-board {
  display: grid;
  gap: 10px;
}

.squad-group-selector {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
}

.squad-group-selector-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 94px;
  padding: 5px;
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.squad-group-selector-card.active {
  color: var(--ink);
  background: var(--acid);
  border-color: rgba(201, 255, 61, 0.76);
}

.squad-group-selector-card strong {
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.squad-group-selector-teams {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}

.squad-group-selector-teams .team-label {
  gap: 6px;
  min-width: 0;
  font-size: var(--team-label-size);
  font-weight: 900;
}

.squad-group-selector-teams .flag {
  width: var(--team-flag-width);
  height: var(--team-flag-height);
}

.squad-group-block {
  padding: 12px;
  color: #eef4ee;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
}

.squad-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.squad-group-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.squad-group-stats,
.squad-team-mini-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.squad-group-stats {
  width: min(680px, 100%);
}

.squad-stat {
  display: grid;
  grid-template-columns: 17px minmax(72px, 0.66fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 29px;
  padding: 5px 6px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
}

.squad-stat-icon-only {
  grid-template-columns: 17px minmax(0, 1fr) auto;
}

.squad-stat-icon-only span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.squad-stat svg {
  width: 14px;
  height: 14px;
  color: var(--acid);
}

.squad-stat span,
.squad-stat small {
  min-width: 0;
  overflow: hidden;
  color: rgba(238, 244, 238, 0.6);
  font-size: 0.62rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.squad-stat strong {
  min-width: 0;
  overflow: hidden;
  color: #eef4ee;
  font-size: 0.78rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.squad-team-card {
  display: grid;
  align-content: start;
  min-width: 0;
  height: 100%;
  gap: 7px;
  padding: 10px;
  color: inherit;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.squad-team-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(201, 255, 61, 0.34);
  transform: translateY(-2px);
}

.squad-team-open {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.squad-team-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-weight: 950;
}

.squad-team-mini-stats .squad-stat {
  padding: 5px 6px;
}

.squad-card-history {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 2px;
  overflow: visible;
}

.squad-history-decade {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}

.squad-history-decade > span {
  color: rgba(238, 244, 238, 0.5);
  font-size: 0.54rem;
  font-weight: 950;
}

.squad-history-decade > div {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
}

.squad-history-decade button,
.squad-card-history.empty {
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
  min-height: 21px;
  place-items: center;
  flex: 1 1 0;
  padding: 1px 3px;
  color: var(--acid);
  background: rgba(201, 255, 61, 0.1);
  border: 1px solid rgba(201, 255, 61, 0.18);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.56rem;
  font-weight: 950;
  line-height: 1;
}

.squad-history-decade button strong {
  font-size: 0.54rem;
}

.squad-history-decade button small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(238, 244, 238, 0.62);
  font-size: 0.42rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-history-decade button.champion {
  color: #17130a;
  background: #f4bd2f;
  border-color: #ffd96c;
  box-shadow: 0 0 0 1px rgba(244, 189, 47, 0.18);
}

.squad-history-decade button.champion small {
  color: rgba(23, 19, 10, 0.72);
}

.squad-history-decade button:hover,
.squad-history-decade button:focus-visible {
  color: var(--ink);
  background: var(--acid);
  outline: none;
}

.squad-history-decade button.champion:hover,
.squad-history-decade button.champion:focus-visible {
  background: #ffd45c;
}

.squad-card-history.empty {
  color: rgba(238, 244, 238, 0.42);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.08);
}

.pitch-graph {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  padding: 7px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.16) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 22px, rgba(255, 255, 255, 0.14) 23px 24px, transparent 25px),
    linear-gradient(135deg, rgba(15, 107, 69, 0.95), rgba(7, 59, 41, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.pitch-line {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding: 5px 4px;
  text-align: center;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font: inherit;
}

button.pitch-line {
  cursor: pointer;
}

.pitch-line.active,
button.pitch-line:hover {
  background: rgba(201, 255, 61, 0.18);
  border-color: rgba(201, 255, 61, 0.46);
}

.pitch-line strong {
  color: var(--acid);
  font-size: 0.58rem;
  font-weight: 950;
}

.pitch-line b {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
}

.pitch-line small {
  min-width: 0;
  overflow: hidden;
  color: rgba(238, 244, 238, 0.64);
  font-size: 0.53rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-player-list {
  display: grid;
  gap: 6px;
  max-height: 680px;
  overflow: auto;
}

.squad-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-height: calc(100svh - 20px);
  color: #eef4ee;
  overflow: hidden;
  background: #0d1110;
  border-color: rgba(255, 255, 255, 0.14);
}

.squad-dialog .squad-team-mini-stats {
  margin-top: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.squad-dialog .pitch-graph {
  margin-top: 8px;
}

.country-results-panel {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-top: 8px;
}

.country-results-panel > span {
  color: rgba(238, 244, 238, 0.58);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.country-results-strip {
  display: flex;
  gap: 5px;
  min-width: 0;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 255, 61, 0.44) rgba(255, 255, 255, 0.08);
}

.country-result-chip {
  display: grid;
  flex: 0 0 auto;
  min-width: 72px;
  gap: 1px;
  padding: 5px 7px;
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
}

.country-result-chip strong {
  color: var(--acid);
  font-size: 0.74rem;
  line-height: 1;
}

.country-result-chip small {
  overflow: hidden;
  color: rgba(238, 244, 238, 0.66);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-dialog-list {
  max-height: min(680px, calc(100svh - 190px));
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 255, 61, 0.46) rgba(255, 255, 255, 0.08);
}

.squad-dialog-list::-webkit-scrollbar,
.country-results-strip::-webkit-scrollbar,
.venue-match-chips::-webkit-scrollbar,
.calendar-match-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.squad-dialog-list::-webkit-scrollbar-track,
.country-results-strip::-webkit-scrollbar-track,
.venue-match-chips::-webkit-scrollbar-track,
.calendar-match-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.squad-dialog-list::-webkit-scrollbar-thumb,
.country-results-strip::-webkit-scrollbar-thumb,
.venue-match-chips::-webkit-scrollbar-thumb,
.calendar-match-list::-webkit-scrollbar-thumb {
  background: rgba(201, 255, 61, 0.42);
  border-radius: 999px;
}

.squad-dialog-head {
  display: grid;
  gap: 6px;
  padding-right: 44px;
  margin-bottom: 10px;
}

.squad-view-switch {
  display: inline-flex;
  gap: 4px;
  width: max-content;
  padding: 3px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.squad-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 29px;
  padding: 5px 8px;
  color: rgba(238, 244, 238, 0.72);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
}

.squad-view-switch button.active {
  color: var(--ink);
  background: var(--acid);
}

.squad-view-switch svg {
  width: 14px;
  height: 14px;
}

.squad-position-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 1100px;
  min-height: 26px;
  padding: 4px 8px;
  color: var(--acid);
  background: rgba(201, 255, 61, 0.08);
  border: 1px solid rgba(201, 255, 61, 0.16);
  border-radius: 7px;
  font-size: 0.66rem;
}

.squad-dialog-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #eef4ee;
  font-size: 1.1rem;
}

.squad-dialog-head h2 .flag {
  width: 28px;
  height: 20px;
}

.squad-player-header,
.squad-player-card {
  display: grid;
  grid-template-columns: 34px 34px minmax(130px, 1.35fr) 48px 86px 44px minmax(150px, 1fr) minmax(96px, 0.78fr) 46px 44px 42px 42px;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.squad-player-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 28px;
  padding: 4px 6px;
  color: rgba(238, 244, 238, 0.7);
  background: #0d1110;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.squad-player-header span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  font-size: 0.56rem;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.squad-player-header svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--acid);
}

.squad-player-card {
  min-height: 34px;
  padding: 5px 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.squad-dialog-list .squad-player-header,
.squad-dialog-list .squad-player-card {
  min-width: 1100px;
}

.player-photo {
  width: 28px;
  height: 28px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
}

.squad-player-number {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 950;
}

.squad-player-name,
.player-inline-field {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
  overflow: hidden;
  color: #eef4ee;
  font-size: 0.7rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-player-name {
  font-size: 0.76rem;
  font-weight: 950;
}

.player-inline-field b,
.player-inline-field [contenteditable="true"] {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  outline: 0;
  text-overflow: ellipsis;
}

.player-inline-club .club-logo {
  width: 28px;
  height: 28px;
}

.player-inline-field .club-country {
  min-width: 0;
  margin-left: 0;
  overflow: hidden;
}

.squad-player-main,
.squad-player-club,
.squad-player-details,
.club-country {
  display: flex;
  align-items: center;
  min-width: 0;
}

.squad-player-main {
  gap: 7px;
}

.squad-player-main strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-player-main > span:last-child {
  margin-left: auto;
  color: rgba(238, 244, 238, 0.62);
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.position-chip {
  display: inline-grid;
  min-width: 30px;
  min-height: 24px;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 950;
}

.squad-player-club {
  gap: 6px;
  color: rgba(238, 244, 238, 0.82);
  font-size: 0.76rem;
  font-weight: 850;
}

.squad-player-club > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-logo {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--acid);
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.club-logo-real {
  background: transparent;
}

.club-logo img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
}

.club-logo-fallback svg {
  width: 19px;
  height: 19px;
}

.club-country {
  gap: 4px;
  margin-left: auto;
  color: rgba(238, 244, 238, 0.72);
  font-size: 0.7rem;
  font-weight: 850;
}

.club-country .flag {
  width: 19px;
  height: 14px;
}

.squad-player-details {
  flex-wrap: wrap;
  gap: 5px;
}

.squad-player-details span {
  min-height: 20px;
  padding: 2px 5px;
  color: rgba(238, 244, 238, 0.72);
  background: rgba(255, 255, 255, 0.065);
  border-radius: 6px;
  font-size: 0.67rem;
  font-weight: 800;
}

.squad-player-card [contenteditable="true"] {
  outline: 0;
}

.squad-player-card [contenteditable="true"]:focus {
  color: var(--ink);
  background: var(--acid);
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(201, 255, 61, 0.2);
}

.squad-empty {
  padding: 12px;
  color: rgba(238, 244, 238, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-weight: 850;
}

.data-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.data-table td[contenteditable="true"] {
  outline: 0;
}

.data-table td[contenteditable="true"]:focus {
  background: rgba(201, 255, 61, 0.22);
  box-shadow: inset 0 0 0 2px rgba(15, 107, 69, 0.2);
}

.calendar-board {
  display: grid;
  gap: 8px;
}

.calendar-day {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(17, 19, 18, 0.06);
}

.calendar-day-head {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.calendar-day-head strong {
  display: grid;
  gap: 2px;
  margin: 0;
  color: #eef4ee;
  font-size: 1rem;
  line-height: 1.15;
}

.calendar-day-head strong small {
  color: rgba(238, 244, 238, 0.58);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day-head span,
.stage-pill {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.calendar-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 226px);
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 255, 61, 0.42) rgba(255, 255, 255, 0.08);
}

.deployment-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 16px;
  color: #fff2cf;
  background: rgba(231, 71, 52, 0.14);
  border: 1px solid rgba(231, 71, 52, 0.42);
  border-radius: 8px;
  font-size: 0.84rem;
}

.deployment-warning svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--sun);
}

.calendar-match {
  display: grid;
  grid-template-rows: 24px 30px 24px 22px;
  gap: 4px;
  min-width: 0;
  width: 226px;
  height: 132px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.calendar-match-line {
  min-width: 0;
}

.calendar-match-top,
.calendar-match-teams,
.calendar-match-venue,
.calendar-match-time {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-match-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  justify-content: normal;
}

.calendar-match-top .calendar-group-badge {
  justify-self: center;
}

.pc-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: rgba(238, 244, 238, 0.84);
  font-size: 0.66rem;
  font-weight: 900;
  white-space: nowrap;
}

.pc-time svg {
  width: 13px;
  height: 13px;
  color: var(--acid);
}

.match-number {
  display: grid;
  width: 34px;
  height: 24px;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  border-radius: 7px;
  font-size: 0.68rem;
  font-weight: 950;
}

.calendar-fixture {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.calendar-fixture .team-label:last-child {
  justify-content: flex-end;
}

.versus {
  color: var(--muted);
  font-weight: 950;
  text-align: center;
}

.calendar-group-badge {
  display: grid;
  min-width: 46px;
  place-items: center;
  padding: 2px 4px;
  color: rgba(238, 244, 238, 0.66);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.5rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.calendar-group-badge strong {
  display: inline;
  margin-left: 3px;
  color: var(--acid);
  font-size: 0.72rem;
  line-height: 1.05;
}

.calendar-match-venue {
  min-width: 0;
}

.calendar-match-time {
  min-width: 0;
  justify-content: space-between;
}

.calendar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.calendar-meta span,
.calendar-venue-trigger,
.venue-facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 7px;
  background: #f4f5ef;
  border: 1px solid rgba(17, 19, 18, 0.08);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.calendar-match-venue span,
.calendar-match-venue .calendar-venue-trigger,
.calendar-match-time span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  color: rgba(238, 244, 238, 0.72);
  font-size: 0.64rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-match-venue .calendar-venue-trigger {
  flex: 1 1 auto;
  justify-content: flex-start;
  color: rgba(238, 244, 238, 0.84);
}

.calendar-meta span,
.calendar-venue-trigger {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-meta svg,
.calendar-venue-trigger svg,
.calendar-match-time svg,
.venue-facts svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.slot-token {
  display: inline-grid;
  min-width: 30px;
  min-height: 20px;
  place-items: center;
  padding: 2px 5px;
  color: var(--ink);
  background: rgba(201, 255, 61, 0.35);
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 950;
}

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

.venue-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(17, 19, 18, 0.06);
}

.venue-photo-button,
.venue-photo-panel {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.venue-slider {
  position: relative;
  display: block;
  overflow: hidden;
}

.venue-slide {
  position: relative;
  display: none;
  aspect-ratio: 16 / 10;
  margin: 0;
  place-items: end start;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 107, 69, 0.92), rgba(10, 168, 186, 0.82)),
    #12382f;
}

.venue-slide.active {
  display: grid;
}

.venue-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 30px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: rgba(17, 19, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
  transform: translateY(-50%);
}

.slider-nav.prev {
  left: 8px;
}

.slider-nav.next {
  right: 8px;
}

.slider-nav:hover {
  color: var(--ink);
  background: var(--acid);
}

.venue-slide > span {
  position: relative;
  margin: 0 0 8px 8px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(17, 19, 18, 0.72);
  border-radius: 7px;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.venue-photo {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  background:
    linear-gradient(135deg, rgba(15, 107, 69, 0.92), rgba(10, 168, 186, 0.82)),
    #12382f;
}

.venue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.venue-photo.loaded img {
  opacity: 1;
}

.venue-photo > span {
  position: absolute;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: rgba(17, 19, 18, 0.34);
  border-radius: 8px;
}

.venue-photo.loaded > span {
  display: none;
}

.venue-card-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.venue-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.venue-title-row span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.venue-title-row h2 {
  margin: 2px 0 0;
  font-size: 1.08rem;
  line-height: 1.1;
}

.venue-title-row strong {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--sun);
  border-radius: 8px;
  font-weight: 950;
}

.venue-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.venue-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.venue-weather-trend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.venue-weather-trend span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  color: rgba(238, 244, 238, 0.76);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 850;
}

.venue-weather-trend strong {
  color: var(--acid);
  font-size: 0.88rem;
}

.venue-weather-trend small {
  color: rgba(238, 244, 238, 0.58);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.venue-match-chips {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  max-height: none;
  overflow: visible;
}

.venue-schedule-match {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 54px 54px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 5px 7px;
  color: rgba(238, 244, 238, 0.86);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
}

.venue-schedule-date {
  display: grid;
  line-height: 1.05;
  font-size: 0.59rem;
  white-space: nowrap;
}

.venue-schedule-date strong {
  color: var(--acid);
  font-size: 0.64rem;
}

.venue-schedule-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.venue-schedule-teams .team-label:last-child {
  justify-content: flex-end;
}

.venue-schedule-time {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  font-size: 0.61rem;
  font-weight: 900;
  white-space: nowrap;
}

.venue-schedule-time svg {
  width: 12px;
  height: 12px;
  color: var(--acid);
}

.venue-schedule-time b {
  color: rgba(238, 244, 238, 0.5);
  font-size: 0.52rem;
}

.venue-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100svh - 28px);
  color: #eef4ee;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 255, 61, 0.12), transparent 34%),
    #0d1110;
  border-color: rgba(255, 255, 255, 0.16);
}

.venue-dialog #venueDialogContent {
  display: grid;
  gap: 10px;
}

.venue-dialog .dialog-head {
  margin-bottom: 0;
}

.venue-dialog .dialog-head p:last-child {
  color: rgba(238, 244, 238, 0.64);
}

.venue-dialog .venue-slider {
  margin-bottom: 0;
  border-radius: 10px;
}

.venue-dialog .venue-slide {
  aspect-ratio: 16 / 6.8;
}

.venue-dialog .venue-weather-trend span {
  color: rgba(238, 244, 238, 0.78);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.1);
}

.venue-dialog .venue-weather-trend small {
  color: rgba(238, 244, 238, 0.58);
}

.venue-dialog-matches {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.venue-match-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 950;
}

.venue-match-card .calendar-meta span {
  color: rgba(238, 244, 238, 0.76);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

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

.history-era {
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.history-champ-card {
  display: grid;
  min-height: 236px;
  padding: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.history-photo {
  display: block;
  height: 96px;
  margin: -6px -6px 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 107, 69, 0.9), rgba(103, 81, 232, 0.8)),
    #12382f;
  border-radius: 7px;
}

.history-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-champ-card:hover {
  background: rgba(255, 255, 255, 0.12);
}

.history-champ-card .year {
  color: var(--sun);
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 950;
}

.history-champ-card h2 {
  align-self: end;
  color: #fff;
  font-size: 1.28rem;
  line-height: 1.05;
}

.history-champ-card p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}

.history-dialog {
  width: min(1180px, calc(100vw - 28px));
  color: #eef4ee;
  background: #0d1110;
  border-color: rgba(255, 255, 255, 0.16);
}

.history-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.history-meta-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  color: rgba(238, 244, 238, 0.66);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.history-meta-strip strong {
  color: var(--acid);
  font-size: 0.96rem;
}

.history-full-detail {
  display: grid;
  gap: 18px;
}

.history-full-section h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.history-group-grid,
.history-round-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.history-group-card,
.history-round-card,
.history-empty {
  padding: 12px;
  color: #eef4ee;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.history-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.history-group-head h4,
.history-round-card h4 {
  margin: 0;
  font-size: 0.96rem;
}

.history-group-head span {
  color: rgba(238, 244, 238, 0.56);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.history-standings {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.history-standing-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px 52px;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  font-size: 0.8rem;
}

.history-standing-row > span:first-child {
  color: var(--acid);
  font-weight: 950;
}

.history-standing-row strong,
.history-match-row strong {
  font-weight: 950;
  text-align: center;
}

.history-standing-row small,
.history-match-row small {
  color: rgba(238, 244, 238, 0.52);
  font-weight: 800;
}

.history-match-list {
  display: grid;
  gap: 6px;
}

.history-match-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font-size: 0.78rem;
}

.history-match-row > span:first-child {
  color: rgba(238, 244, 238, 0.58);
  font-weight: 900;
}

.history-match-row small {
  grid-column: 2 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.history-detail-panel {
  padding: 12px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.history-detail-panel h3 {
  margin-bottom: 10px;
}

.history-knockout {
  display: grid;
  gap: 8px;
}

.history-final-card {
  padding: 14px;
  color: #eef4ee;
  background: rgba(201, 255, 61, 0.11);
  border: 1px solid rgba(201, 255, 61, 0.28);
  border-radius: 8px;
}

.history-era h2 {
  margin-bottom: 12px;
  color: var(--sun);
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
}

.history-seed-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  margin-top: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.history-seed-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.seed-row {
  grid-template-columns: 68px minmax(0, 1fr) auto;
  color: var(--ink);
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.quiz-score {
  display: inline-flex;
  padding: 10px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-weight: 950;
}

.quiz-card {
  padding: 22px;
}

.quiz-progress {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 950;
  text-transform: uppercase;
}

.quiz-question {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.6vw, 2.5rem);
  line-height: 1.06;
  font-weight: 950;
}

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

.quiz-option {
  min-height: 58px;
  padding: 12px;
  color: var(--ink);
  background: #f7f8f3;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.quiz-option.correct {
  background: rgba(201, 255, 61, 0.55);
  border-color: rgba(15, 107, 69, 0.34);
}

.quiz-option.wrong {
  background: rgba(231, 71, 52, 0.14);
  border-color: rgba(231, 71, 52, 0.34);
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 20px;
  color: #fff;
  background: var(--ink);
  font-size: 0.86rem;
}

.site-footer span:first-child {
  font-weight: 950;
}

.site-footer a {
  color: var(--acid);
  font-weight: 850;
}

@media (min-width: 1181px) {
  .page-main,
  .hero,
  .site-footer {
    padding-right: calc(var(--side-ad-width) + 22px);
  }

  body[data-page="simulation"] {
    height: 100svh;
    overflow: hidden;
  }

  body[data-page="squads"] {
    height: 100svh;
    overflow: hidden;
  }

  .squads-main {
    height: 100svh;
    overflow: hidden;
  }

  .squads-main .section-tight {
    height: calc(100svh - 72px);
    padding: 8px 20px 0;
  }

  .squads-main .section-inner,
  .squad-group-board {
    height: 100%;
    max-width: none;
    min-height: 0;
  }

  .squad-group-selector {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 5px;
    min-height: 0;
    overflow: hidden;
  }

  .squad-group-selector-card {
    min-height: 90px;
    padding: 5px;
  }

  .squad-group-selector-card strong {
    font-size: 0.62rem;
  }

  .squad-group-selector-teams .team-label {
    font-size: 0.64rem;
  }

  .squad-group-selector-teams .flag {
    width: 22px;
    height: 16px;
  }

  .squad-group-block {
    min-height: 0;
    overflow: hidden;
    padding: 8px;
  }

  .squad-team-grid {
    height: calc(100svh - 72px - 8px - 102px - 10px - 28px - 16px);
    min-height: 0;
  }

  .squad-team-card {
    min-height: 0;
    overflow: hidden;
  }

  .simulation-main {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .simulation-main + .site-footer {
    display: none;
  }

  .squads-main + .site-footer {
    display: none;
  }

  .simulation-main .section-tight {
    height: 100%;
    padding: 0;
    min-height: 0;
  }

  .simulation-main .section-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: none;
  }

  .sim-panel {
    min-height: 0;
    flex: 1 1 auto;
  }

  .sim-panel[data-sim-panel="groups"],
  .sim-panel[data-sim-panel="knockout"] {
    overflow: hidden;
  }

  .sim-panel[data-sim-panel="groups"] {
    display: flex;
    min-height: 0;
  }

  .compact-groups {
    flex: 1 1 auto;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    min-height: 0;
  }

  .group-compact-card {
    min-height: 0;
    padding: 5px;
  }

  .group-score-matrix {
    height: 100%;
  }

  .matrix-corner,
  .matrix-head,
  .matrix-stat-head,
  .matrix-team,
  .matrix-cell,
  .matrix-stat {
    min-height: 0;
  }

  .bracket-shell {
    height: 100%;
    padding: 6px;
    overflow: hidden;
  }

  .bracket-grid {
    height: 100%;
    min-height: 0;
  }

  .bracket-transposed {
    height: 100%;
    gap: 6px;
  }

  .bracket-path {
    gap: 4px;
    padding: 5px;
  }

  .bracket-row {
    gap: 5px;
  }

  .bracket-row-matches {
    gap: 3px;
  }

  .final-stage {
    width: min(820px, 100%);
    gap: 6px;
  }

  .round-title {
    padding: 4px 3px;
    font-size: 0.52rem;
  }

  .match-card {
    min-height: 56px;
    padding: 4px;
  }

  .pick-button {
    min-height: 19px;
    padding: 2px;
    font-size: 0.56rem;
  }

  .match-venue-line {
    font-size: 0.52rem;
  }
}

@media (max-width: 1180px) {
  .ad-slot-right {
    display: none;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .header-actions {
    grid-column: auto;
    justify-content: flex-end;
  }

  .hero-inner,
  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .compact-groups,
  .feature-grid,
  .insights-grid,
  .squad-group-selector,
  .squad-team-grid,
  .venue-grid,
  .history-board,
  .history-group-grid,
  .history-round-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-match-list {
    grid-template-columns: repeat(auto-fill, 226px);
    overflow-x: auto;
  }

  .calendar-meta,
  .stage-pill {
    grid-column: auto;
  }

  .hero-panel {
    max-width: 760px;
  }

  .bracket-row-matches {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .bracket-row-matches .match-card {
    grid-column: auto;
    width: 100%;
  }
}

@media (max-width: 780px) {
  .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 8px 10px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .top-nav a {
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .header-actions {
    margin-left: auto;
    justify-content: flex-end;
  }

  .social-button:nth-of-type(3),
  .social-button:nth-of-type(4) {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding: 128px 14px 32px;
  }

  .hero-home {
    min-height: auto;
  }

  .page-main {
    padding-top: 136px;
  }

  .simulation-main {
    padding-top: 126px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 36px 14px 18px;
  }

  .hero h1 {
    font-size: clamp(3.55rem, 21vw, 7rem);
  }

  .page-head h1 {
    font-size: clamp(2rem, 12vw, 3.25rem);
  }

  .metric-grid,
  .compact-groups,
  .feature-grid,
  .insights-grid,
  .squad-group-selector,
  .squad-team-grid,
  .venue-grid,
  .history-board,
  .history-group-grid,
  .history-round-grid,
  .quiz-options {
    grid-template-columns: 1fr;
  }

  .squad-group-head {
    align-items: stretch;
    flex-direction: column;
  }

  .squad-group-stats,
  .squad-team-mini-stats {
    grid-template-columns: 1fr;
  }

  .calendar-match {
    padding: 10px;
  }

  .calendar-day {
    grid-template-columns: 1fr;
  }

  .calendar-day-head {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .calendar-fixture {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-fixture .team-label:last-child {
    justify-content: flex-start;
  }

  .versus {
    display: none;
  }

  .calendar-meta,
  .stage-pill {
    grid-column: auto;
  }

  .section {
    padding: 54px 14px;
  }

  .section-tight {
    padding-top: 16px;
  }

  .section-toolbar,
  .sim-console-head,
  .sim-dock {
    align-items: flex-start;
    flex-direction: column;
  }

  .sim-dock {
    gap: 8px;
  }

  .sim-view-switch,
  .sim-dock .toolbar-actions {
    width: 100%;
  }

  .sim-view-switch button {
    flex: 1;
  }

  .toolbar-actions,
  .search-field {
    width: 100%;
  }

  .toolbar-actions > *,
  .select {
    flex: 1 1 100%;
  }

  .button {
    width: 100%;
  }

  .score-chip-list {
    grid-template-columns: 1fr;
  }

  .hero-block-grid {
    grid-template-columns: 1fr;
  }

  .group-score-matrix {
    grid-template-columns: 46px repeat(4, minmax(38px, 1fr)) 28px 28px 30px;
  }

  .matrix-team .flag {
    display: none;
  }

  .bracket-shell {
    padding: 10px;
    overflow: auto;
  }

  .bracket-grid {
    min-height: 0;
  }

  .bracket-transposed {
    grid-template-rows: auto;
    gap: 10px;
  }

  .bracket-spine,
  .bracket-path.top::after,
  .bracket-path.bottom::before {
    display: none;
  }

  .final-stack {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .final-stage {
    grid-template-columns: 1fr;
  }

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

  .round-title {
    text-align: left;
  }

  .bracket-row-matches {
    grid-template-columns: 1fr;
  }

  .fixture-row {
    grid-template-columns: minmax(0, 1fr) 42px 14px 42px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .fixture-row .flag {
    display: none;
  }

  .history-detail-grid {
    grid-template-columns: 1fr;
  }

  .history-match-row {
    grid-template-columns: 64px minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 6px;
  }

  .history-match-row .flag {
    display: none;
  }
}

/* Cross-page sizing contract: navigation and team badges stay identical everywhere. */
.matches-main,
.matches-main .section,
.matches-main .section-inner,
.calendar-board {
  min-width: 0;
  max-width: 100%;
}

.team-label,
.history-country {
  font-size: var(--team-label-size);
  line-height: 1.1;
}

.matrix-team .flag,
.calendar-fixture .flag,
.squad-group-selector-teams .flag,
.match-team-line .flag,
.venue-schedule-teams .flag,
.fixture-row .flag {
  display: inline-grid;
  width: var(--team-flag-width);
  height: var(--team-flag-height);
}

.matrix-team .team-label,
.calendar-fixture .team-label,
.squad-group-selector-teams .team-label,
.match-team-line .team-label,
.venue-schedule-teams .team-label,
.fixture-row .team-label {
  font-size: var(--team-label-size);
}

/* Completed matches and shared match details */
.team-open {
  position: relative;
  padding: 2px;
  cursor: pointer;
  border-radius: 5px;
  outline: 0;
}

.team-open:hover,
.team-open:focus-visible {
  color: var(--acid);
  background: rgba(201, 255, 61, 0.09);
  box-shadow: 0 0 0 2px rgba(201, 255, 61, 0.22);
}

.group-compact-card[role="button"] {
  width: 100%;
  color: inherit;
  font: inherit;
}

.matrix-cell.finished {
  cursor: pointer;
  background: rgba(201, 255, 61, 0.14);
  border-color: rgba(201, 255, 61, 0.32);
}

.matrix-cell.finished:hover,
.matrix-cell.finished:focus-visible {
  background: rgba(201, 255, 61, 0.25);
  box-shadow: inset 0 0 0 1px var(--acid);
  outline: 0;
}

.matrix-cell.finished span {
  color: var(--acid);
}

.fixture-row.finished {
  grid-template-columns: minmax(0, 1fr) 48px 18px 48px minmax(0, 1fr) auto;
  cursor: pointer;
  border-color: rgba(201, 255, 61, 0.28) !important;
}

.fixture-row.finished .score-input:disabled {
  color: var(--acid);
  opacity: 1;
}

.fixture-finished {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--acid);
  font-size: 0.66rem;
  font-weight: 950;
}

.fixture-finished svg {
  width: 14px;
  height: 14px;
}

.calendar-match.finished,
.venue-schedule-match.finished {
  cursor: pointer;
  border-color: rgba(201, 255, 61, 0.3);
}

.calendar-match.finished:hover,
.venue-schedule-match.finished:hover {
  background: rgba(201, 255, 61, 0.1);
}

.calendar-match.finished .calendar-fixture,
.venue-schedule-match.finished .venue-schedule-teams {
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
}

.final-score {
  color: var(--acid);
  font-size: 0.84rem;
}

.match-detail-dialog {
  width: min(980px, calc(100vw - 28px));
  height: min(720px, calc(100svh - 28px));
  padding: 16px;
  overflow: hidden;
}

.match-detail-dialog #matchDialogContent {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
}

.match-detail-head {
  display: grid;
  gap: 10px;
  padding-right: 42px;
}

.match-detail-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: rgba(238, 244, 238, 0.68);
  font-size: 0.72rem;
  font-weight: 850;
}

.match-detail-meta strong,
.match-detail-meta span {
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.match-detail-meta strong {
  color: var(--ink);
  background: var(--acid);
}

.match-detail-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.match-detail-scoreboard > .team-label:last-child {
  justify-content: flex-end;
}

.match-detail-scoreboard .team-label {
  gap: 10px;
  font-size: 1rem;
}

.match-detail-scoreboard .flag {
  width: 34px;
  height: 24px;
}

.match-detail-scoreboard > strong {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 2rem;
  text-align: center;
}

.match-detail-scoreboard > strong small {
  padding: 4px 6px;
  color: var(--ink);
  background: var(--acid);
  border-radius: 5px;
  font-size: 0.58rem;
}

.match-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.match-detail-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  color: rgba(238, 244, 238, 0.66);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.match-detail-tabs button.active {
  color: var(--ink);
  background: var(--acid);
}

.match-detail-tabs svg {
  width: 15px;
  height: 15px;
}

.match-detail-panel {
  min-height: 0;
  padding-right: 5px;
  overflow: auto;
  scrollbar-color: rgba(201, 255, 61, 0.55) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.match-summary-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.match-summary-facts,
.match-event-list,
.match-stats {
  display: grid;
  align-content: start;
  gap: 7px;
}

.match-summary-facts span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.78rem;
}

.match-summary-facts svg {
  grid-row: 1 / span 2;
  width: 16px;
  height: 16px;
  color: var(--acid);
}

.match-summary-facts b {
  color: rgba(238, 244, 238, 0.58);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.match-event {
  display: grid;
  grid-template-columns: 46px 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.match-event > strong {
  color: var(--acid);
  font-size: 0.75rem;
}

.match-event > svg {
  width: 15px;
  height: 15px;
  color: #f4bd2f;
  fill: currentColor;
}

.match-event.goal > svg {
  color: var(--acid);
}

.match-event.red-card > svg {
  color: #ff5748;
}

.match-event div {
  display: grid;
  gap: 2px;
}

.match-event div span {
  color: rgba(238, 244, 238, 0.62);
  font-size: 0.7rem;
  line-height: 1.35;
}

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

.lineup-team {
  display: grid;
  align-content: start;
  gap: 5px;
}

.lineup-team header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  background: rgba(201, 255, 61, 0.1);
  border: 1px solid rgba(201, 255, 61, 0.22);
  border-radius: 8px;
}

.lineup-team h3 {
  margin: 7px 0 1px;
  color: rgba(238, 244, 238, 0.55);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.lineup-player {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 55px;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 6px;
  font-size: 0.72rem;
}

.lineup-player > span {
  color: var(--acid);
  font-weight: 950;
}

.lineup-player small {
  color: rgba(238, 244, 238, 0.55);
  text-align: right;
}

.match-stat-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 7px;
  text-align: center;
}

.match-stat-row > div {
  display: grid;
  gap: 6px;
}

.match-stat-row span {
  color: rgba(238, 244, 238, 0.62);
  font-size: 0.68rem;
  font-weight: 850;
}

.stat-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.stat-track i {
  display: grid;
  grid-template-columns: var(--home) var(--away);
  height: 100%;
}

.stat-track i::before,
.stat-track i::after {
  content: "";
}

.stat-track i::before {
  background: var(--acid);
}

.stat-track i::after {
  background: #58a6ff;
}

/* Squad list: number, position, player, caps, goals, flag, crest, club, birth date, height, weight. */
.squad-player-header,
.squad-player-card {
  grid-template-columns: 38px 52px minmax(155px, 1.2fr) 44px 44px 46px 44px minmax(135px, 1fr) minmax(122px, 0.86fr) 48px 48px;
}

.squad-dialog-list .squad-player-header,
.squad-dialog-list .squad-player-card {
  min-width: 980px;
}

.club-country-flag {
  justify-content: center;
}

.club-country-flag .flag {
  width: 24px;
  height: 17px;
}

.player-club-logo {
  justify-content: center;
}

.player-club-logo .club-logo {
  width: 32px;
  height: 32px;
  border: 0;
}

.player-dob-age {
  display: flex;
  align-items: center;
  gap: 5px;
}

.player-dob-age small {
  color: rgba(238, 244, 238, 0.52);
  font-size: 0.65rem;
}

@media (max-width: 720px) {
  .match-detail-dialog {
    height: calc(100svh - 16px);
    width: calc(100vw - 16px);
    padding: 12px;
  }

  .match-detail-meta {
    flex-wrap: wrap;
  }

  .match-detail-scoreboard {
    grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
    gap: 7px;
  }

  .match-detail-scoreboard .team-name {
    display: none;
  }

  .match-summary-grid,
  .match-lineups {
    grid-template-columns: 1fr;
  }

  .fixture-row.finished {
    grid-template-columns: minmax(0, 1fr) 42px 14px 42px minmax(0, 1fr);
  }

  .fixture-finished {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .calendar-fixture,
  .calendar-match.finished .calendar-fixture {
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  }

  .calendar-fixture .team-label:last-child {
    justify-content: flex-end;
  }

  .calendar-fixture .versus {
    display: block;
  }
}

.squad-group-selector-card {
  align-content: start;
  justify-items: stretch;
  min-height: 102px;
  padding: 6px 5px;
  text-align: left;
}

.squad-group-selector-card > strong {
  width: 100%;
  text-align: left;
}

.squad-group-selector-card .squad-group-selector-teams {
  width: 100%;
  gap: 4px;
}

.squad-group-selector-card .squad-group-selector-teams .team-label {
  justify-content: flex-start;
  gap: 7px;
  font-size: 12px;
}

.squad-group-selector-card .squad-group-selector-teams .flag {
  width: 26px;
  height: 20px;
}

@media (max-width: 780px) {
  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: var(--fixed-header-height);
    min-height: var(--fixed-header-height);
    max-height: var(--fixed-header-height);
    padding: 10px;
  }

  .top-nav {
    order: initial;
    width: auto;
    height: var(--nav-item-height);
  }

  .top-nav a {
    flex-basis: var(--nav-item-width);
    width: var(--nav-item-width);
    height: var(--nav-item-height);
    min-height: var(--nav-item-height);
    max-height: var(--nav-item-height);
    padding: 6px 5px;
    font-size: var(--nav-font-size);
  }

  .header-actions {
    margin-left: 0;
  }

  .page-main {
    padding-top: 72px;
  }

  .simulation-main,
  .squads-main {
    padding-top: 62px;
  }

  .news-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .news-lead-grid,
  .news-lower-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .news-main-card {
    grid-row: auto;
  }

  .news-side-card,
  .news-lower-card {
    grid-template-columns: 1fr;
  }

  .news-side-card .news-card-image,
  .news-lower-card .news-card-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 781px) and (max-width: 1180px) {
  .news-lead-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .news-main-card {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
