* {
  box-sizing: border-box;
}

:root {
  --player-node-size: 54px;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #e9e1c7;
  color: #142118;
  overflow: hidden;
}

html {
  max-width: 100%;
}

#app-root {
  min-height: 100vh;
}

.draft-board {
  min-height: 100vh;
  height: 100vh;
  width: min(1680px, 100vw);
  margin: 0 auto;
  padding: clamp(6px, 0.7vw, 10px);
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(232px, auto) minmax(0, 1fr);
  gap: clamp(6px, 0.7vw, 10px);
  align-items: stretch;
}

.draft-board.is-match-preview {
  grid-template-rows: minmax(0, auto) minmax(0, 1fr);
}

.draft-board.is-squad-complete {
  grid-template-rows: minmax(96px, auto) minmax(0, 1fr);
}

.dashboard-top-row {
  min-height: 0;
  max-height: 35vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(6px, 0.7vw, 10px);
  overflow: hidden;
}

.dashboard-top-row.is-tournament-active {
  max-height: none;
  overflow: visible;
}

.squad-complete-active .dashboard-top-row {
  max-height: 132px;
}

.squad-complete-active .dashboard-top-row .board-left {
  grid-template-columns: minmax(170px, 0.8fr) minmax(170px, 0.8fr) minmax(230px, 1fr);
  align-items: stretch;
}

.squad-complete-active .dashboard-top-row .board-left > .board-panel,
.squad-complete-active .dashboard-top-row .top-action-stack {
  min-height: 72px;
  max-height: 112px;
}

.squad-complete-active .dashboard-top-row .locked-setup-summary {
  align-content: center;
  gap: 4px;
}

.squad-complete-active .dashboard-top-row .top-action-stack {
  grid-template-columns: repeat(2, minmax(0, 72px)) minmax(150px, 1fr);
  grid-template-rows: minmax(36px, auto) minmax(44px, auto);
  align-content: start;
  gap: 5px;
}

.squad-complete-active .dashboard-top-row .top-action-stack .start-match-button {
  grid-column: 1 / -1;
  min-height: 44px;
  padding-top: 6px;
  padding-bottom: 5px;
}

.squad-complete-active .dashboard-top-row .top-action-stack button {
  min-height: 34px;
}

.match-preview-active .dashboard-top-row .board-left {
  display: none !important;
}

.match-preview-active .dashboard-top-row .board-center {
  width: 100%;
}

.match-preview-active .dashboard-top-row .match-preview-panel {
  margin: 0;
}

.dashboard-main-row {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(760px, 1fr) minmax(300px, 0.26fr);
  gap: clamp(6px, 0.7vw, 10px);
  overflow: hidden;
}

.board-column {
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 0.55vw, 8px);
  overflow: hidden;
}

.board-panel {
  padding: clamp(7px, 0.65vw, 9px);
  border: 1px solid #b1b1b1;
  border-radius: 9px;
  background: #f4ecd4;
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

.marquee-text {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-text.is-overflowing {
  text-overflow: clip !important;
  animation: marqueeTextScroll var(--marquee-duration, 8s) linear infinite;
}

.marquee-text.is-overflowing:hover {
  animation-play-state: paused;
}

@keyframes marqueeTextScroll {
  0%,
  18% {
    text-indent: 0;
  }
  82%,
  100% {
    text-indent: calc(-1 * var(--marquee-distance, 40px));
  }
}

.dashed-helper {
  border: 1px dashed #7a8e80;
  text-align: center;
  font-size: 12px;
}

.locked-setup-summary {
  display: grid;
  gap: 5px;
  border-color: #7f9a78;
  background: #e8dfc5;
}

.locked-setup-summary p {
  margin: 0;
  color: #233c2b;
  font-size: 0.88rem;
  font-weight: 700;
}

.locked-setup-summary strong {
  color: #174f2b;
}

h1,
h2,
h3 {
  margin: 0 0 6px;
}

h2 {
  font-size: 0.98rem;
}

h3 {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.panel-eyebrow {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #36513e;
  text-transform: uppercase;
}

.muted {
  color: #55615b;
}

button {
  margin: 0;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid #6e7a73;
  background: #f7f3e6;
  color: #20332a;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
  min-width: 0;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}

button:hover {
  border-color: #1e5a30;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.compact-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.top-action-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
}

.secondary-btn {
  background: #e6dfc8;
}

.audio-toggle-button {
  font-weight: 900;
}

.audio-toggle-button.is-muted {
  opacity: 0.68;
  filter: grayscale(0.35);
}

.debug-fill-button {
  border-color: #7c5b15;
  background: #f2df9d;
  color: #3e2d09;
}

#confirmPickButton {
  display: none !important;
}

.change-control-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #a6a08f;
}

.change-rights-text {
  margin: 0;
  color: #31513a;
  font-size: 0.82rem;
  font-weight: 800;
}

.ad-panel {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px dashed #9a5b38;
  border-radius: 10px;
  background: #f1dcc3;
}

.ad-panel p {
  margin: 0;
  color: #573326;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.roll-button {
  width: 100%;
  background: #c50f1a;
  border-color: #7e1113;
  color: #fff8ea;
  font-size: 0.82rem;
  padding: 7px 8px;
}

.roll-button:hover {
  background: #e01924;
}

.start-match-button {
  width: 100%;
  margin-top: 2px;
  padding: 7px 8px 6px;
  border: 2px solid #7e1113;
  border-bottom-width: 5px;
  border-radius: 10px;
  background: #8f1d20;
  color: #fff8ea;
  box-shadow: 0 8px 0 rgba(82, 19, 18, 0.35);
  display: grid;
  gap: 2px;
  justify-items: center;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.start-match-button .start-match-arrow {
  font-size: 1rem;
  line-height: 1;
}

.start-match-button:disabled {
  background: #bda9a0;
  border-color: #9c8580;
  color: rgba(255, 248, 234, 0.76);
  box-shadow: none;
  opacity: 0.72;
}

.start-match-button.is-active {
  background: #d4141f;
  border-color: #7e1113;
  color: #fffdf4;
  animation: startButtonPulse 1.45s ease-in-out infinite;
}

.start-match-button.is-active:hover {
  background: #eb1724;
}

@keyframes startButtonPulse {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
    box-shadow:
      0 8px 0 rgba(82, 19, 18, 0.35),
      0 0 0 0 rgba(212, 20, 31, 0.28);
  }
  50% {
    filter: brightness(1.08);
    transform: scale(1.025);
    box-shadow:
      0 8px 0 rgba(82, 19, 18, 0.32),
      0 0 0 8px rgba(212, 20, 31, 0.12);
  }
}

.status-summary {
  display: grid;
  gap: 6px;
}

.summary-line {
  margin: 0;
  font-size: 0.95rem;
  color: #1f3427;
  font-weight: 600;
}

.box-score-panel {
  background: #efe4c1;
  border-color: #8f9c89;
  display: block;
}

.box-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #23402d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.overall-score {
  margin: 8px 0;
  color: #12251a;
  font-size: 2.8rem;
  line-height: 1;
  font-weight: 900;
  text-align: center;
}

.score-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.score-split span {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  border: 1px solid #b8ad8c;
  border-radius: 8px;
  background: #f8f0d6;
  color: #374638;
  font-size: 0.72rem;
  font-weight: 800;
}

.score-split strong {
  color: #13281c;
  font-size: 1.1rem;
}

.match-preview-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.62fr) minmax(0, 2.4fr) minmax(210px, 0.7fr);
  grid-template-rows: auto auto auto auto;
  gap: 10px 14px;
  align-items: start;
  align-content: start;
  background: #f6eed6;
  border-color: #8f9c89;
  overflow: visible;
}

.dashboard-top-row.is-tournament-active .board-center {
  overflow: visible;
}

.dashboard-top-row.is-tournament-active .match-preview-panel {
  width: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: start;
}

.dashboard-top-row.is-tournament-active .match-preview-panel h2 {
  grid-column: 1;
  grid-row: 1;
}

.dashboard-top-row.is-tournament-active .match-preview-panel .muted {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}

.dashboard-top-row.is-tournament-active .match-preview-summary {
  grid-column: 1 / -1;
  grid-row: 3;
}

.dashboard-top-row.is-tournament-active .tournament-road {
  grid-column: 1 / -1;
  grid-row: 4;
}

.dashboard-top-row.is-tournament-active .tournament-run-status {
  grid-column: 1;
  grid-row: 5;
}

.dashboard-top-row.is-tournament-active .match-preview-panel > .simulate-match-button,
.dashboard-top-row.is-tournament-active .match-preview-panel > .tournament-start-button,
.dashboard-top-row.is-tournament-active .match-preview-panel > .tournament-flow-button {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  min-width: 220px;
}

.dashboard-top-row.is-tournament-active .match-preview-panel > .match-preview-actions {
  grid-column: 2;
  grid-row: 5;
}

.dashboard-top-row.is-tournament-active .match-preview-panel > .player-tournament-stats-panel {
  grid-column: 1;
  grid-row: 6;
}

.match-preview-panel h2 {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
  color: #183c27;
  font-size: 1.18rem;
  line-height: 1.05;
}

.match-preview-panel h3 {
  margin: 6px 0 0;
  color: #183c27;
}

.match-preview-panel .muted {
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: center;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}

.match-preview-summary,
.tournament-run-status,
.team-sheet-list {
  display: grid;
  gap: 3px;
}

.match-preview-summary {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.tournament-run-status {
  grid-column: 1 / 3;
  grid-row: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: center;
  min-width: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tournament-road {
  grid-column: 1 / 4;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(7, minmax(136px, 1fr));
  gap: 10px;
  min-width: 0;
  align-self: stretch;
  overflow: visible;
  padding: 2px 0 0;
}

.tournament-road-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 82px;
  padding: 9px 10px;
  border: 1px solid #c8bd9d;
  border-radius: 7px;
  background: #f8f0d6;
  color: #28382e;
}

.tournament-road-card span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.road-stage-name {
  color: #173a26;
  font-size: 0.86rem;
  font-weight: 900;
}

.road-opponent {
  color: #384a40;
  font-size: 0.76rem;
  font-weight: 700;
}

.road-result {
  color: #13271b;
  font-size: 0.92rem;
  font-weight: 900;
}

.road-status {
  color: #5b645f;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tournament-road-card.status-locked {
  opacity: 0.54;
  filter: grayscale(0.3);
}

.tournament-road-card.status-current {
  border-color: #1f6f33;
  background: #e4eed5;
  box-shadow: 0 0 0 2px rgba(31, 111, 51, 0.18);
}

.tournament-road-card.status-won {
  border-color: #2c7d3c;
  background: #dcecd2;
}

.tournament-road-card.status-draw {
  border-color: #a98027;
  background: #f4e5bd;
}

.tournament-road-card.status-lost {
  border-color: #8b2e2e;
  background: #ead0c8;
  color: #4d1818;
}

.tournament-road-card.status-champion {
  border-color: #b48a20;
  background: #f7e8a9;
  box-shadow: inset 0 0 0 2px rgba(31, 111, 51, 0.22);
}

.matchup-preview-card {
  display: grid;
  gap: 7px;
  padding: 6px;
  border: 1px solid #99a78e;
  border-radius: 10px;
  background: #eef0d8;
}

.side-matchup-card {
  grid-column: 1 / -1;
  align-self: start;
  gap: 5px;
  padding: 8px;
  max-height: none;
  overflow: hidden;
}

.pitch-matchup-card {
  position: absolute;
  z-index: 11;
  left: 14px;
  right: 14px;
  top: 14px;
  max-height: calc(100% - 28px);
  padding: 12px;
  gap: 8px;
  border: 2px solid rgba(31, 111, 51, 0.65);
  background: rgba(238, 244, 220, 0.94);
  box-shadow: 0 12px 24px rgba(20, 36, 24, 0.18);
  overflow: hidden;
  pointer-events: none;
}

.match-preview-panel > .simulate-match-button,
.match-preview-panel > .tournament-start-button,
.match-preview-panel > .tournament-flow-button {
  grid-column: 3;
  grid-row: 4;
}

.match-preview-panel > .match-preview-actions {
  grid-column: 3;
  grid-row: 5;
}

.match-preview-panel > .simulate-match-button,
.match-preview-panel > .tournament-start-button,
.match-preview-panel > .tournament-flow-button {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 0.9rem;
}

.match-preview-panel > .player-tournament-stats-panel {
  grid-column: 1 / 3;
  grid-row: 5;
  max-height: none;
  overflow: visible;
}

.matchup-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.matchup-header h3 {
  margin: 0;
  color: #173a26;
  font-size: 1rem;
}

.matchup-header span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #1f6f33;
  color: #f5fff4;
  font-size: 0.78rem;
  font-weight: 900;
}

