/* 90+ match destination and shared visual primitives. This file owns the responsive match layout. */
:root {
  --control-height: 36px;
  --avatar-sm: 32px;
  --avatar-md: 48px;
  --avatar-lg: 72px;
}
.header-inner {
  max-width: var(--shell-width);
  min-height: 68px;
}
.layout {
  max-width: var(--shell-width);
  padding-top: 20px;
  column-gap: 24px;
}
.main-nav > a.active:after {
  background: var(--brand);
}
.header .main-nav > a {
  font-size: 14px;
  font-weight: 600;
}
.header .main-nav {
  gap: 22px;
}
.brand-symbol {
  width: 54px;
  height: 44px;
}
.brand-wordmark {
  font-size: 21px;
}
.global-search-field {
  height: 38px;
  padding: 0 14px;
}
.global-search {
  max-width: 300px;
}
.header-settings {
  width: 40px;
  height: 40px;
}
.button,
.entity-follow {
  border-radius: var(--radius-control);
  min-height: var(--control-height);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.button:hover,
.entity-follow:hover {
  background: var(--surface-hover);
}
:where(
  .match-card,
  .workspace-card,
  .entity-panel,
  .rail-section,
  .settings-panel,
  .ask-answer-card
) {
  border-radius: var(--radius-card);
  box-shadow: none;
}
:where(.workspace-card, .entity-panel, .rail-section) h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}
.muted {
  color: var(--muted);
}
:where(.competition-tabs, .club-tabs, .fixture-tabs) button {
  font-size: 14px;
  font-weight: 600;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
:where(.competition-tabs, .club-tabs, .fixture-tabs)
  button[aria-selected="true"]:after,
:where(.competition-tabs, .club-tabs, .fixture-tabs)
  button[aria-pressed="true"]:after {
  background: var(--brand);
}
:where(.table-scroll, .entity-table-scroll) th {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
:where(.table-scroll, .entity-table-scroll) td {
  height: 46px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-color: var(--border);
  font-variant-numeric: tabular-nums;
}
:where(.table-scroll, .entity-table-scroll) tr:hover {
  background: var(--surface-hover);
}
/* A single page scroll; restrained shell rather than a viewport-wide dialog. */
body.match-page #fixtureDialog[open] {
  position: relative;
  inset: auto;
  width: min(1320px, calc(100% - 48px));
  max-width: none;
  max-height: none;
  margin: 16px auto 48px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.match-page #fixtureDialog > .dialog-head {
  position: static;
  padding: 0;
  margin: 0 0 12px;
  background: transparent;
  border: 0;
  min-height: 32px;
  justify-content: flex-start;
}
body.match-page #fixtureDialog > .dialog-head h2 {
  display: none;
}
body.match-page #closeFixture {
  font-size: 13px;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
body.match-page #fixtureBody {
  padding: 0;
  overflow: visible;
}
.match-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}
.match-layout.without-rail {
  grid-template-columns: minmax(0, 1040px);
  justify-content: center;
}
.match-main {
  min-width: 0;
}
.match-rail {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 88px;
  align-self: start;
  min-width: 0;
}
body.match-page .match-hero {
  padding: 20px 24px 12px;
  border-radius: var(--radius-card);
  background: var(--surface);
}
body.match-page .fixture-competition {
  font-size: 12px;
  gap: 12px;
  min-height: 24px;
  margin: 0;
}
.fixture-competition .league-logo {
  width: 22px;
  height: 22px;
}
body.match-page .fixture-scoreboard {
  grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
  max-width: 720px;
  gap: 20px;
  padding: 0;
  margin: 18px auto 12px;
  align-items: center;
}
body.match-page .score-team {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0;
  min-width: 0;
}
body.match-page .score-team:last-child {
  justify-content: flex-start;
}
body.match-page .score-team:first-child .crest {
  order: 2;
}
body.match-page .score-team strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}
body.match-page .score-team .crest {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}
body.match-page .fixture-score > b {
  font-size: 40px;
  letter-spacing: -1.5px;
  line-height: 1.1;
}
body.match-page .fixture-score small {
  font-size: 11px;
  line-height: 1.6;
}
body.match-page .hero-scorers {
  max-width: 720px;
  grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
  gap: 20px;
  margin: 0 auto 8px;
}
.hero-scorers .scorer-row {
  font-size: 12px;
  line-height: 1.5;
  padding: 1px 0;
}
.hero-scorers .scorer-row small {
  font-size: 11px;
  margin-left: 5px;
}
.match-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 8px;
}
.match-actions .entity-follow {
  margin: 0;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}