.matchup-stage,
.matchup-versus,
.matchup-opponent-meta,
.matchup-formation-line {
  margin: 0;
  color: #263b2d;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.12;
}

.matchup-opponent-meta {
  color: #617066;
  font-size: 0.74rem;
}

.matchup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.matchup-team {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid #c7bd99;
  border-radius: 8px;
  background: #fbf4df;
}

.matchup-team span,
.matchup-team strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.matchup-team-label {
  color: #536457;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.matchup-team strong {
  color: #183c27;
  font-size: 0.86rem;
}

.matchup-team span:not(.matchup-team-label) {
  color: #24372b;
  font-size: 0.74rem;
  font-weight: 800;
}

.opponent-formation-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #c7b79b;
  border-radius: 9px;
  background: #f8f0d6;
}

.opponent-formation-head {
  display: grid;
  gap: 2px;
}

.opponent-formation-head h4 {
  margin: 0;
  color: #4d241d;
  font-size: 0.78rem;
}

.opponent-formation-head span {
  min-width: 0;
  color: #35463b;
  font-size: 0.72rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-mini-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 6;
  min-height: 230px;
  overflow: hidden;
  border: 2px solid #5c6f4d;
  border-radius: 9px;
  background:
    linear-gradient(to right, transparent 49.5%, rgba(255, 255, 255, 0.22) 49.5%, rgba(255, 255, 255, 0.22) 50.5%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, rgba(255, 255, 255, 0.22) 49.5%, rgba(255, 255, 255, 0.22) 50.5%, transparent 50.5%),
    repeating-linear-gradient(
      to bottom,
      rgba(36, 93, 45, 0.72) 0,
      rgba(36, 93, 45, 0.72) 18px,
      rgba(43, 112, 54, 0.58) 18px,
      rgba(43, 112, 54, 0.58) 36px
    ),
    #2d6d3b;
}

.opponent-mini-node {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(255, 245, 235, 0.9);
  border-radius: 999px;
  background: #5b2c26;
  color: #fff7ef;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px;
  text-align: center;
}

.opponent-mini-node span,
.opponent-mini-node strong,
.opponent-mini-node em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.opponent-mini-node span {
  font-size: 0.5rem;
  font-weight: 800;
}

.opponent-mini-node strong {
  font-size: 0.56rem;
}

.opponent-mini-node em {
  color: #f5db9b;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 900;
}

.tournament-start-button {
  margin-top: 2px;
}

.simulate-match-button {
  width: 100%;
  border-color: #1f6f33;
  background: #e6efd9;
  color: #193c27;
}

.simulate-match-button:not(:disabled):hover {
  background: #d9ebcd;
}

.match-event-log-panel {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #9aa58e;
  border-radius: 10px;
  background: #fbf4df;
}

.match-atmosphere-panel {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid #9aa58e;
  border-radius: 10px;
  background: #f7efd4;
  color: #173a26;
  transition:
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.match-atmosphere-panel.is-hidden {
  display: none;
}

.atmosphere-header,
.atmosphere-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.atmosphere-header strong {
  color: #173a26;
  font-size: 0.84rem;
}

.atmosphere-header span,
.atmosphere-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 900;
}

.atmosphere-header span {
  justify-self: end;
}

.atmosphere-meta span:last-child {
  justify-self: end;
}

.atmosphere-bar {
  position: relative;
  display: flex;
  overflow: hidden;
  height: 13px;
  border: 1px solid #73806d;
  border-radius: 999px;
  background: #e7ddbd;
}

.atmosphere-fill-user,
.atmosphere-fill-opponent {
  display: block;
  height: 100%;
  transition: width 0.45s ease;
}

.atmosphere-fill-user {
  background: linear-gradient(90deg, #1f6f33, #78a548);
}

.atmosphere-fill-opponent {
  margin-left: auto;
  background: linear-gradient(90deg, #a94a39, #6f2230);
}

.match-atmosphere-panel.leader-user {
  box-shadow: inset 3px 0 0 rgba(31, 111, 51, 0.7);
}

.match-atmosphere-panel.leader-opponent {
  box-shadow: inset -3px 0 0 rgba(111, 34, 48, 0.7);
}

.match-atmosphere-panel.atmosphere-glow {
  animation: atmosphereGlow 0.72s ease-out;
}

.match-atmosphere-panel.atmosphere-goal-flash {
  animation: atmosphereGoalFlash 0.82s ease-out;
}

.match-atmosphere-panel.atmosphere-tense {
  animation: atmosphereTense 0.9s ease-out;
}

.match-event-log-panel h3 {
  margin: 0;
  color: #173a26;
}

.match-event-score {
  margin: 0;
  color: #13271b;
  font-size: 0.9rem;
  font-weight: 900;
}

.match-event-score.score-pulse {
  animation: scorePulse 0.55s ease-out;
}

.match-event-list {
  display: grid;
  gap: 4px;
  max-height: 230px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.match-event-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 5px 6px;
  border: 1px solid #ded2ad;
  border-radius: 7px;
  background: #f8f0d6;
  color: #233629;
  font-size: 0.74rem;
  font-weight: 700;
}

.match-event-minute {
  color: #1f6f33;
  font-weight: 900;
}

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

.event-scene-badge {
  display: inline-flex;
  align-items: center;
  max-width: 110px;
  margin-right: 6px;
  padding: 2px 6px;
  border: 1px solid #93a071;
  border-radius: 999px;
  background: #e8efd4;
  color: #173a26;
  font-size: 0.62rem;
  font-weight: 900;
  vertical-align: middle;
}

.event-scene-counter {
  border-color: #1f6f33;
  background: #d9efd0;
  color: #10391f;
  box-shadow: inset 0 -1px 0 rgba(31, 111, 51, 0.18);
}

.event-scene-corner {
  border-color: #8b6d2c;
  background: #f3e5ba;
}

.event-scene-free-kick {
  border-color: #315f7f;
  background: #dcebf0;
  color: #17384c;
}

.event-scene-offside {
  border-color: #82392f;
  background: #f0d8cf;
}

.event-scene-save {
  border-color: #295648;
  background: #dcece2;
}

.event-scene-missed {
  border-color: #9a7a3b;
  background: #f5e8c8;
}

.event-scene-penalty {
  border-color: #b7111d;
  background: #f2d4d2;
  color: #5e1016;
}

.event-scene-penalty-shootout {
  border-color: #6f2230;
  background: #ead6d4;
  color: #421018;
}

.event-scene-foul {
  border-color: #9a6a20;
  background: #f6e0aa;
  color: #4d3210;
}

.event-scene-yellow-card {
  border-color: #9f8211;
  background: #ffe27a;
  color: #3b2c04;
}

.event-scene-red-card {
  border-color: #9d141c;
  background: #ffd4d6;
  color: #5e070d;
}

.event-scene-confrontation {
  border-color: #743a68;
  background: #efd9ef;
  color: #3f1737;
}

.event-scene-var {
  border-color: #1d2430;
  background: #dce5f2;
  color: #101722;
}

.event-scene-goal-cancelled {
  border-color: #8f121a;
  background: #f0c5c8;
  color: #52080d;
}

.event-scene-goal-confirmed {
  border-color: #1e6f3e;
  background: #cfead5;
  color: #10391f;
}

.card-yellow-badge,
.card-red-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 950;
  vertical-align: middle;
}

.card-yellow-badge {
  border: 1px solid #80640d;
  background: #ffd948;
  color: #2d2102;
}

.card-red-badge {
  border: 1px solid #781016;
  background: #c81724;
  color: #fff3f2;
}

.match-event-item.event-goal {
  border-color: #1f6f33;
  background: #dcecd2;
  color: #13341f;
  font-weight: 900;
  animation: goalFlash 0.6s ease-out;
}

.match-event-item.event-fulltime {
  border-color: #36513e;
  background: #e3dbc0;
}

.match-event-item.event-halftime {
  background: #efe4c1;
}

.match-event-item.event-attack,
.match-event-item.event-shot,
.match-event-item.event-defense {
  border-color: #b5bf94;
  background: #f2ebcf;
}

.match-event-item.event-defense {
  border-color: #6d806b;
  background: #e6edd6;
}

.match-event-item.event-substitution {
  border-color: #7d6aa8;
  background: #ece6f4;
  color: #2f2747;
}

.match-event-item.event-foul,
.match-event-item.event-hard_foul,
.match-event-item.event-confrontation {
  border-color: #aa8430;
  background: #f5e2b6;
  color: #432b0c;
}

.match-event-item.event-yellow_card {
  border-color: #9f8211;
  background: #fff0a5;
  color: #332607;
}

.match-event-item.event-red_card {
  border-color: #a10f19;
  background: #ffd7d9;
  color: #58070d;
  font-weight: 950;
  box-shadow: inset 4px 0 0 #c81724;
}

.discipline-summary {
  display: grid;
  gap: 7px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #9b8a5a;
  border-radius: 8px;
  background: #efe5c6;
  color: #173a26;
}

.discipline-summary strong {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.discipline-summary p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.discipline-summary-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 0.75rem;
}

.discipline-summary-grid div > span:first-child {
  color: #5b4a22;
  font-weight: 950;
}

.discipline-summary-grid div > span:not(:first-child),
.discipline-summary-grid em {
  color: #173a26;
  font-style: normal;
  font-weight: 800;
}

.var-summary {
  display: grid;
  gap: 7px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #202c3d;
  border-radius: 8px;
  background: #e2e8ef;
  color: #101722;
}

.var-summary strong {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.var-summary p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.var-summary-list {
  display: grid;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 850;
}

.match-event-item.event-var_check {
  border-color: #202c3d;
  background: #dfe7f0;
  color: #101722;
  box-shadow: inset 4px 0 0 #1f6fbf;
}

.match-event-item.event-goal_cancelled {
  border-color: #93131d;
  background: #f4c9cc;
  color: #56070d;
  font-weight: 950;
  box-shadow: inset 4px 0 0 #b80f1d;
}

.match-event-item.event-goal_confirmed {
  border-color: #1f6f33;
  background: #d6ecd2;
  color: #123b20;
  font-weight: 950;
}

.match-event-item.event-penalty_given,
.match-event-item.event-penalty_not_given {
  border-color: #25364a;
  background: #e3e9f1;
  color: #132033;
}

.halftime-panel {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 2px solid #1f6f33;
  border-radius: 10px;
  background: #f7efd4;
  color: #173a26;
  box-shadow: 0 4px 12px rgba(31, 111, 51, 0.16);
}

.halftime-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.halftime-header h3,
.halftime-panel p {
  margin: 0;
}

.halftime-header h3 {
  color: #173a26;
  font-size: 0.82rem;
}

.halftime-header strong {
  min-width: 0;
  justify-self: end;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.halftime-sub-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(112px, auto);
  gap: 6px;
  align-items: end;
}

.halftime-sub-grid label {
  min-width: 0;
  display: grid;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 900;
}

.halftime-sub-grid select {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid #8d9b85;
  border-radius: 8px;
  background: #fff8df;
  color: #1e3328;
  font-weight: 800;
}

.halftime-sub-count {
  color: #40533f;
  font-size: 0.76rem;
  font-weight: 800;
}

.halftime-resume-button {
  min-height: 30px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.player-tournament-stats-panel {
  display: none !important;
  gap: 7px;
  padding: 9px;
  border: 1px solid #9aa58e;
  border-radius: 10px;
  background: #fbf4df;
}

.player-tournament-stats-panel h3 {
  margin: 0;
  color: #173a26;
  font-size: 0.9rem;
}

.player-stats-table {
  display: grid;
  gap: 3px;
  max-height: 210px;
  overflow-y: auto;
  overflow-x: hidden;
}

.player-stats-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 34px 34px 34px 34px;
  gap: 5px;
  align-items: center;
  padding: 4px 5px;
  border-bottom: 1px solid rgba(92, 103, 78, 0.2);
  color: #1e3328;
  font-size: 0.72rem;
  font-weight: 800;
}

.player-stats-header {
  border-bottom: 1px dashed #8a948b;
  color: #34533d;
  font-size: 0.65rem;
  letter-spacing: 0;
}

.player-stats-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-stats-row span:not(:first-child) {
  text-align: center;
}

.pitch-preview.pitch-pulse-user {
  animation: pitchPulseUser 0.55s ease-out;
}

.pitch-preview.pitch-pulse-opponent,
.opponent-mini-pitch.pitch-pulse-opponent {
  animation: pitchPulseOpponent 0.55s ease-out;
}

.pitch-preview.goal-flash-top {
  animation: goalFlashTop 0.72s ease-out;
}

.pitch-preview.goal-flash-bottom {
  animation: goalFlashBottom 0.72s ease-out;
}

.pitch-preview.shot-flash {
  animation: shotFlash 0.5s ease-out;
}

.pitch-position.node-player-pulse,
.opponent-mini-node.node-player-pulse {
  animation: nodePlayerPulse 0.7s ease-out;
  z-index: 4;
}

.pitch-position.ambient-passer {
  animation: ambientPasser 0.54s ease-out;
  z-index: 4;
}

.pitch-position.ambient-receiver {
  animation: ambientReceiver 0.56s ease-out;
  z-index: 4;
}

.pitch-position.ambient-support-move {
  animation: ambientSupportMove 0.56s ease-out;
  z-index: 3;
}

.pitch-position.ambient-defense-shift {
  animation: ambientDefenseShift 0.56s ease-out;
  z-index: 3;
}

.pitch-position.ambient-turnover-passer {
  animation: ambientTurnoverPasser 0.62s ease-out;
  z-index: 4;
  filter: brightness(1.1);
}

.pitch-position.ambient-interceptor {
  animation: ambientInterceptor 0.72s ease-out;
  z-index: 5;
  filter: saturate(1.2);
}

.pitch-position.live-defender-tracking {
  animation: liveDefenderTracking 0.68s ease-out;
  z-index: 4;
  filter: saturate(1.08) brightness(1.05);
}

.pitch-position.live-defender-intercept {
  animation: liveDefenderIntercept 0.78s ease-out;
  z-index: 6;
  filter: saturate(1.24) brightness(1.14);
}

.pitch-position.live-run-under-pressure {
  animation: liveRunUnderPressure 0.76s ease-out;
  z-index: 4;
}

.pitch-position.live-wing-runner,
.pitch-position.live-overlap-run {
  animation: liveWingRunner 0.78s ease-out;
  z-index: 5;
  filter: saturate(1.18) brightness(1.08);
}

.pitch-position.live-box-arrival {
  animation: liveBoxArrival 0.82s ease-out;
  z-index: 4;
  filter: brightness(1.1);
}

.pitch-position.live-defender-covering {
  animation: liveDefenderCovering 0.82s ease-out;
  z-index: 4;
  filter: saturate(0.96) brightness(1.04);
}

.pitch-position.live-box-scramble {
  animation: liveBoxScramble 0.78s ease-out;
  z-index: 5;
  filter: brightness(1.1);
}

.pitch-position.live-second-ball-attacker {
  animation: liveSecondBallAttacker 0.82s ease-out;
  z-index: 6;
  filter: saturate(1.18) brightness(1.12);
}

.pitch-position.live-defender-clear {
  animation: liveDefenderClear 0.82s ease-out;
  z-index: 6;
  filter: saturate(1.08) brightness(1.08);
}

.pitch-position.live-goalkeeper-claim {
  animation: liveGoalkeeperClaim 0.86s ease-out;
  z-index: 6;
  filter: saturate(1.16) brightness(1.12);
}

.pitch-position.live-loose-ball {
  animation: liveLooseBallNode 0.82s ease-out;
  z-index: 5;
}

.pitch-position.live-presser {
  animation: livePresser 0.68s ease-out;
  z-index: 5;
  filter: saturate(1.14) brightness(1.08);
}

.pitch-position.live-press-target {
  animation: livePressTarget 0.68s ease-out;
  z-index: 5;
  filter: brightness(1.05);
}

.pitch-position.live-pressure-escape {
  animation: livePressureEscape 0.78s ease-out;
  z-index: 6;
  filter: saturate(1.12) brightness(1.1);
}

.pitch-position.live-press-win {
  animation: livePressWin 0.78s ease-out;
  z-index: 6;
  filter: saturate(1.22) brightness(1.16);
}

.pitch-position.live-loose-ball-battle {
  animation: liveLooseBallBattle 0.78s ease-out;
  z-index: 6;
}

.pitch-position.ambient-player-carry {
  animation: ambientPlayerCarry var(--ambient-carry-duration, 0.35s) ease-out;
  z-index: 4;
}

.pitch-position.ambient-carry-mid {
  animation-name: ambientCarryMid;
}

.pitch-position.ambient-carry-forward {
  animation-name: ambientCarryForward;
}

.pitch-preview.ambient-ball-pass .match-ball {
  transition:
    left 0.56s ease-in-out,
    top 0.56s ease-in-out;
  box-shadow:
    0 0 0 3px rgba(255, 248, 221, 0.22),
    0 0 16px rgba(255, 248, 221, 0.45);
}

.pitch-preview.ambient-safe-pass .match-ball {
  transition:
    left 0.76s cubic-bezier(0.28, 0.74, 0.19, 1),
    top 0.76s cubic-bezier(0.28, 0.74, 0.19, 1);
}

.pitch-preview.ambient-aggressive-pass .match-ball {
  transition:
    left 0.42s cubic-bezier(0.16, 0.8, 0.3, 1),
    top 0.42s cubic-bezier(0.16, 0.8, 0.3, 1);
  box-shadow:
    0 0 0 3px rgba(255, 248, 221, 0.35),
    0 0 20px rgba(255, 248, 221, 0.55);
}

.pitch-preview.ambient-long-pass .match-ball {
  transition:
    left 0.75s cubic-bezier(0.33, 0.9, 0.45, 1),
    top 0.75s cubic-bezier(0.33, 0.9, 0.45, 1);
  box-shadow:
    0 0 0 3px rgba(255, 248, 221, 0.22),
    0 0 20px rgba(255, 248, 221, 0.52);
}

.pitch-preview.ambient-ball-carry .match-ball {
  transition:
    left 0.32s cubic-bezier(0.25, 0.72, 0.32, 1),
    top 0.32s cubic-bezier(0.25, 0.72, 0.32, 1);
}

.pitch-preview.ambient-ball-intercepted .match-ball {
  box-shadow:
    0 0 0 3px rgba(251, 222, 137, 0.5),
    0 0 18px rgba(211, 52, 25, 0.65);
}

.pitch-preview.live-cross-ball .match-ball {
  transition:
    left 0.5s cubic-bezier(0.18, 0.78, 0.28, 1),
    top 0.5s cubic-bezier(0.18, 0.78, 0.28, 1);
  box-shadow:
    0 0 0 3px rgba(255, 248, 221, 0.38),
    0 0 18px rgba(185, 217, 143, 0.6);
}

.pitch-preview.live-box-scramble .match-ball,
.pitch-preview.live-loose-ball .match-ball,
.pitch-preview.live-loose-ball-battle .match-ball {
  transition:
    left 0.28s cubic-bezier(0.2, 0.82, 0.26, 1),
    top 0.28s cubic-bezier(0.2, 0.82, 0.26, 1);
  box-shadow:
    0 0 0 4px rgba(255, 238, 180, 0.42),
    0 0 20px rgba(211, 52, 25, 0.42);
}

.ambient-floating-turnover {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 44%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 42, 31, 0.84);
  border: 1px solid rgba(255, 224, 170, 0.45);
  box-shadow:
    0 6px 15px rgba(6, 14, 12, 0.3),
    0 0 0 2px rgba(251, 222, 137, 0.18);
  pointer-events: none;
  animation: ambientTurnoverText 0.78s ease-out forwards;
}

.ambient-floating-intercept {
  position: absolute;
  z-index: 10;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #1b241d;
  background: rgba(255, 238, 180, 0.94);
  border: 1px solid rgba(97, 45, 33, 0.28);
  box-shadow:
    0 8px 18px rgba(6, 14, 12, 0.28),
    0 0 0 2px rgba(255, 255, 255, 0.18);
  pointer-events: none;
  animation: ambientInterceptText 0.82s ease-out forwards;
}

.floating-cross-label {
  position: absolute;
  z-index: 10;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #143123;
  background: rgba(223, 247, 181, 0.95);
  border: 1px solid rgba(26, 95, 65, 0.28);
  box-shadow:
    0 8px 18px rgba(6, 14, 12, 0.26),
    0 0 0 2px rgba(255, 255, 255, 0.18);
  pointer-events: none;
  animation: floatingCrossLabel 0.84s ease-out forwards;
}

.floating-scramble-label {
  position: absolute;
  z-index: 11;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  color: #241c12;
  background: rgba(255, 238, 180, 0.96);
  border: 1px solid rgba(111, 63, 35, 0.32);
  box-shadow:
    0 8px 18px rgba(6, 14, 12, 0.28),
    0 0 0 2px rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: floatingScrambleLabel 0.86s ease-out forwards;
}

.floating-press-label {
  position: absolute;
  z-index: 11;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  color: #143123;
  background: rgba(223, 247, 181, 0.96);
  border: 1px solid rgba(26, 95, 65, 0.3);
  box-shadow:
    0 8px 18px rgba(6, 14, 12, 0.28),
    0 0 0 2px rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: floatingPressLabel 0.82s ease-out forwards;
}

.pitch-preview.ambient-build-up {
  box-shadow:
    0 0 0 0 rgba(248, 244, 203, 0),
    0 0 0 0 rgba(255, 255, 255, 0.35),
    inset 0 0 0 3px rgba(248, 244, 203, 0.12);
  animation: ambientBuildUpPulse 0.76s ease-out;
}

.pitch-preview.ambient-build-up-attack {
  animation: ambientBuildUpAttack 0.76s ease-out;
}

.pitch-preview.ambient-build-up-defense {
  animation: ambientBuildUpDefense 0.76s ease-out;
}

.pitch-preview.ambient-build-up-danger {
  animation: ambientBuildUpDanger 0.76s ease-out;
}

.pitch-preview.ambient-build-up-set-piece {
  animation: ambientBuildUpSetPiece 0.78s ease-out;
}

.pitch-position.ambient-build-up-attack {
  animation: ambientBuildUpNodeAttack 0.7s ease-out;
}

.pitch-position.ambient-build-up-defense {
  animation: ambientBuildUpNodeDefense 0.7s ease-out;
}

.pitch-position.ambient-build-up-danger {
  animation: ambientBuildUpNodeDanger 0.75s ease-out;
}

.pitch-position.ambient-build-up-set-piece {
  animation: ambientBuildUpNodeSetPiece 0.75s ease-out;
}

.pitch-position.scene-normal-attack {
  animation: sceneNormalAttack 0.72s ease-out;
  z-index: 4;
}

.pitch-position.scene-counter-push {
  animation: sceneCounterPush 0.78s ease-out;
  z-index: 4;
}

.pitch-position.scene-counter-runner {
  animation: sceneCounterRunner 0.86s ease-out;
  z-index: 5;
}

.pitch-position.scene-counter-shooter {
  animation: sceneCounterShooter 0.9s ease-out;
  z-index: 6;
}

.pitch-position.scene-counter-team-push {
  animation: sceneCounterTeamPush 0.82s ease-out;
  z-index: 4;
}

.pitch-position.scene-counter-defense-collapse {
  animation: sceneCounterDefenseCollapse 0.86s ease-out;
  z-index: 4;
}

.pitch-position[data-team="opponent"].scene-counter-runner {
  animation-name: sceneCounterRunnerOpponent;
}

.pitch-position[data-team="opponent"].scene-counter-shooter {
  animation-name: sceneCounterShooterOpponent;
}

.pitch-position[data-team="opponent"].scene-counter-team-push {
  animation-name: sceneCounterTeamPushOpponent;
}

.pitch-position[data-team="user"].scene-counter-defense-collapse {
  animation-name: sceneCounterDefenseCollapseUser;
}

.pitch-position.scene-defense-compress {
  animation: sceneDefenseCompress 0.78s ease-out;
  z-index: 4;
}

.pitch-position.scene-corner-box-pulse {
  animation: sceneCornerBoxPulse 0.82s ease-out;
  z-index: 4;
}

.pitch-position.scene-corner-taker {
  animation: sceneCornerTaker 0.78s ease-out;
  z-index: 5;
}

.pitch-position.scene-corner-target {
  animation: sceneCornerTarget 0.88s ease-out;
  z-index: 6;
}

.pitch-position.scene-corner-box-crowd {
  animation: sceneCornerBoxCrowd 0.86s ease-out;
  z-index: 4;
}

.pitch-position.scene-corner-defense-box {
  animation: sceneCornerDefenseBox 0.86s ease-out;
  z-index: 4;
}

.pitch-position.scene-corner-goalkeeper {
  animation: sceneCornerGoalkeeper 0.9s ease-out;
  z-index: 6;
}

.pitch-position.scene-free-kick-shooter {
  animation: sceneFreeKickShooter 0.82s ease-out;
  z-index: 4;
}

.pitch-position.scene-free-kick-taker {
  animation: sceneFreeKickTaker 0.9s ease-out;
  z-index: 6;
}

.pitch-position.scene-free-kick-wall {
  animation: sceneFreeKickWall 0.86s ease-out;
  z-index: 4;
}

.pitch-position.scene-free-kick-goalkeeper {
  animation: sceneFreeKickGoalkeeper 0.9s ease-out;
  z-index: 6;
}

.pitch-position.scene-offside-line {
  animation: sceneOffsideLine 0.76s ease-out;
  z-index: 4;
}

.pitch-position.scene-save-goalkeeper {
  animation: sceneSaveGoalkeeper 0.82s ease-out;
  z-index: 5;
}

.pitch-position.scene-save-shot {
  animation: sceneSaveShot 0.78s ease-out;
  z-index: 5;
}

.pitch-position.scene-missed-shooter {
  animation: sceneMissedShooter 0.82s ease-out;
  z-index: 5;
}

.pitch-position.scene-missed-post,
.pitch-position.scene-missed-crossbar {
  animation: sceneMissedFrame 0.82s ease-out;
  z-index: 5;
}

.pitch-position.scene-missed-block {
  animation: sceneMissedBlock 0.78s ease-out;
  z-index: 6;
}

.pitch-position.scene-penalty-taker {
  animation: scenePenaltyTaker 0.92s ease-out;
  z-index: 6;
}

.pitch-position.scene-penalty-goalkeeper {
  animation: scenePenaltyGoalkeeper 0.92s ease-out;
  z-index: 6;
}

.pitch-position.scene-goal-celebration {
  animation: sceneGoalCelebration 0.9s ease-out;
  z-index: 5;
}

.pitch-preview.goal-frame-flash {
  animation: goalFrameFlash 0.78s ease-out;
}

.pitch-preview.ball-deflect .match-ball {
  animation: ballDeflect 0.54s ease-out;
}

.pitch-preview.scene-penalty-ball .match-ball {
  transition:
    left 0.98s cubic-bezier(0.18, 0.72, 0.18, 1),
    top 0.98s cubic-bezier(0.18, 0.72, 0.18, 1);
}

.pitch-preview:has(.scene-counter-push) .match-ball {
  transition:
    left 0.72s ease-out,
    top 0.72s ease-out;
}

.pitch-preview.scene-ball-fast .match-ball,
.pitch-preview:has(.scene-counter-runner) .match-ball,
.pitch-preview:has(.scene-counter-shooter) .match-ball,
.pitch-preview:has(.scene-counter-team-push) .match-ball {
  transition:
    left 0.34s cubic-bezier(0.18, 0.78, 0.24, 1),
    top 0.34s cubic-bezier(0.18, 0.78, 0.24, 1);
}

.pitch-preview:has(.scene-free-kick-shooter) .match-ball,
.pitch-preview:has(.scene-free-kick-taker) .match-ball,
.pitch-preview.scene-free-kick-shot .match-ball,
.pitch-preview:has(.scene-corner-box-pulse) .match-ball,
.pitch-preview:has(.scene-corner-taker) .match-ball,
.pitch-preview:has(.scene-corner-target) .match-ball {
  transition:
    left 1.05s cubic-bezier(0.2, 0.72, 0.2, 1),
    top 1.05s cubic-bezier(0.2, 0.72, 0.2, 1);
}

.pitch-preview:has(.scene-save-shot) .match-ball,
.pitch-preview:has(.scene-save-goalkeeper) .match-ball,
.pitch-preview:has(.scene-missed-shooter) .match-ball,
.pitch-preview.goal-frame-flash .match-ball,
.pitch-preview.ball-deflect .match-ball {
  transition:
    left 0.86s cubic-bezier(0.22, 0.74, 0.22, 1),
    top 0.86s cubic-bezier(0.22, 0.74, 0.22, 1);
}

.scene-floating-label {
  position: absolute;
  z-index: 9;
  min-width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(255, 248, 221, 0.82);
  border-radius: 999px;
  background: rgba(22, 47, 32, 0.9);
  color: #fff8dd;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: sceneFloatingLabel 1.02s ease-out forwards;
}

.scene-floating-save {
  background: rgba(20, 75, 58, 0.92);
}

.scene-floating-frame {
  background: rgba(116, 72, 23, 0.94);
}

.scene-floating-missed {
  background: rgba(113, 49, 39, 0.92);
}

.penalty-shootout-panel {
  display: grid;
  gap: 5px;
  margin: 6px 0;
  padding: 7px;
  border: 1px solid #8e5d54;
  border-radius: 8px;
  background: #f2e3cf;
  color: #2e2118;
}

.penalty-shootout-panel.is-active {
  border-color: #b7111d;
  box-shadow: 0 0 0 2px rgba(183, 17, 29, 0.14);
}

.penalty-shootout-header,
.penalty-shootout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.penalty-shootout-header strong {
  color: #6f1620;
  font-size: 0.78rem;
}

.penalty-shootout-header span,
.penalty-shootout-row span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
}