body.match-page .match-actions .ask-match-action {
  margin: 0;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}
body.match-page .fixture-tabs {
  position: sticky;
  top: 68px;
  display: flex;
  gap: 26px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 12px 0 16px;
  padding: 0 20px;
  height: 50px;
  min-height: 50px;
  z-index: 12;
  background: var(--bg);
  border: 0;
  border-radius: 0;
}
body.match-page .fixture-tabs button {
  padding: 0;
  min-height: 50px;
  flex: none;
  font-size: 14px;
  color: var(--muted);
}
body.match-page .fixture-tabs button[aria-selected="true"] {
  color: var(--text);
}
body.match-page .fixture-tabs button[aria-selected="true"]:after {
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}
body.match-page .fixture-content {
  padding: 0;
}
.mobile-match-header,
.mobile-match-identity {
  display: none;
}
.facts-grid {
  display: block;
}
body.match-page .facts-grid {
  display: block;
}
body.match-page .match-card {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
}
body.match-page .match-card h3 {
  font-size: 16px;
  margin: 0 0 16px;
}
.rail-section {
  padding: 20px;
  background: var(--surface);
  min-width: 0;
}
.rail-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rail-section h3 {
  margin: 0 0 16px;
  font-size: 15px;
}
.rail-section header h3 {
  margin: 0;
}
.rail-section header {
  margin-bottom: 16px;
}
.rail-section header button {
  background: transparent;
  border: 0;
  color: var(--muted);
  width: 32px;
  height: 32px;
}
.rail-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.rail-fact:last-child {
  padding-bottom: 0;
}
.rail-fact span {
  font-size: 12px;
  color: var(--muted);
}
.rail-fact strong {
  font-size: 14px;
  font-weight: 500;
}
.rail-table-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.rail-table-row {
  display: grid;
  grid-template-columns: 16px 22px minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  min-height: 42px;
  padding: 6px 0;
  font-size: 12px;
}
.rail-table-row:hover {
  background: var(--surface-hover);
}
.rail-table-row .crest {
  width: 22px;
  height: 22px;
}
.rail-table-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail-table-row b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rail-credit {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 12px;
}
.rail-section .compact-fixture {
  padding: 12px 0;
  min-height: 76px;
}
.rail-section .compact-fixture .fixture-side {
  font-size: 11px;
}
.rail-section .compact-fixture .crest {
  width: 20px;
  height: 20px;
}
/* Integrated landscape pitch, with all marker attachments anchored to the avatar. */
body.match-page .lineup-card {
  padding: 0;
  overflow: hidden;
  margin: 0 0 16px;
  width: 100%;
  max-width: none;
}
.lineup-identity {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface-raised);
}
.lineup-identity .lineup-team {
  padding: 0;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  margin: 0;
}
.lineup-identity .lineup-team:last-child {
  flex-direction: row-reverse;
  text-align: right;
}
.lineup-identity .lineup-team span {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}
.lineup-identity .lineup-team .crest {
  width: 24px;
  height: 24px;
}
body.match-page .football-pitch {
  display: flex;
  flex-direction: row;
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1.5;
  min-height: 540px;
  max-height: 660px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--pitch);
  overflow: hidden;
  background-image: none;
  box-shadow: none;
}
body.match-page .football-pitch:before,
body.match-page .football-pitch:after {
  display: none;
}
body.match-page .pitch-markings {
  position: absolute;
  color: var(--pitch-line);
  width: 64.762%;
  height: 154.412%;
  left: 17.619%;
  top: -27.206%;
  transform: rotate(-90deg);
  opacity: 1;
  pointer-events: none;
}
body.match-page .football-pitch .pitch-half {
  display: flex;
  flex: 1;
  flex-direction: row;
  min-width: 0;
  width: 50%;
  padding: 24px 8px;
  gap: 0;
  position: relative;
  background: none;
}
body.match-page .football-pitch .pitch-row {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 0;
  max-height: none;
}
body.match-page .football-pitch .pitch-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
}
.player-marker {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  flex: none;
}
body.match-page .pitch-player .event-portrait {
  --face-size: 48px;
  width: 48px;
  height: 48px;
  display: block;
  margin: 0;
}
body.match-page .pitch-player .player-portrait {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--portrait);
  overflow: hidden;
}
body.match-page .pitch-player .player-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
}
.pitch-player .portrait-fallback {
  font-size: 13px;
}
body.match-page .pitch-player .rating-badge {
  position: absolute;
  top: -7px;
  right: -14px;
  z-index: 5;
  min-width: 29px;
  min-height: 19px;
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 750;
  line-height: 17px;
  box-shadow: 0 0 0 2px var(--pitch);
  font-variant-numeric: tabular-nums;
}
.rating-badge.normal {
  background: #90a69a;
  color: #132019;
}
.rating-badge.poor {
  background: #dc8562;
  color: #23160e;
}
.rating-badge.good {
  background: #5dbc8c;
  color: #102319;
}
.rating-badge.great {
  background: #3dc490;
  color: #082319;
}
.rating-badge.exceptional {
  background: #4bb4cc;
  color: #06222a;
}
body.match-page .pitch-player .pitch-name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  max-width: 90px;
  min-height: 32px;
  text-align: center;
  overflow-wrap: normal;
  text-shadow: none;
  color: var(--text);
}
body.match-page .pitch-name b {
  font-weight: 400;
  color: var(--secondary);
}
body.match-page .lineup-minutes {
  display: none;
}
body.match-page .pitch-player .orbit-badge {
  position: absolute;
  min-width: 17px;
  width: auto;
  height: 17px;
  min-height: 17px;
  padding: 1px;
  z-index: 4;
  border: 0;
  border-radius: 50%;
  background: var(--pitch);
  box-shadow: 0 0 0 1px var(--pitch);
  display: flex;
  align-items: center;
  justify-content: center;
}
body.match-page .pitch-player .orbit-badge .event-glyph {
  width: 15px;
  height: 15px;
}
body.match-page .pitch-player .orbit-sub {
  left: -7px;
  top: -6px;
  right: auto;
  bottom: auto;
  color: var(--success);
}
body.match-page .pitch-player .orbit-sub.sub-off {
  color: #f17b7e;
}
body.match-page .pitch-player .sub-minute {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: var(--text);
  font-size: 11px;
  line-height: 15px;
  font-weight: 650;
}
body.match-page .pitch-player .orbit-card {
  left: -8px;
  top: 15px;
  right: auto;
  bottom: auto;
}
body.match-page .pitch-player .orbit-goal {
  left: auto;
  top: auto;
  right: -6px;
  bottom: -1px;
}
body.match-page .pitch-player .orbit-assist {
  left: -6px;
  top: auto;
  right: auto;
  bottom: -1px;
}
body.match-page .pitch-player .orbit-captain {
  left: -12px;
  top: 34px;
  right: auto;
  bottom: auto;
}
.pitch-note {
  font-size: 11px;
  margin: 0;
  padding: 10px 20px;
  color: var(--muted);
  background: var(--surface);
}
body.match-page .bench-grid {
  gap: 16px;
}
.bench-grid .fixture-player {
  min-height: 58px;
}
.fixture-player strong {
  font-size: 13px;
  font-weight: 500;
}
body.match-page .manager-row {
  padding: 12px 12px 12px 60px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  min-height: 58px;
}
body.match-page .manager-row strong {
  font-size: 13px;
  font-weight: 600;
}
.manager-row > .manager-photo {
  width: 34px;
  height: 34px;
}
.manager-row > span:not(.manager-photo) {
  font-size: 11px;
}
.manager-source {
  font-size: 10px;
}
.manager-row + .match-card h3 {
  font-size: 14px;
}
/* Match timeline and statistics retain information without oversized event cards. */
body.match-page .split-timeline .timeline-item {
  padding: 7px 0;
  min-height: 0;
}
body.match-page .split-timeline .event-card {
  padding: 10px 12px;
  min-height: 62px;
  border-radius: 8px;
  gap: 10px;
}
body.match-page .split-timeline .event-portrait {
  --face-size: 36px;
  width: 36px;
  height: 36px;
}
body.match-page .split-timeline .event-copy strong {
  font-size: 13px;
  font-weight: 600;
}
body.match-page .split-timeline .event-copy small {
  font-size: 11px;
}
body.match-page .split-timeline .event-card details {
  flex-basis: auto;
  margin-left: auto;
  font-size: 11px;
}
body.match-page .split-timeline .event-card details summary {
  font-size: 0;
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
}
body.match-page .split-timeline .event-card details summary .ui-icon {
  width: 15px;
  height: 15px;
}
body.match-page .split-timeline .event-card details[open] {
  flex-basis: 100%;
  font-size: 12px;
}
.event-minute {
  font-variant-numeric: tabular-nums;
}
.timeline-teams {
  font-size: 12px;
}
.comparison {
  padding: 12px 0;
}
.comparison-label {
  font-size: 13px;
}
.comparison-bar {
  height: 6px;
}
.live-stakes-card {
  padding: 16px 20px;
  border: 0;
  background: var(--surface);
  margin: 12px 0;
  border-radius: 12px;
}
.stakes-position {
  font-size: 13px;
  padding: 8px 0;
}
.stakes-next {
  margin-top: 12px;
  padding-top: 12px;
}
.stakes-meaning strong {
  font-size: 14px;
}
.stakes-note {
  font-size: 11px;
}
/* Entity pages share the same identity/action/tab rhythm. */
body.club-page #teamDialog[open] {
  width: min(1280px, calc(100% - 48px));
  margin-top: 20px;
  padding: 0;
}
body.club-page #teamDialog > .dialog-head {
  padding: 24px;
  background: var(--surface);
  border: 0;
  border-radius: 12px 12px 0 0;
  gap: 16px;
}
body.club-page #teamTitle {
  font-size: 26px;
  font-weight: 650;
}
.club-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.club-header-actions .entity-follow,
.club-header-actions .ask-context-action {
  margin: 0;
}
.club-header-actions .ask-context-action {
  font-size: 12px;
}
body.club-page .club-tabs {
  margin: 0 0 20px;
  padding: 0 24px;
  min-height: 50px;
  gap: 24px;
  border: 0;
}
body.club-page #teamStatus {
  font-size: 11px;
  margin: 0;
  padding: 6px 24px;
  background: var(--surface);
}
.club-form-large {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.form-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  background: var(--surface-raised);
  border: 0;
  border-radius: 8px;
  padding: 10px 4px;
  color: var(--text);
  min-width: 0;
}
.form-result .crest {
  width: 24px;
  height: 24px;
}
.form-result b {
  font-size: 14px;
}
.form-result small {
  font-size: 10px;
  border-bottom: 2px solid currentColor;
}
.form-result.win small {
  color: var(--success);
}
.form-result.loss small {
  color: var(--danger);
}
#clubOverview .competition-overview {
  gap: 16px;
}
#clubOverview .workspace-card {
  padding: 20px;
  border-radius: 12px;
}
.competition-hero {
  border-radius: 12px;
}
.competition-tabs {
  min-height: 50px;
}
.competition-identity .league-picker-toggle {
  font-weight: 650;
}
.workspace-card {
  padding: 20px;
}
.entity-stat-grid > div {
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  padding: 12px;
}
.entity-stat-grid dd {
  font-size: 22px;
}
.entity-news > a {
  padding: 12px 0;
}
.entity-news img {
  border-radius: 8px;
}
.news-grid .news-card {
  box-shadow: none;
}
.settings-panel {
  padding: 20px;
  border: 0;
}
.settings-page {
  max-width: 960px;
}
.settings-page h1 {
  font-size: 26px;
}
.ask-shell {
  max-width: 1000px;
}
.ask-suggestion {
  border-color: var(--border);
  box-shadow: none;
}
.ask-answer-card {
  border-color: var(--border);
}
@media (min-width: 1440px) {
  .match-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .match-rail {
    gap: 20px;
  }
}
@media (max-width: 1179px) {
  .match-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
  }
  .rail-section {
    padding: 16px;
  }
  body.match-page .football-pitch {
    min-height: 500px;
  }
  .lineup-identity {
    padding: 14px;
  }
  .lineup-identity .lineup-team {
    font-size: 12px;
  }
  body.match-page .pitch-player .pitch-name {
    font-size: 11px;
    max-width: 72px;
  }
  .player-marker,
  body.match-page .pitch-player .event-portrait,
  body.match-page .pitch-player .player-portrait {
    width: 42px;
    height: 42px;
  }
  body.match-page .pitch-player .event-portrait {
    --face-size: 42px;
  }
}
@media (max-width: 1023px) {
  .match-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .match-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.match-page .football-pitch {
    min-height: 520px;
  }
  .header .main-nav {
    gap: 16px;
  }
  .header .main-nav > a {
    font-size: 13px;
  }
  .global-search {
    max-width: 220px;
  }
}
@media (max-width: 759px) {
  :root {
    --nav-height: 58px;
    --control-height: 40px;
  }
  .header-inner {
    min-height: 58px;
    padding: 0 16px;
  }
  .brand-symbol {
    width: 48px;
    height: 40px;
  }
  .brand-wordmark {
    font-size: 20px;
  }
  .layout {
    padding: 12px 12px 88px;
  }
  .button,
  .entity-follow {
    min-height: 40px;
  }
  .header-settings {
    width: 40px;
    height: 40px;
  }
  body.match-page > .header {
    display: none;
  }
  body.match-page #fixtureDialog[open] {
    width: 100%;
    margin: 0 auto 84px;
    padding: 0;
    border-radius: 0;
  }
  body.match-page #fixtureDialog > .dialog-head {
    display: none;
  }
  .match-layout {
    display: block;
  }
  .match-main {
    width: 100%;
  }
  .mobile-match-header {
    display: grid;
    grid-template-columns: 40px 40px 30px minmax(48px, 1fr) 30px 40px 40px;
    gap: 4px;
    align-items: center;
    height: 56px;
    padding: 0 8px;
    background: var(--masthead);
    position: sticky;
    top: 0;
    z-index: 35;
    border-bottom: 1px solid var(--border);
  }
  .mobile-match-header > button {
    border: 0;
    background: transparent;
    color: var(--text);
    height: 44px;
    padding: 5px;
    display: grid;
    place-items: center;
  }
  .mobile-match-header > button:first-child .ui-icon {
    transform: rotate(180deg);
  }
  .mobile-match-header .crest {
    width: 30px;
    height: 30px;
  }
  .mobile-match-header > b {
    text-align: center;
    font-size: 21px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .compact-match-status {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.2;
  }
  .compact-match-status.is-live {
    color: var(--live);
  }
  .match-overflow {
    position: relative;
  }
  .match-overflow > summary {
    display: grid;
    place-items: center;
    height: 44px;
    list-style: none;
    cursor: pointer;
  }
  .match-overflow > summary::-webkit-details-marker {
    display: none;
  }
  .match-overflow > div {
    position: absolute;
    right: 0;
    top: 46px;
    min-width: 180px;
    padding: 6px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px #0003;
  }
  .match-overflow button,
  .match-overflow a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 14px;
    text-align: left;
    text-decoration: none;
  }
  .match-overflow button:hover,
  .match-overflow a:hover {
    background: var(--surface-hover);
  }
  body.match-page .match-hero {
    display: none;
  }
  body.match-page .fixture-tabs {
    top: 56px;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 16px;
    gap: 24px;
    background: var(--masthead);
    border-bottom: 1px solid var(--border);
    z-index: 30;
  }
  body.match-page .fixture-tabs button {
    font-size: 13px;
    min-height: 48px;
  }
  .mobile-match-identity {
    display: block;
    padding: 12px 16px;
    font-size: 12px;
    color: var(--muted);
    background: var(--surface);
  }
  #fixtureBody[data-view="lineups"] .mobile-match-identity {
    display: none;
  }
  .match-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 12px;
  }
  .rail-section {
    padding: 16px;
  }
  .match-source {
    font-size: 10px;
    padding: 8px 16px;
    margin: 0;
  }
  body.match-page .match-card {
    padding: 16px;
    border-radius: 0;
    margin: 0 0 12px;
  }
  body.match-page .lineup-card {
    padding: 0;
    margin: 0 0 12px;
    overflow: hidden;
  }
  .lineup-identity {
    padding: 12px 16px;
    gap: 8px;
    align-items: center;
    background: var(--surface-raised);
  }
  .lineup-identity .lineup-team {
    font-size: 12px;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 48%;
  }
  .lineup-identity .lineup-team span {
    margin: 0;
    flex-basis: 100%;
    font-size: 11px;
    padding-left: 28px;
  }
  .lineup-identity .lineup-team:last-child span {
    padding-left: 0;
    padding-right: 28px;
  }
  .lineup-identity .lineup-team .crest {
    width: 22px;
    height: 22px;
  }
  .lineup-identity .lineup-team b {
    font-weight: 600;
  }
  body.match-page .football-pitch {
    flex-direction: column;
    width: 100%;
    height: 1040px;
    min-height: 1040px;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
  }
  body.match-page .football-pitch .pitch-half {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 50%;
    padding: 24px 8px;
    gap: 4px;
    flex: 1;
  }
  body.match-page .football-pitch .pitch-row {
    flex-direction: row;
    justify-content: space-around;
    gap: 4px;
    flex: 1;
    width: 100%;
  }
  body.match-page .football-pitch .pitch-player {
    width: 20%;
    flex: 1;
    max-width: 86px;
    gap: 5px;
  }
  body.match-page .pitch-player .pitch-name {
    font-size: 12px;
    line-height: 1.25;
    max-width: 76px;
    min-height: 30px;
  }
  .player-marker,
  body.match-page .pitch-player .event-portrait,
  body.match-page .pitch-player .player-portrait {
    width: 46px;
    height: 46px;
  }
  body.match-page .pitch-player .event-portrait {
    --face-size: 46px;
  }
  body.match-page .pitch-player .rating-badge {
    font-size: 11px;
    min-width: 28px;
    right: -12px;
    top: -6px;
    padding: 1px 4px;
  }
  body.match-page .pitch-markings {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: none;
  }
  body.match-page .pitch-note {
    padding: 10px 16px;
  }
  .bench-grid {
    display: block;
  }
  body.match-page .manager-row {
    padding: 0 0 12px;
  }
  .fixture-player {
    min-height: 58px;
  }
  .live-stakes-card {
    margin: 12px;
    border-radius: 10px;
    padding: 14px;
  }
  .stakes-position {
    font-size: 12px;
  }
  .match-story {
    margin: 12px;
  }
  .event-timeline {
    margin: 0;
  }
  body.match-page .split-timeline .event-card {
    padding: 8px;
    gap: 6px;
  }
  body.match-page .split-timeline .event-copy strong {
    font-size: 12px;
  }
  .timeline-item .event-minute {
    font-size: 10px;
  }
  body.club-page #teamDialog[open] {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  body.club-page #teamDialog > .dialog-head {
    padding: 20px 16px 12px;
    flex-wrap: wrap;
    border-radius: 0;
  }
  body.club-page #teamTitle {
    font-size: 22px;
  }
  .club-header-actions {
    margin: 0;
    gap: 8px;
    flex-basis: 100%;
    padding-left: 0;
  }
  body.club-page .club-tabs {
    padding: 0 16px;
    gap: 24px;
    min-height: 48px;
    border-radius: 0;
    margin-bottom: 12px;
  }
  body.club-page #teamStatus {
    padding: 6px 16px;
  }
  .club-header-actions .button {
    font-size: 12px;
    min-height: 36px;
  }
  #clubOverview {
    padding: 0 12px;
  }
  #clubOverview .workspace-card {
    padding: 16px;
  }
  #clubOverview .competition-overview {
    gap: 12px;
  }
  .settings-page {
    padding: 16px 12px 88px;
  }
  .settings-page h1 {
    font-size: 22px;
  }
  .entity-panel {
    border-radius: 10px;
  }
  .entity-stat-grid dd {
    font-size: 21px;
  }
  .mobile-bottom-nav {
    min-height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--masthead);
    border-color: var(--border);
  }
  .mobile-bottom-nav button {
    min-height: 60px;
    border-radius: 0;
    background: transparent;
  }
  .mobile-bottom-nav .ui-icon {
    width: 22px;
    height: 22px;
  }
  .mobile-bottom-nav span {
    font-size: 11px;
  }
  .mobile-bottom-nav button[aria-current="page"] {
    color: var(--brand);
    background: transparent;
  }
}
@media (max-width: 374px) {
  .mobile-match-header {
    gap: 2px;
    grid-template-columns: 36px 32px 26px minmax(42px, 1fr) 26px 32px 36px;
  }
  .player-marker,
  body.match-page .pitch-player .event-portrait,
  body.match-page .pitch-player .player-portrait {
    width: 42px;
    height: 42px;
  }
  body.match-page .pitch-player .event-portrait {
    --face-size: 42px;
  }
  body.match-page .pitch-player .pitch-name {
    font-size: 11px;
    max-width: 66px;
  }
  .lineup-identity {
    padding: 12px;
  }
  .lineup-identity .lineup-team {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto;
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
  }
}
/* Product surfaces use one density scale across feed, clubs, competition and editorial views. */
body.club-page .follow-row {
  display: none;
}
body.club-page #teamTitle:focus {
  outline: none;
}
.club-header-actions #followTeam {
  margin: 0;
  min-height: 36px;
  white-space: nowrap;
}
body.club-page #closeTeam {
  order: 5;
  margin-left: 8px;
  font-size: 12px;
  background: transparent;
  border: 0;
}
body.club-page #teamStatus {
  color: var(--muted);
  font-size: 11px;
  padding-bottom: 4px;
}
.team-summary-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0;
}
.team-summary-stats > div {
  padding: 10px;
  background: transparent;
  border-radius: 0;
  border-right: 1px solid var(--border);
}
.team-summary-stats > div:last-child {
  border: 0;
}
.team-summary-stats small {
  font-size: 11px;
}
.team-summary-stats strong {
  font-size: 20px;
}
.club-facts {
  font-size: 13px;
}
.club-facts > div {
  padding: 10px 0;
}
.club-facts dt {
  color: var(--muted);
}
#matchGrid .match-row {
  min-height: 56px;
  padding: 6px 16px;
  gap: 10px;
}
#matchGrid .match-row > .match-scores {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  background: transparent;
  letter-spacing: 0;
  min-width: 50px;
}
#matchGrid .match-row > .match-team {
  font-size: 14px;
  font-weight: 500;
}
#matchGrid .match-row > .match-team .crest {
  width: 24px;
  height: 24px;
}
.league-heading {
  min-height: 46px;
  padding: 8px 16px;
}
.league-heading .round-label {
  font-size: 11px;
}
.group-follow,
.group-collapse {
  min-height: 36px;
  min-width: 36px;
}
.sidebar {
  top: 88px;
}
.sidebar .league-link {
  min-height: 44px;
}
.following-onboarding {
  padding: 12px 16px;
}
.match-context-rail .context-news:first-of-type img {
  max-height: 140px;
  object-fit: cover;
}
#news .section-title h2,
#transfers .section-title h2 {
  font-size: 26px;
  letter-spacing: -0.6px;
}
.news-grid .story h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
}
.news-grid .story:first-child h3 {
  font-size: 24px;
  line-height: 1.35;
}
.news-grid .story:first-child .story-media {
  max-height: 300px;
}
.story-body {
  padding: 16px;
}
.story .meta {
  font-size: 11px;
}
.news-topics button {
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 8px;
  min-height: 34px;
}
.transfer-grid .story {
  border-radius: 10px;
}
.transfer-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  min-height: 64px;
}
.transfer-item strong {
  font-size: 14px;
  font-weight: 600;
}
.transfer-item small,
.transfer-item time {
  font-size: 12px;
}
.global-search-results {
  padding: 8px;
  border-radius: 12px;
}
.search-item {
  min-height: 56px;
  border-radius: 8px;
}
.search-item:hover {
  background: var(--surface-hover);
}
.ask-page {
  max-width: 860px;
  padding: 24px 0;
}
.ask-heading {
  margin-bottom: 24px;
}
.ask-heading h1 {
  font-size: 20px;
  font-weight: 600;
}
.ask-mark {
  border-radius: 10px;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
}
#askIntro {
  padding: 24px 0 12px;
}
#askIntro h2 {
  font-size: 28px;
  letter-spacing: -0.75px;
}
#askIntro p {
  font-size: 14px;
  line-height: 1.6;
}
.ask-suggestions {
  max-width: 700px;
  margin: 20px auto;
  gap: 10px;
}
.ask-suggestions button {
  padding: 14px 16px;
  border-radius: 10px;
  min-height: 72px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.ask-suggestions button strong {
  font-weight: 550;
}
.ask-suggestions button small {
  font-size: 11px;
  color: var(--muted);
}
.ask-composer {
  box-shadow: none;
  border-radius: 12px;
  padding: 12px 14px;
}
.ask-composer textarea {
  font-size: 15px;
}
.ask-answer-card {
  border-radius: 10px;
}
.ask-message {
  font-size: 14px;
  line-height: 1.65;
}
.settings-panel {
  border-radius: 12px;
}
.settings-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.settings-panel h2 {
  font-size: 16px;
}
.empty {
  padding: 24px 16px;
  min-height: 0;
  font-size: 13px;
  color: var(--muted);
}
.source-link,
.match-source {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 1023px) {
  .team-summary-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .team-summary-stats > div:nth-child(3) {
    border: 0;
  }
}
@media (max-width: 759px) {
  #matchGrid .match-row {
    min-height: 58px;
    padding: 6px 10px;
    gap: 6px;
  }
  #matchGrid .match-row > .match-team {
    font-size: 12px;
  }
  #matchGrid .match-row > .match-team .crest {
    width: 22px;
    height: 22px;
  }
  .league-heading {
    padding: 8px 12px;
  }
  .league-heading .round-label {
    font-size: 10px;
  }
  .news-grid .story:first-child h3 {
    font-size: 20px;
  }
  .news-grid .story h3 {
    font-size: 14px;
  }
  .news-grid .story:first-child .story-media {
    max-height: 220px;
  }
  .ask-page {
    padding: 16px 0 84px;
  }
  #askIntro h2 {
    font-size: 24px;
  }
  #askIntro {
    padding: 16px 0 10px;
  }
  .ask-suggestions {
    margin: 16px 0;
    gap: 8px;
  }
  .ask-suggestions button {
    min-height: 78px;
    font-size: 12px;
    padding: 12px;
  }
  .ask-heading {
    margin-bottom: 12px;
  }
  .club-header-actions {
    order: 6;
  }
  .club-header-actions #followTeam {
    min-height: 40px;
  }
  .club-header-actions .ask-context-action {
    min-height: 40px;
  }
  body.club-page #closeTeam {
    margin-left: auto;
  }
  .team-summary-stats > div {
    padding: 8px;
  }
  .team-summary-stats strong {
    font-size: 18px;
  }
  .team-summary-stats small {
    font-size: 10px;
  }
  .group-follow,
  .group-collapse {
    min-height: 40px;
    min-width: 40px;
  }
  .settings-panel {
    padding: 16px;
  }
  .settings-panel h2 {
    font-size: 16px;
  }
}