.penalty-shootout-row {
  grid-template-columns: minmax(0, 1fr) auto 24px;
}

.penalty-shootout-row span:nth-child(2) {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.penalty-kick-made,
.penalty-kick-missed,
.penalty-kick-pending {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
}

.penalty-kick-made {
  background: #1f6f33;
  color: #f5fff1;
}

.penalty-kick-missed {
  background: #b7111d;
  color: #fff7ef;
}

.penalty-kick-pending {
  border: 1px dashed #8d8a78;
  background: #efe6c8;
  color: #6d6756;
}

@keyframes scorePulse {
  0% {
    transform: scale(1);
    color: #13271b;
  }
  45% {
    transform: scale(1.04);
    color: #1f6f33;
  }
  100% {
    transform: scale(1);
    color: #13271b;
  }
}

@keyframes atmosphereGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  45% {
    filter: brightness(1.08);
    box-shadow:
      0 0 0 3px rgba(31, 111, 51, 0.16),
      0 0 16px rgba(31, 111, 51, 0.18);
  }
}

@keyframes atmosphereGoalFlash {
  0%,
  100% {
    filter: brightness(1);
  }
  42% {
    filter: brightness(1.14);
    box-shadow:
      0 0 0 4px rgba(247, 222, 121, 0.32),
      0 0 20px rgba(183, 17, 29, 0.22);
  }
}

@keyframes atmosphereTense {
  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  35% {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow:
      0 0 0 3px rgba(183, 17, 29, 0.18),
      0 0 18px rgba(111, 34, 48, 0.22);
  }
}

@keyframes nodePlayerPulse {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.16);
    filter: brightness(1.22);
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.46),
      0 0 16px rgba(225, 244, 147, 0.8);
  }
}

@keyframes ambientPasser {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-52% + var(--ambient-shift-y, 0px))) scale(1.07);
    filter: brightness(1.12);
    box-shadow:
      0 0 0 3px rgba(255, 248, 221, 0.32),
      0 0 12px rgba(255, 248, 221, 0.34);
  }
}

@keyframes ambientReceiver {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  55% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-48% + var(--ambient-shift-y, 0px))) scale(1.08);
    filter: brightness(1.14);
    box-shadow:
      0 0 0 3px rgba(194, 221, 132, 0.38),
      0 0 14px rgba(194, 221, 132, 0.42);
  }
}

@keyframes ambientSupportMove {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-53% + var(--ambient-shift-y, 0px))) scale(1.03);
    filter: brightness(1.06);
  }
}

@keyframes ambientDefenseShift {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-48% + var(--ambient-shift-y, 0px))) scale(0.97);
    filter: saturate(0.9) brightness(0.97);
  }
}

@keyframes ambientPlayerCarry {
  0%,
  100% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px) + var(--ambient-carry-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px) + var(--ambient-carry-y, 0px))
    ) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px) + var(--ambient-carry-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px) + var(--ambient-carry-y, 0px))
    ) scale(1.04);
    filter: brightness(1.16);
  }
}

@keyframes ambientCarryMid {
  0%,
  100% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px) + var(--ambient-carry-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px) + var(--ambient-carry-y, 0px))
    ) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px) + var(--ambient-carry-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px) + var(--ambient-carry-y, 0px))
    ) scale(1.05);
  }
}

@keyframes ambientCarryForward {
  0%,
  100% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px) + var(--ambient-carry-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px) + var(--ambient-carry-y, 0px))
    ) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px) + var(--ambient-carry-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px) + var(--ambient-carry-y, 0px))
    ) scale(1.07);
    filter: brightness(1.08);
  }
}

@keyframes ambientTurnoverPasser {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: saturate(1.05) brightness(1.05);
  }
  45% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.08);
    filter: saturate(1.25) brightness(1.2);
    box-shadow: 0 0 0 3px rgba(251, 222, 137, 0.48), 0 0 12px rgba(211, 52, 25, 0.35);
  }
}

@keyframes ambientInterceptor {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-48% + var(--ambient-shift-y, 0px))) scale(1.1);
    filter: brightness(1.18);
    box-shadow: 0 0 0 4px rgba(255, 229, 204, 0.5), 0 0 14px rgba(211, 52, 25, 0.52);
  }
}

@keyframes liveDefenderTracking {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: saturate(1) brightness(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.06);
    filter: saturate(1.2) brightness(1.1);
    box-shadow:
      0 0 0 3px rgba(255, 238, 180, 0.35),
      0 0 14px rgba(83, 134, 118, 0.45);
  }
}

@keyframes liveDefenderIntercept {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: saturate(1.04) brightness(1.03);
  }
  42% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-49% + var(--ambient-shift-y, 0px))) scale(1.18);
    filter: saturate(1.35) brightness(1.24);
    box-shadow:
      0 0 0 5px rgba(255, 238, 180, 0.62),
      0 0 20px rgba(211, 52, 25, 0.58);
  }
}

@keyframes liveRunUnderPressure {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-51% + var(--ambient-shift-y, 0px))) scale(1.07);
    filter: brightness(1.13);
    box-shadow:
      0 0 0 3px rgba(255, 248, 221, 0.26),
      0 0 12px rgba(108, 176, 151, 0.34);
  }
}

@keyframes liveWingRunner {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-52% + var(--ambient-shift-y, 0px))) scale(1.12);
    filter: saturate(1.25) brightness(1.16);
    box-shadow:
      0 0 0 4px rgba(223, 247, 181, 0.42),
      0 0 16px rgba(40, 122, 83, 0.42);
  }
}

@keyframes liveBoxArrival {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-51% + var(--ambient-shift-y, 0px))) scale(1.08);
    filter: brightness(1.14);
    box-shadow:
      0 0 0 3px rgba(255, 248, 221, 0.28),
      0 0 12px rgba(223, 247, 181, 0.38);
  }
}

@keyframes liveDefenderCovering {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-49% + var(--ambient-shift-y, 0px))) scale(1.06);
    filter: saturate(1.08) brightness(1.08);
    box-shadow:
      0 0 0 3px rgba(255, 238, 180, 0.34),
      0 0 14px rgba(91, 44, 38, 0.34);
  }
}

@keyframes liveBoxScramble {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-49% + var(--ambient-shift-y, 0px))) scale(1.1);
    filter: brightness(1.16);
    box-shadow:
      0 0 0 4px rgba(255, 238, 180, 0.36),
      0 0 15px rgba(211, 52, 25, 0.34);
  }
}

@keyframes liveSecondBallAttacker {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-51% + var(--ambient-shift-y, 0px))) scale(1.14);
    filter: saturate(1.26) brightness(1.18);
    box-shadow:
      0 0 0 4px rgba(223, 247, 181, 0.48),
      0 0 16px rgba(40, 122, 83, 0.5);
  }
}

@keyframes liveDefenderClear {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-48% + var(--ambient-shift-y, 0px))) scale(1.12);
    filter: saturate(1.16) brightness(1.14);
    box-shadow:
      0 0 0 4px rgba(255, 238, 180, 0.42),
      0 0 16px rgba(91, 44, 38, 0.42);
  }
}

@keyframes liveGoalkeeperClaim {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  46% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.18);
    filter: saturate(1.22) brightness(1.18);
    box-shadow:
      0 0 0 5px rgba(255, 248, 221, 0.5),
      0 0 18px rgba(29, 95, 56, 0.5);
  }
}

@keyframes liveLooseBallNode {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
  }
  50% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.08);
    box-shadow:
      0 0 0 3px rgba(255, 238, 180, 0.34),
      0 0 14px rgba(255, 248, 221, 0.36);
  }
}

@keyframes livePresser {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
    filter: brightness(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.1);
    filter: saturate(1.22) brightness(1.14);
    box-shadow:
      0 0 0 4px rgba(223, 247, 181, 0.42),
      0 0 16px rgba(40, 122, 83, 0.44);
  }
}

@keyframes livePressTarget {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-49% + var(--ambient-shift-y, 0px))) scale(1.05);
    box-shadow:
      0 0 0 3px rgba(255, 238, 180, 0.3),
      0 0 13px rgba(111, 63, 35, 0.3);
  }
}

@keyframes livePressureEscape {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
  }
  48% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-52% + var(--ambient-shift-y, 0px))) scale(1.12);
    box-shadow:
      0 0 0 4px rgba(255, 248, 221, 0.42),
      0 0 16px rgba(185, 217, 143, 0.42);
  }
}

@keyframes livePressWin {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
  }
  46% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.16);
    box-shadow:
      0 0 0 5px rgba(223, 247, 181, 0.5),
      0 0 18px rgba(40, 122, 83, 0.52);
  }
}

@keyframes liveLooseBallBattle {
  0%,
  100% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1);
  }
  50% {
    transform: translate(calc(-50% + var(--ambient-shift-x, 0px)), calc(-50% + var(--ambient-shift-y, 0px))) scale(1.09);
    box-shadow:
      0 0 0 4px rgba(255, 238, 180, 0.38),
      0 0 16px rgba(255, 248, 221, 0.42);
  }
}

@keyframes ambientTurnoverText {
  0% {
    opacity: 0;
    transform: translate(-50%, -3px);
  }
  20%,
  70% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
}

@keyframes ambientInterceptText {
  0% {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 7px);
  }
}

@keyframes floatingCrossLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 7px);
  }
}

@keyframes floatingScrambleLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 7px);
  }
}

@keyframes floatingPressLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 7px);
  }
}

@keyframes ambientBuildUpPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(248, 244, 203, 0),
      0 0 0 0 rgba(255, 255, 255, 0.15),
      inset 0 0 0 3px rgba(248, 244, 203, 0.12);
  }
  45% {
    box-shadow:
      0 0 0 8px rgba(248, 244, 203, 0.06),
      0 0 16px 4px rgba(255, 255, 255, 0.28),
      inset 0 0 0 4px rgba(248, 244, 203, 0.22);
  }
}

@keyframes ambientBuildUpAttack {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(183, 237, 132, 0),
      0 0 0 0 rgba(31, 111, 51, 0.4);
    filter: brightness(1);
  }
  45% {
    box-shadow:
      0 0 0 10px rgba(183, 237, 132, 0),
      0 0 18px 4px rgba(31, 111, 51, 0.35);
    filter: brightness(1.14);
  }
}

@keyframes ambientBuildUpDefense {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(255, 248, 221, 0),
      0 0 0 0 rgba(183, 17, 29, 0.38);
    filter: brightness(1);
  }
  45% {
    box-shadow:
      0 0 0 9px rgba(255, 248, 221, 0),
      0 0 18px 4px rgba(183, 17, 29, 0.26);
    filter: brightness(1.08);
  }
}

@keyframes ambientBuildUpDanger {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(248, 244, 203, 0),
      0 0 0 0 rgba(183, 17, 29, 0.16);
    filter: brightness(1);
  }
  45% {
    box-shadow:
      0 0 0 10px rgba(248, 244, 203, 0),
      0 0 18px 5px rgba(183, 17, 29, 0.22);
    filter: brightness(1.15);
  }
}

@keyframes ambientBuildUpSetPiece {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0),
      0 0 0 0 rgba(255, 211, 133, 0.22),
      inset 0 0 0 2px rgba(255, 211, 133, 0.08);
  }
  45% {
    box-shadow:
      0 0 0 9px rgba(255, 255, 255, 0),
      0 0 16px 4px rgba(255, 211, 133, 0.3),
      inset 0 0 0 4px rgba(255, 211, 133, 0.22);
  }
}

@keyframes ambientBuildUpNodeAttack {
  0%,
  100% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px))
    ) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-54% + var(--ambient-shift-y, 0px))
    ) scale(1.07);
    filter: brightness(1.1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.32);
  }
}

@keyframes ambientBuildUpNodeDefense {
  0%,
  100% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px))
    ) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-47% + var(--ambient-shift-y, 0px))
    ) scale(0.98);
    filter: saturate(0.96);
    box-shadow: 0 0 0 3px rgba(255, 222, 189, 0.24);
  }
}

@keyframes ambientBuildUpNodeDanger {
  0%,
  100% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px))
    ) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-55% + var(--ambient-shift-y, 0px))
    ) scale(1.08);
    filter: brightness(1.16);
    box-shadow:
      0 0 0 3px rgba(251, 222, 137, 0.5),
      0 0 12px rgba(183, 17, 29, 0.42);
  }
}

@keyframes ambientBuildUpNodeSetPiece {
  0%,
  100% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px))
    ) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(
      calc(-50% + var(--ambient-shift-x, 0px)),
      calc(-50% + var(--ambient-shift-y, 0px))
    ) scale(1.05);
    filter: brightness(1.15);
    box-shadow: 0 0 0 3px rgba(255, 248, 221, 0.34);
  }
}


@keyframes sceneNormalAttack {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -53%) scale(1.08);
    filter: brightness(1.16);
  }
}

@keyframes sceneCounterPush {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(-50%, -58%) scale(1.13);
    filter: brightness(1.24);
    box-shadow:
      0 0 0 4px rgba(245, 237, 159, 0.48),
      0 0 18px rgba(31, 111, 51, 0.55);
  }
}

@keyframes sceneCounterRunner {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  42% {
    transform: translate(-50%, -62%) scale(1.16);
    filter: brightness(1.28);
    box-shadow:
      0 0 0 4px rgba(223, 244, 176, 0.58),
      0 0 18px rgba(31, 111, 51, 0.72);
  }
}

@keyframes sceneCounterRunnerOpponent {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  42% {
    transform: translate(-50%, -38%) scale(1.16);
    filter: brightness(1.28);
    box-shadow:
      0 0 0 4px rgba(223, 244, 176, 0.58),
      0 0 18px rgba(91, 44, 38, 0.7);
  }
}

@keyframes sceneCounterShooter {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -58%) scale(1.22);
    filter: brightness(1.32);
    box-shadow:
      0 0 0 5px rgba(250, 238, 154, 0.7),
      0 0 24px rgba(114, 74, 20, 0.62);
  }
}

@keyframes sceneCounterShooterOpponent {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -42%) scale(1.22);
    filter: brightness(1.32);
    box-shadow:
      0 0 0 5px rgba(250, 238, 154, 0.7),
      0 0 24px rgba(114, 74, 20, 0.62);
  }
}

@keyframes sceneCounterTeamPush {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -56%) scale(1.08);
    filter: brightness(1.16);
  }
}

@keyframes sceneCounterTeamPushOpponent {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -44%) scale(1.08);
    filter: brightness(1.16);
  }
}

@keyframes sceneCounterDefenseCollapse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -43%) scale(0.92);
    filter: saturate(0.75) brightness(0.92);
    box-shadow:
      0 0 0 3px rgba(130, 57, 47, 0.26),
      0 0 12px rgba(91, 44, 38, 0.28);
  }
}

@keyframes sceneCounterDefenseCollapseUser {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -57%) scale(0.92);
    filter: saturate(0.75) brightness(0.92);
    box-shadow:
      0 0 0 3px rgba(130, 57, 47, 0.26),
      0 0 12px rgba(91, 44, 38, 0.28);
  }
}

@keyframes sceneDefenseCompress {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -46%) scale(0.94);
    filter: saturate(0.86);
  }
}

@keyframes sceneCornerBoxPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.14);
    filter: brightness(1.2);
    box-shadow:
      0 0 0 4px rgba(249, 226, 145, 0.54),
      0 0 16px rgba(135, 103, 36, 0.42);
  }
}

@keyframes sceneCornerTaker {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.12) rotate(-4deg);
    filter: brightness(1.16);
    box-shadow:
      0 0 0 4px rgba(243, 229, 186, 0.58),
      0 0 16px rgba(139, 109, 44, 0.46);
  }
}

@keyframes sceneCornerTarget {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  48% {
    transform: translate(-50%, -62%) scale(1.2);
    filter: brightness(1.25);
    box-shadow:
      0 0 0 5px rgba(250, 238, 154, 0.68),
      0 0 22px rgba(139, 109, 44, 0.58);
  }
}

.pitch-position[data-team="opponent"].scene-corner-target {
  animation-name: sceneCornerTargetOpponent;
}

@keyframes sceneCornerTargetOpponent {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  48% {
    transform: translate(-50%, -38%) scale(1.2);
    filter: brightness(1.25);
    box-shadow:
      0 0 0 5px rgba(250, 238, 154, 0.68),
      0 0 22px rgba(139, 109, 44, 0.58);
  }
}

@keyframes sceneCornerBoxCrowd {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -55%) scale(1.08);
    filter: brightness(1.12);
  }
}

.pitch-position[data-team="opponent"].scene-corner-box-crowd {
  animation-name: sceneCornerBoxCrowdOpponent;
}

@keyframes sceneCornerBoxCrowdOpponent {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -45%) scale(1.08);
    filter: brightness(1.12);
  }
}

@keyframes sceneCornerDefenseBox {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -45%) scale(0.94);
    filter: saturate(0.82) brightness(0.94);
    box-shadow:
      0 0 0 3px rgba(91, 44, 38, 0.24),
      0 0 12px rgba(91, 44, 38, 0.22);
  }
}

.pitch-position[data-team="user"].scene-corner-defense-box {
  animation-name: sceneCornerDefenseBoxUser;
}

@keyframes sceneCornerDefenseBoxUser {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translate(-50%, -55%) scale(0.94);
    filter: saturate(0.82) brightness(0.94);
    box-shadow:
      0 0 0 3px rgba(91, 44, 38, 0.24),
      0 0 12px rgba(91, 44, 38, 0.22);
  }
}