/* Compact scorer lines and reserved coach portrait space. */
body.match-page .hero-scorers .scorer-row {
  display: flex;
  align-items: baseline;
  justify-content: inherit;
  gap: 4px;
  min-height: 20px;
}
body.match-page .hero-scorers > div:first-child .scorer-row {
  justify-content: flex-end;
}
body.match-page .hero-scorers .scorer-row small {
  display: inline;
  white-space: nowrap;
}
body.match-page .manager-row {
  padding: 12px 12px 12px 60px;
  gap: 3px;
  background: transparent;
  border-radius: 0;
}
body.match-page .manager-row > .manager-photo {
  left: 8px;
  top: 16px;
  width: 40px;
  height: 40px;
}

@media (max-width: 759px) {
  body.match-page .pitch-markings > g:first-child > circle {
    display: none;
  }
  body.match-page .football-pitch:after {
    content: "";
    display: block;
    position: absolute;
    inset: auto;
    top: 50%;
    left: 50%;
    width: 27%;
    height: auto;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 1px solid var(--pitch-line);
    border-radius: 50%;
    pointer-events: none;
    background: transparent;
  }
}
/* Article imagery stays inside its column; headlines determine row height. */
#clubOverview .workspace-card > p:has(a) {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
#clubOverview .entity-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 759px) {
  .news-grid .story:first-child {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    gap: 0;
  }
  .news-grid .story:first-child .story-media {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16/9;
    flex: none;
  }
  .news-grid .story:first-child .story-body {
    padding: 16px;
    width: 100%;
    height: auto;
  }
  .news-grid .story:nth-child(n + 2) {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    align-items: start;
    min-height: 0;
    height: auto;
  }
  .news-grid .story:nth-child(n + 2) .story-media {
    width: 100%;
    height: 88px;
    min-height: 0;
    min-width: 0;
    aspect-ratio: auto;
    border-radius: 6px;
  }
  .news-grid .story:nth-child(n + 2) .story-body {
    min-width: 0;
    padding: 0;
  }
}