@keyframes sceneCornerGoalkeeper {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow:
      0 0 0 5px rgba(233, 252, 230, 0.58),
      0 0 22px rgba(41, 86, 72, 0.62);
  }
}

@keyframes sceneFreeKickShooter {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  35% {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow:
      0 0 0 5px rgba(220, 235, 240, 0.64),
      0 0 20px rgba(49, 95, 127, 0.55);
  }
}

@keyframes sceneFreeKickTaker {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  38% {
    transform: translate(-50%, -50%) scale(1.2) rotate(-3deg);
    filter: brightness(1.25);
    box-shadow:
      0 0 0 5px rgba(220, 235, 240, 0.68),
      0 0 22px rgba(49, 95, 127, 0.58);
  }
}

@keyframes sceneFreeKickWall {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  42% {
    transform: translate(-50%, -47%) scale(0.96);
    filter: saturate(0.85) brightness(0.95);
    box-shadow:
      0 0 0 3px rgba(49, 95, 127, 0.22),
      0 0 12px rgba(49, 95, 127, 0.22);
  }
}

.pitch-position[data-team="user"].scene-free-kick-wall {
  animation-name: sceneFreeKickWallUser;
}

@keyframes sceneFreeKickWallUser {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  42% {
    transform: translate(-50%, -53%) scale(0.96);
    filter: saturate(0.85) brightness(0.95);
    box-shadow:
      0 0 0 3px rgba(49, 95, 127, 0.22),
      0 0 12px rgba(49, 95, 127, 0.22);
  }
}

@keyframes sceneFreeKickGoalkeeper {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  48% {
    transform: translate(-50%, -50%) scale(1.16);
    box-shadow:
      0 0 0 5px rgba(233, 252, 230, 0.55),
      0 0 20px rgba(41, 86, 72, 0.58);
  }
}

@keyframes sceneOffsideLine {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  48% {
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow:
      0 0 0 3px rgba(255, 245, 235, 0.5),
      0 0 0 7px rgba(130, 57, 47, 0.28);
  }
}

@keyframes sceneSaveGoalkeeper {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.22);
    box-shadow:
      0 0 0 5px rgba(233, 252, 230, 0.58),
      0 0 22px rgba(41, 86, 72, 0.68);
  }
}

@keyframes sceneSaveShot {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  42% {
    transform: translate(-50%, -50%) scale(1.14);
    filter: brightness(1.18);
    box-shadow:
      0 0 0 4px rgba(245, 237, 159, 0.5),
      0 0 16px rgba(49, 95, 127, 0.42);
  }
}

@keyframes sceneMissedShooter {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.16) rotate(-2deg);
    filter: brightness(1.18);
    box-shadow:
      0 0 0 4px rgba(245, 232, 200, 0.58),
      0 0 16px rgba(154, 122, 59, 0.45);
  }
}

@keyframes sceneMissedFrame {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  48% {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow:
      0 0 0 5px rgba(249, 225, 143, 0.7),
      0 0 24px rgba(154, 93, 35, 0.62);
  }
}

@keyframes sceneMissedBlock {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.18);
    filter: brightness(1.18);
    box-shadow:
      0 0 0 5px rgba(230, 237, 214, 0.62),
      0 0 22px rgba(55, 83, 63, 0.52);
  }
}

@keyframes scenePenaltyTaker {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  34% {
    transform: translate(-50%, -50%) scale(1.14) rotate(-3deg);
    filter: brightness(1.2);
    box-shadow:
      0 0 0 5px rgba(242, 212, 210, 0.68),
      0 0 22px rgba(183, 17, 29, 0.42);
  }
  62% {
    transform: translate(-50%, -54%) scale(1.08);
  }
}

@keyframes scenePenaltyGoalkeeper {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow:
      0 0 0 5px rgba(233, 252, 230, 0.58),
      0 0 22px rgba(41, 86, 72, 0.62);
  }
}

@keyframes sceneGoalCelebration {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  38% {
    transform: translate(-50%, -56%) scale(1.18);
    filter: brightness(1.28);
    box-shadow:
      0 0 0 5px rgba(244, 238, 141, 0.62),
      0 0 22px rgba(31, 111, 51, 0.64);
  }
}

@keyframes pitchPulseUser {
  0%,
  100% {
    box-shadow: inset 0 0 0 4px rgba(16, 37, 17, 0.45);
  }
  50% {
    box-shadow:
      inset 0 0 0 4px rgba(16, 37, 17, 0.45),
      0 0 0 5px rgba(31, 111, 51, 0.32);
  }
}

@keyframes pitchPulseOpponent {
  0%,
  100% {
    box-shadow: none;
  }
  50% {
    box-shadow: 0 0 0 5px rgba(130, 45, 35, 0.32);
  }
}

@keyframes goalFlashTop {
  0%,
  100% {
    box-shadow: inset 0 0 0 4px rgba(16, 37, 17, 0.45);
  }
  45% {
    box-shadow:
      inset 0 80px 34px rgba(238, 243, 154, 0.42),
      inset 0 0 0 4px rgba(16, 37, 17, 0.45),
      0 0 0 5px rgba(238, 243, 154, 0.28);
  }
}

@keyframes goalFlashBottom {
  0%,
  100% {
    box-shadow: inset 0 0 0 4px rgba(16, 37, 17, 0.45);
  }
  45% {
    box-shadow:
      inset 0 -80px 34px rgba(238, 243, 154, 0.42),
      inset 0 0 0 4px rgba(16, 37, 17, 0.45),
      0 0 0 5px rgba(238, 243, 154, 0.28);
  }
}

@keyframes shotFlash {
  0%,
  100% {
    filter: brightness(1);
  }
  45% {
    filter: brightness(1.16);
  }
}

@keyframes goalFrameFlash {
  0%,
  100% {
    box-shadow: inset 0 0 0 4px rgba(16, 37, 17, 0.45);
    filter: brightness(1);
  }
  42% {
    box-shadow:
      inset 0 0 0 4px rgba(16, 37, 17, 0.45),
      inset 0 0 0 10px rgba(250, 232, 139, 0.24),
      0 0 0 5px rgba(153, 105, 35, 0.24);
    filter: brightness(1.12);
  }
}

@keyframes ballDeflect {
  0%,
  100% {
    filter: brightness(1);
  }
  42% {
    filter: brightness(1.25);
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.36),
      0 0 0 5px rgba(255, 248, 221, 0.36);
  }
}

@keyframes sceneFloatingLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -95%) scale(1);
  }
}

@keyframes goalTargetPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  48% {
    transform: translate(-50%, -50%) scale(1.16);
    box-shadow:
      0 0 0 5px rgba(183, 17, 29, 0.32),
      0 0 22px rgba(183, 17, 29, 0.34);
  }
}

@keyframes goalFlash {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  45% {
    transform: scale(1.02);
    filter: brightness(1.12);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.tournament-flow-button {
  width: 100%;
}

#nextMatchButton {
  border-color: #365f8f;
  background: #dfe9f4;
  color: #19344f;
}

#newTournamentButton {
  border-color: #8f4a1f;
  background: #f2dec8;
  color: #573326;
}

.team-sheet-list {
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.team-sheet-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 38px;
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #d4c79d;
  border-radius: 7px;
  background: #fbf4df;
  color: #1f3427;
  font-size: 0.78rem;
  font-weight: 700;
}

.match-preview-summary .team-sheet-row,
.tournament-run-status .team-sheet-row,
#matchPreviewBenchList .team-sheet-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.match-preview-panel .team-sheet-row {
  min-height: 32px;
  padding: 7px 11px;
  gap: 12px;
  border-radius: 999px;
  background: rgba(251, 244, 223, 0.72);
  font-size: 0.78rem;
  line-height: 1;
}

.match-preview-summary .team-sheet-row {
  flex: 1 1 150px;
  max-width: 210px;
}

.tournament-run-status .team-sheet-row {
  flex: 0 1 auto;
  max-width: 260px;
}

.team-sheet-list .team-sheet-row:first-child {
  background: #e6dbc1;
  color: #31513a;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.team-sheet-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-sheet-row span:last-child {
  justify-self: end;
}

.match-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 0;
}

.match-preview-actions button {
  min-height: 28px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.formation-button-grid,
.play-style-grid,
.mode-button-grid {
  display: grid;
  gap: 6px;
}

.formation-button-grid {
  grid-template-columns: 1fr 1fr;
}

.play-style-grid {
  grid-template-columns: 1fr 1fr 1fr;
}

.mode-button-grid {
  grid-template-columns: 1fr 1fr;
}

.formation-choice-btn,
.mode-choice-btn {
  background: #f1ead5;
  color: #1f3329;
}

.formation-choice-btn.is-active,
.mode-choice-btn.is-active {
  background: #1f6f33;
  border-color: #2e8f47;
  color: #ebf8ea;
}

.pitch-layout {
  display: grid;
  grid-template-columns: clamp(70px, 5.8vw, 96px) minmax(0, 1fr) clamp(70px, 5.8vw, 96px);
  grid-template-rows: auto minmax(0, 1fr) 32px;
  grid-template-areas:
    "bench bench bench"
    "ad-left field ad-right"
    "bottom-ad bottom-ad bottom-ad";
  gap: clamp(6px, 0.7vw, 10px);
  align-items: center;
  overflow: hidden;
}

.pitch-shell {
  grid-area: field;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.board-pitch-area.is-match-mode {
  gap: 8px;
}

.board-pitch-area.is-match-mode .pitch-layout {
  grid-template-columns: clamp(70px, 5.8vw, 96px) minmax(0, 1fr) clamp(70px, 5.8vw, 96px);
}

.board-pitch-area.is-match-mode .bench-area {
  display: flex;
}

.board-pitch-area.is-match-mode .pitch-preview {
  min-height: 360px;
  aspect-ratio: 16 / 9;
  max-height: min(62vh, 520px);
}

.board-pitch-area.is-match-mode .pitch-position {
  width: 48px;
  height: 48px;
  min-height: 48px;
  font-size: 10px;
  cursor: default;
}

.board-pitch-area.is-match-mode .slot-player-line {
  font-size: 9px;
}

.board-pitch-area.is-match-mode .slot-label-line,
.board-pitch-area.is-match-mode .slot-rating-line {
  font-size: 9px;
}

.pitch-preview[data-visual-mode="text_arrow"] {
  overflow: hidden;
}

.pitch-preview[data-visual-mode="text_arrow"]::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1px;
  height: 88%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.pitch-preview[data-visual-mode="text_arrow"] .match-player-node {
  transition:
    left 0.28s ease,
    top 0.28s ease,
    transform 0.18s ease;
}

.pitch-event-overlay {
  position: absolute;
  z-index: 14;
  inset: 10% 7%;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px 24px;
  color: #fff8dc;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  animation: pitchEventOverlayIn 0.18s ease-out forwards;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 248, 221, 0.22);
}

.pitch-event-overlay.is-fading {
  animation: pitchEventOverlayOut 0.26s ease-in forwards;
}

.pitch-event-overlay.is-user-attack {
  text-align: left;
  justify-items: start;
  background: linear-gradient(90deg, rgba(22, 78, 46, 0.84), rgba(22, 78, 46, 0.22), rgba(22, 78, 46, 0));
}

.pitch-event-overlay.is-opponent-attack {
  text-align: right;
  justify-items: end;
  background: linear-gradient(270deg, rgba(91, 44, 38, 0.86), rgba(91, 44, 38, 0.22), rgba(91, 44, 38, 0));
}

.pitch-event-overlay.is-goal {
  inset: 7% 5%;
  background:
    radial-gradient(circle at center, rgba(255, 238, 180, 0.18), rgba(255, 238, 180, 0) 58%),
    linear-gradient(90deg, rgba(24, 90, 48, 0.86), rgba(91, 44, 38, 0.52));
}

.pitch-event-overlay.is-foul,
.pitch-event-overlay.is-confrontation {
  background:
    radial-gradient(circle at center, rgba(255, 222, 130, 0.18), rgba(255, 222, 130, 0) 58%),
    linear-gradient(90deg, rgba(104, 73, 22, 0.9), rgba(70, 43, 20, 0.42), rgba(70, 43, 20, 0));
}

.pitch-event-overlay.is-yellow-card {
  color: #fff7c8;
  background:
    radial-gradient(circle at center, rgba(255, 220, 55, 0.26), rgba(255, 220, 55, 0) 60%),
    linear-gradient(90deg, rgba(128, 94, 5, 0.92), rgba(128, 94, 5, 0.34), rgba(128, 94, 5, 0));
}

.pitch-event-overlay.is-red-card,
.pitch-event-overlay.red-card-overlay {
  inset: 5% 4%;
  color: #fff4f3;
  background:
    radial-gradient(circle at center, rgba(255, 46, 58, 0.24), rgba(255, 46, 58, 0) 58%),
    linear-gradient(90deg, rgba(151, 9, 19, 0.96), rgba(90, 8, 14, 0.62), rgba(90, 8, 14, 0.08));
  box-shadow: inset 0 0 0 3px rgba(255, 238, 235, 0.36);
}

.pitch-event-overlay.is-red-card .pitch-event-overlay-action {
  font-size: clamp(34px, 7vw, 78px);
}

.pitch-event-overlay.is-var-check {
  inset: 6% 5%;
  color: #f5fbff;
  background:
    radial-gradient(circle at center, rgba(37, 111, 191, 0.24), rgba(37, 111, 191, 0) 58%),
    linear-gradient(90deg, rgba(10, 15, 22, 0.96), rgba(18, 29, 43, 0.78), rgba(18, 29, 43, 0.12));
  box-shadow: inset 0 0 0 3px rgba(255, 215, 72, 0.42);
}

.pitch-event-overlay.is-var-check .pitch-event-overlay-action::before {
  content: "VAR";
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  padding: 4px 8px;
  border: 2px solid #ffd948;
  border-radius: 5px;
  background: #17375f;
  color: #ffd948;
  font-size: 0.34em;
  line-height: 1;
  vertical-align: middle;
}

.pitch-event-overlay.is-goal-cancelled {
  inset: 5% 4%;
  color: #fff1f0;
  background:
    radial-gradient(circle at center, rgba(210, 20, 32, 0.26), rgba(210, 20, 32, 0) 58%),
    linear-gradient(90deg, rgba(85, 7, 13, 0.98), rgba(22, 12, 14, 0.72), rgba(22, 12, 14, 0.12));
  box-shadow: inset 0 0 0 3px rgba(255, 235, 235, 0.34);
}

.pitch-event-overlay.is-goal-confirmed {
  color: #edffe8;
  background:
    radial-gradient(circle at center, rgba(68, 205, 97, 0.22), rgba(68, 205, 97, 0) 58%),
    linear-gradient(90deg, rgba(20, 91, 45, 0.94), rgba(20, 91, 45, 0.42), rgba(20, 91, 45, 0));
}

.pitch-event-overlay-action {
  font-size: clamp(28px, 6vw, 68px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
}

.pitch-event-overlay-player {
  max-width: 100%;
  font-size: clamp(15px, 2.4vw, 28px);
  line-height: 1.05;
  font-weight: 900;
}

.pitch-event-overlay-direction {
  max-width: 100%;
  font-size: clamp(14px, 2.2vw, 26px);
  line-height: 1;
  font-weight: 950;
  color: #dff7b5;
  white-space: normal;
}

.main-match-header {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #8f9b82;
  border-radius: 9px;
  background: #efe6c8;
  color: #173a26;
}

.main-match-header span,
.main-match-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-match-header span {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.main-match-header strong {
  justify-self: end;
  font-size: 0.9rem;
}

.main-match-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.main-match-tabs button {
  min-height: 34px;
  border: 1px solid #7d8a76;
  border-radius: 8px;
  background: #f7efd4;
  color: #1e3328;
  font-size: 0.78rem;
  font-weight: 900;
}

.main-match-tabs button.is-active {
  background: #1f6f33;
  border-color: #2e8f47;
  color: #f2fff2;
  box-shadow: 0 0 0 2px rgba(31, 111, 51, 0.18);
}

.pitch-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 2px solid #46714f;
  border-radius: 10px;
  overflow: hidden;
  min-height: 360px;
  --stadium-image: none;
  --stadium-scale: 112%;
  background-image:
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 3px,
      transparent 3px,
      transparent 44px
    ),
    linear-gradient(
      to right,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(17, 63, 36, 0.62) 0,
      rgba(17, 63, 36, 0.62) 18px,
      rgba(23, 78, 45, 0.35) 18px,
      rgba(23, 78, 45, 0.35) 36px
    ),
    #1d6d40;
  background-size:
    90px 90px,
    24px 100%,
    auto,
    auto;
  box-shadow: inset 0 0 0 4px rgba(16, 37, 17, 0.45);
}

.pitch-preview.has-stadium-art {
  background-image:
    linear-gradient(rgba(14, 39, 22, 0.08), rgba(14, 39, 22, 0.12)),
    var(--stadium-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: var(--stadium-scale) auto;
  box-shadow:
    inset 0 0 0 3px rgba(17, 48, 28, 0.36),
    inset 0 0 28px rgba(7, 17, 10, 0.2);
}

.pitch-preview.has-stadium-art::before,
.pitch-preview.has-stadium-art::after {
  display: none;
}

.goal-target-selector {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 36, 24, 0.38);
  backdrop-filter: blur(2px);
}

.goal-target-selector.is-hidden {
  display: none;
}

.goal-target-card {
  display: grid;
  gap: 12px;
  width: min(420px, 92%);
  padding: 14px;
  border: 2px solid #173a26;
  border-radius: 10px;
  background: #f7efd4;
  color: #173a26;
  box-shadow: 0 18px 36px rgba(10, 24, 18, 0.36);
}

.goal-target-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.goal-target-header h3 {
  margin: 0;
  color: #173a26;
  font-size: 1rem;
}

#goalTargetCloseButton {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #7a836f;
  border-radius: 999px;
  background: #efe6c9;
  color: #173a26;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
}

.goal-target-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1.9 / 1;
  border: 4px solid #173a26;
  border-bottom-width: 7px;
  border-radius: 5px 5px 2px 2px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(23, 58, 38, 0.22) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49%, rgba(23, 58, 38, 0.14) 49% 51%, transparent 51%),
    #e9dfbd;
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 221, 0.55),
    0 4px 0 rgba(23, 58, 38, 0.2);
}

.goal-target-frame::before,
.goal-target-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(23, 58, 38, 0.18);
}

.goal-target-frame::before {
  left: 33.333%;
}

.goal-target-frame::after {
  left: 66.666%;
}

.goal-target-point {
  position: absolute;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid #f8f0d2;
  border-radius: 999px;
  background: #1f6f33;
  color: #fff8dd;
  box-shadow:
    0 0 0 3px rgba(31, 111, 51, 0.28),
    0 8px 16px rgba(10, 24, 18, 0.24);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.goal-target-point span {
  max-width: 48px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: normal;
  font-size: 0.63rem;
  font-weight: 950;
  line-height: 1.05;
}

.goal-target-point:hover,
.goal-target-point:focus-visible {
  background: #b7111d;
  box-shadow:
    0 0 0 4px rgba(183, 17, 29, 0.28),
    0 10px 22px rgba(10, 24, 18, 0.3);
  transform: translate(-50%, -50%) scale(1.08);
  outline: none;
}

.goal-target-point.is-selected {
  animation: goalTargetPulse 0.42s ease-out;
  background: #b7111d;
}

.pitch-preview::before,
.pitch-preview::after {
  content: "";
  position: absolute;
}

.pitch-preview::before {
  top: 50%;
  left: 6%;
  right: 6%;
  border-top: 2px solid rgba(246, 250, 243, 0.4);
}

.pitch-preview::after {
  top: 6%;
  bottom: 6%;
  left: 50%;
  border-left: 2px solid rgba(246, 250, 243, 0.4);
}

.pitch-position {
  position: absolute;
  z-index: 2;
  width: var(--player-node-size);
  height: var(--player-node-size);
  min-height: var(--player-node-size);
  border-radius: 999px;
  border: 2px dashed #eef7f1;
  background: #124e2d;
  color: #f3faf5;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  --ambient-shift-x: 0px;
  --ambient-shift-y: 0px;
  transform: translate(calc(-50% + var(--ambient-shift-x)), calc(-50% + var(--ambient-shift-y)));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  cursor: pointer;
  transition:
    transform 0.48s ease,
    box-shadow 0.34s ease,
    filter 0.34s ease;
}

.pitch-position.ambient-user-possession,
.pitch-position.ambient-opponent-possession {
  filter: saturate(1.02);
}

.pitch-position.slot-role-gk {
  background: #1d5f38;
}

.pitch-position.slot-role-def {
  background: #1f5c49;
}

.pitch-position.slot-role-mid {
  background: #1f4f5f;
}

.pitch-position.slot-role-fwd {
  background: #4f3d20;
}

.pitch-position.opponent-match-node {
  border-color: rgba(255, 245, 235, 0.9);
  background: #5b2c26;
  color: #fff7ef;
}

.pitch-position.user-match-node {
  border-color: rgba(239, 247, 241, 0.95);
}

.pitch-position.match-player-node {
  box-shadow: 0 2px 8px rgba(10, 24, 18, 0.24);
}

.pitch-position.match-player-node.player-yellow-flash {
  animation: playerYellowFlash 0.76s ease-out;
}

.pitch-position.match-player-node.player-red-flash {
  animation: playerRedFlash 0.76s ease-out;
}

.pitch-position.match-player-node.player-sent-off {
  border-color: #e22733;
  opacity: 0.42;
  filter: grayscale(0.75);
  box-shadow:
    0 0 0 3px rgba(226, 39, 51, 0.62),
    0 2px 8px rgba(10, 24, 18, 0.24);
}

.match-ball {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 14px;
  height: 14px;
  border: 2px solid #132014;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, #ffffff 0 22%, transparent 24%),
    radial-gradient(circle at 66% 60%, #26301f 0 18%, transparent 20%),
    #f7f3dd;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.36),
    0 0 0 2px rgba(255, 255, 255, 0.24);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    left 1.35s ease-in-out,
    top 1.35s ease-in-out;
}

.slot-rating-line {
  color: #f5db9b;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
}

.pitch-position.is-selected {
  outline: 3px solid #b7ec84;
}

.pitch-position.is-occupied {
  opacity: 0.95;
}

.pitch-position.slot-compat-natural {
  box-shadow: 0 0 0 2px rgba(130, 214, 132, 0.45) inset;
}

.pitch-position.slot-compat-partial {
  box-shadow: 0 0 0 2px rgba(255, 213, 122, 0.55) inset;
}

.pitch-position.slot-compat-bad {
  box-shadow: 0 0 0 2px rgba(255, 123, 123, 0.5) inset;
}

.pitch-position.slot-unavailable {
  opacity: 0.46;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.pitch-position.slot-pulse-natural {
  border-style: solid;
  animation: pulse-natural 1.25s ease-in-out infinite;
}

@keyframes pulse-natural {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(133, 230, 132, 0.44) inset,
      0 0 0 0 rgba(133, 230, 132, 0.34);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(173, 255, 160, 0.82) inset,
      0 0 0 8px rgba(133, 230, 132, 0.18);
  }
}

.pitch-position.is-drag-over {
  transform: translate(-50%, -50%) scale(1.06);
}

.pitch-position.is-drag-blocked {
  outline: 2px solid rgba(247, 143, 143, 0.6);
}

.pitch-position .slot-player-line {
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pitch-position .slot-label-line {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.bench-area {
  grid-area: bench;
  border: 2px solid rgba(43, 88, 56, 0.7);
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(16, 33, 18, 0.85);
  color: #dcebd8;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.bench-area h4 {
  flex: 0 0 auto;
  margin: 0;
  color: #8ad18a;
  font-size: 14px;
  text-align: center;
}

.bench-preview {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(46px, 1fr));
  gap: 6px;
  align-items: center;
  justify-content: stretch;
  min-height: 0;
  overflow: hidden;
}

.bench-slot {
  width: clamp(42px, 3.5vw, var(--player-node-size));
  height: clamp(42px, 3.5vw, var(--player-node-size));
  margin: 0 auto;
  border-radius: 999px;
  border: 2px dashed rgba(255, 255, 255, 0.65);
  background: rgba(18, 46, 24, 0.8);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
  color: #f5fff4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
}

.bench-slot.is-selected {
  outline: 3px solid #b7ec84;
}

.bench-slot.is-available {
  border-style: solid;
  animation: pulse-natural 1.25s ease-in-out infinite;
}

.bench-slot:disabled {
  cursor: not-allowed;
}

.bench-slot.is-occupied {
  border-style: solid;
  border-color: #9ee39d;
  background: #1d6b36;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.16),
    0 0 0 2px rgba(82, 151, 78, 0.24);
}

.bench-player-name {
  max-width: 100%;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bench-player-rating {
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.goal-ad {
  align-self: stretch;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid #b8b8b8;
  border-radius: 9px;
  background: #dfd6bf;
  color: #2d3e35;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  overflow: hidden;
}

.goal-ad span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0;
}

.goal-ad-left {
  grid-area: ad-left;
}

.goal-ad-right {
  grid-area: ad-right;
}

.pitch-bottom-ad {
  grid-area: bottom-ad;
  min-height: 0;
}

.slot-zone-hint {
  margin: 8px 0 0;
  color: #2f3e2d;
  font-size: 12px;
}

.board-left,
.board-right,
.board-center {
  min-height: auto;
}

.board-center .board-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-top-row .board-left {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.1fr)
    minmax(170px, 1.15fr)
    minmax(150px, 1fr)
    minmax(120px, 0.82fr)
    minmax(170px, 1.15fr)
    minmax(280px, 1.8fr);
  gap: clamp(8px, 0.9vw, 14px);
  overflow: hidden;
  align-content: stretch;
  align-items: stretch;
}

.dashboard-top-row .board-left > .board-panel,
.dashboard-top-row .board-left > .top-action-stack,
.dashboard-top-row .board-left > .matchup-preview-card {
  min-height: 0;
}

.dashboard-top-row .board-left > .board-panel {
  min-width: 0;
}

.dashboard-top-row .board-left > .board-panel:first-child {
  overflow: auto;
}

.dashboard-top-row .panel-eyebrow,
.dashboard-top-row .muted,
.dashboard-top-row .summary-line {
  font-size: 0.7rem;
  line-height: 1.2;
}

.dashboard-top-row .setup-control {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 7px;
}

.dashboard-top-row .formation-button-grid,
.dashboard-top-row .play-style-grid,
.dashboard-top-row .mode-button-grid {
  gap: 5px;
  align-content: start;
  height: auto;
}

.dashboard-top-row .formation-button-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-top-row .formation-choice-btn,
.dashboard-top-row .mode-choice-btn,
.dashboard-top-row .play-style-btn {
  min-height: 28px;
  padding: 5px 6px;
  font-size: 0.68rem;
  line-height: 1.05;
}

.dashboard-top-row .formation-choice-btn {
  min-height: 25px;
  padding: 4px 5px;
  font-size: 0.62rem;
}

.dashboard-top-row .play-style-grid,
.dashboard-top-row .mode-button-grid {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-top-row .setup-control h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.dashboard-top-row .dashed-helper {
  align-content: center;
  padding: 7px;
  font-size: 0.68rem;
  line-height: 1.2;
}

.dashboard-top-row .locked-setup-summary {
  gap: 3px;
  font-size: 0.7rem;
}

.dashboard-top-row .top-action-stack {
  grid-column: auto;
  align-self: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(34px, 1fr);
  gap: 7px;
}

.dashboard-top-row .top-action-stack .start-match-button {
  grid-column: 1 / -1;
}

.dashboard-top-row .top-action-stack button {
  min-height: 34px;
  padding-left: 5px;
  padding-right: 5px;
  font-size: 0.72rem;
}

.dashboard-top-row .board-left > .side-matchup-card:not(.is-hidden) {
  display: grid;
}

.dashboard-top-row .board-center {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(170px, 0.62fr) minmax(210px, 0.78fr) minmax(220px, 0.85fr);
  gap: 8px;
  overflow: hidden;
  align-content: start;
}

.dashboard-top-row .board-center > .board-panel,
.dashboard-top-row .board-center > .match-preview-panel,
.dashboard-top-row .board-center > .status-message {
  min-height: 0;
}

.dashboard-top-row .board-center > .match-preview-panel {
  grid-column: 1 / -1;
}

.dashboard-top-row .board-center > .status-message {
  grid-column: 1 / -1;
}

.dashboard-top-row .box-score-panel {
  gap: 5px;
}

.dashboard-top-row .overall-score {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.dashboard-top-row .score-split {
  gap: 5px;
}

.dashboard-top-row .score-split span {
  padding: 4px 5px;
  font-size: 0.64rem;
}

.dashboard-top-row .players-table-header {
  margin-bottom: 5px;
  padding-bottom: 4px;
  font-size: 0.68rem;
}

.dashboard-top-row .players-list {
  max-height: 20vh;
}

.dashboard-top-row .player-list-placeholder {
  min-height: 78px;
  padding: 10px;
  font-size: 0.74rem;
}

.dashboard-top-row .player-row {
  padding: 5px 7px;
  font-size: 0.72rem;
}

.dashboard-top-row .player-row .player-cell {
  font-size: 0.72rem;
}

.dashboard-top-row .player-row .player-cell.position {
  font-size: 0.64rem;
}

.dashboard-top-row .player-row .player-cell.gen {
  font-size: 0.78rem;
}

.dashboard-main-row .board-right,
.dashboard-main-row .board-pitch-area,
.dashboard-main-row .pitch-layout,
.dashboard-main-row .pitch-shell {
  min-height: 0;
}

.dashboard-main-row .board-pitch-area {
  padding: 8px;
}

.dashboard-main-row .pitch-layout {
  height: 100%;
  align-items: center;
}

.dashboard-main-row .pitch-shell {
  display: grid;
  grid-template-rows: minmax(0, auto) auto;
  gap: 6px;
  align-content: center;
  justify-items: center;
  overflow: hidden;
}

.dashboard-main-row .pitch-preview {
  width: auto;
  height: clamp(360px, 52vh, 520px);
  min-height: 0;
  max-height: 100%;
  aspect-ratio: 3 / 2;
}

.dashboard-main-row .board-pitch-area.is-match-mode .pitch-preview {
  width: auto;
  height: clamp(360px, 52vh, 520px);
  min-height: 0;
  max-height: 100%;
  aspect-ratio: 3 / 2;
}

.draft-board.is-squad-complete .dashboard-main-row .pitch-preview {
  height: clamp(390px, 58vh, 580px);
}

.match-live-sidebar {
  min-height: 0;
  overflow: hidden;
}

.match-live-sidebar > * {
  min-height: 0;
}

.match-live-sidebar .main-match-header {
  order: 0;
  flex: 0 0 auto;
}

.match-live-sidebar .halftime-panel {
  order: 1;
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}

.match-live-sidebar .match-atmosphere-panel {
  order: 2;
  flex: 0 0 auto;
}

.match-live-sidebar .match-event-log-panel {
  order: 3;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.match-live-sidebar .match-event-list {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.match-live-sidebar .banner-strip {
  order: 4;
  flex: 0 0 auto;
  margin-top: auto;
}

.players-table-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 48px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #8a948b;
  color: #334a3a;
  font-size: 0.8rem;
  font-weight: 700;
}

.players-table-header > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.players-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  padding-right: 4px;
}

.players-list.is-inactive {
  display: none;
}

.player-list-placeholder {
  min-height: 160px;
  margin: 0;
  padding: 18px 12px;
  border: 1px dashed #9aa48f;
  border-radius: 10px;
  background: #efe6c8;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.35;
}

.player-row {
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #c8d5de;
  border-left: 0;
  border-right: 0;
  background: #f8f1d6;
  color: #1f362a;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 48px;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  min-width: 0;
  font-size: 13px;
}

.player-row .player-cell {
  font-size: 13px;
}

.player-row .player-cell.name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-row .player-cell.position {
  text-transform: uppercase;
  font-size: 11px;
  justify-self: start;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-row .player-cell.gen {
  color: #154a27;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  justify-self: end;
  min-width: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-row:not(:last-child) {
  border-bottom: 1px solid #d5e0da;
}

.player-row.is-selected {
  border-color: #1f6f33;
  background: #e1eddf;
}

.player-row.is-drafted {
  opacity: 0.55;
  cursor: not-allowed;
  position: relative;
}

.player-row.is-unavailable {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.player-row.is-drafted::after {
  content: "DRAFTED";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  color: #8d5a12;
  font-weight: 700;
}

.status-message {
  font-size: 12px;
  margin: 0;
}

.banner-strip {
  height: 32px;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  background: #dfd6bf;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2d3e35;
}

.banner-strip span {
  justify-self: center;
}

.board-right .board-pitch-area {
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.board-right .banner-strip {
  text-align: center;
}

.legacy-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1240px) {
  .dashboard-top-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-main-row {
    grid-template-columns: minmax(0, 2fr) minmax(310px, 0.9fr);
  }

  .match-preview-panel {
    grid-template-columns: minmax(150px, 0.8fr) minmax(230px, 1.2fr) minmax(180px, 0.85fr);
  }

  .match-preview-panel > .simulate-match-button,
  .match-preview-panel > .tournament-start-button,
  .match-preview-panel > .tournament-flow-button,
  .match-preview-panel > .match-preview-actions {
    grid-column: 3;
  }
}

@media (max-width: 1000px) {
  body {
    overflow: auto;
  }

  .draft-board {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 10px;
  }

  .dashboard-top-row,
  .dashboard-main-row {
    max-height: none;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .board-column {
    width: 100%;
    overflow: visible;
  }

  .dashboard-top-row .board-left,
  .dashboard-top-row .board-center {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .dashboard-top-row .top-action-stack,
  .dashboard-top-row .board-center > .match-preview-panel,
  .dashboard-top-row .board-center > .status-message {
    grid-column: auto;
  }

  .dashboard-top-row .players-list {
    max-height: 260px;
  }

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

  .match-preview-panel h2,
  .match-preview-panel .muted,
  .match-preview-summary,
  .tournament-road,
  .matchup-preview-card,
  .tournament-run-status,
  .match-preview-panel > .simulate-match-button,
  .match-preview-panel > .tournament-start-button,
  .match-preview-panel > .tournament-flow-button,
  .match-preview-panel > .match-preview-actions,
  .match-preview-panel > .player-tournament-stats-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .pitch-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(360px, 1fr) auto auto;
    grid-template-areas:
      "bench"
      "ad-left"
      "field"
      "ad-right"
      "bottom-ad";
  }

  .goal-ad {
    min-height: 30px;
  }

  .goal-ad span {
    writing-mode: horizontal-tb;
  }

  .dashboard-main-row .pitch-preview {
    min-height: 520px;
  }

  .match-live-sidebar {
    overflow: visible;
  }

  .matchup-grid {
    grid-template-columns: 1fr;
  }

  .board-right .banner-strip {
    margin: 0 2px;
  }
}

@keyframes pitchEventOverlayIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pitchEventOverlayOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-5px) scale(1.01);
  }
}

@keyframes playerYellowFlash {
  0% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 2px 8px rgba(10, 24, 18, 0.24);
  }
  35% {
    transform: translate(-50%, -50%) scale(1.14);
    box-shadow:
      0 0 0 4px rgba(255, 217, 72, 0.86),
      0 0 18px rgba(255, 217, 72, 0.72);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 2px 8px rgba(10, 24, 18, 0.24);
  }
}

@keyframes playerRedFlash {
  0% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 2px 8px rgba(10, 24, 18, 0.24);
  }
  28% {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow:
      0 0 0 5px rgba(216, 25, 36, 0.9),
      0 0 22px rgba(216, 25, 36, 0.82);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.94);
    box-shadow:
      0 0 0 3px rgba(216, 25, 36, 0.62),
      0 2px 8px rgba(10, 24, 18, 0.24);
  }
}
