:root {
  color-scheme: dark;
  --bg: #090d16;
  --surface: #101621;
  --surface-2: #151d2b;
  --surface-3: #1b2535;
  --border: rgba(255, 255, 255, 0.075);
  --text: #f5f7fb;
  --muted: #8d97a8;
  --muted-2: #657083;
  --lime: #c8f135;
  --lime-deep: #92bf00;
  --green: #153f2c;
  --green-light: #1b5237;
  --pitch-line: rgba(237, 255, 243, 0.72);
  --orange: #ff9f43;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 76% 0%, rgba(92, 123, 35, 0.13), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 104px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.78);
  padding: 28px 16px 22px;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--lime);
  box-shadow: 0 10px 28px rgba(200, 241, 53, 0.18);
  color: #111704;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.brand-name {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.nav-list {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.nav-item {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  padding: 13px 4px 11px;
  color: var(--muted-2);
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-item.active {
  background: rgba(200, 241, 53, 0.1);
  color: var(--lime);
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-item span {
  font-size: 10px;
  font-weight: 650;
}

.profile-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: linear-gradient(145deg, #293649, #17202d);
  color: #d8dee8;
  font-size: 11px;
  font-weight: 800;
}

.main-content {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 34px clamp(24px, 3.5vw, 56px) 48px;
}

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

.eyebrow,
.banner-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.match-status {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(200, 241, 53, 0.14);
  border-radius: 999px;
  background: rgba(200, 241, 53, 0.06);
  padding: 9px 13px;
  color: #d6fa59;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 9px 13px;
  color: #d9dee7;
  font-size: 10px;
  font-weight: 750;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.install-button:hover {
  border-color: rgba(200, 241, 53, 0.28);
  color: var(--lime);
  transform: translateY(-1px);
}

.install-button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.install-button svg {
  width: 14px;
  height: 14px;
}

.install-button.installed {
  display: none;
}

.new-game-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  padding: 10px 14px;
  color: #111704;
  font-size: 10px;
  font-weight: 850;
  box-shadow: 0 9px 24px rgba(200, 241, 53, 0.12);
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.new-game-button:hover,
.primary-button:hover {
  background: #d8ff4e;
  transform: translateY(-1px);
}

.new-game-button:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.new-game-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(16, 22, 33, 0.72);
  padding: 10px 11px 10px 15px;
}

.game-picker {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.game-picker > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-picker select {
  max-width: min(320px, 40vw);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--surface-2);
  padding: 8px 34px 8px 11px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.game-picker select:focus {
  border-color: rgba(200, 241, 53, 0.4);
}

.game-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 8px 9px;
  color: #b4bdcb;
  font-size: 10px;
  font-weight: 700;
}

.toolbar-button:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.toolbar-button.danger:hover {
  color: #ff8f8f;
}

.toolbar-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.toolbar-button svg {
  width: 14px;
  height: 14px;
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
}

.pulse::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(200, 241, 53, 0.42);
  border-radius: inherit;
  content: "";
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  45% {
    opacity: 1;
    transform: scale(1);
  }
}

.match-banner {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 132px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
  border: 1px solid rgba(200, 241, 53, 0.17);
  border-radius: 24px;
  background:
    linear-gradient(115deg, rgba(200, 241, 53, 0.12), transparent 48%),
    var(--surface);
  padding: 26px 30px;
  box-shadow: var(--shadow);
}

.match-banner::after {
  position: absolute;
  top: -85px;
  right: 15%;
  width: 260px;
  height: 260px;
  border: 52px solid rgba(255, 255, 255, 0.016);
  border-radius: 50%;
  content: "";
}

.match-banner-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.competition-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 17px;
  background: var(--lime);
  color: #192006;
}

.competition-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.match-banner h2 {
  margin-bottom: 10px;
  font-size: clamp(20px, 2vw, 25px);
}

.banner-label {
  color: var(--lime);
}

.match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.match-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.match-meta svg {
  width: 14px;
  height: 14px;
}

.squad-summary {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 315px;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(5, 9, 15, 0.34);
  padding: 15px 8px;
}

.squad-summary div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.squad-summary div:last-child {
  border-right: 0;
}

.squad-summary strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.squad-summary span {
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.85fr);
  gap: 22px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(16, 22, 33, 0.92);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 19px;
}

.panel-heading .eyebrow {
  margin-bottom: 5px;
}

.formation-badge,
.count-badge {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  padding: 8px 11px;
  color: #cad0da;
  font-size: 11px;
  font-weight: 750;
}

.pitch-wrap {
  padding: 0 18px;
}

.pitch {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 610px;
  aspect-ratio: 0.88;
  border: 7px solid #193d2c;
  border-radius: 17px;
  background: #1c5138;
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.2),
    0 13px 32px rgba(0, 0, 0, 0.22);
}

.pitch-pattern {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 12.5%,
    rgba(0, 0, 0, 0.025) 12.5%,
    rgba(0, 0, 0, 0.025) 25%
  );
}

.touchline {
  position: absolute;
  inset: 4.5%;
  border: 1.5px solid var(--pitch-line);
}

.halfway-line {
  position: absolute;
  top: 50%;
  right: 4.5%;
  left: 4.5%;
  height: 1.5px;
  background: var(--pitch-line);
}

.centre-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 23%;
  aspect-ratio: 1;
  border: 1.5px solid var(--pitch-line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.centre-spot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pitch-line);
  transform: translate(-50%, -50%);
}

.penalty-area,
.goal-area,
.goal {
  position: absolute;
  left: 50%;
  border: 1.5px solid var(--pitch-line);
  transform: translateX(-50%);
}

.penalty-area {
  width: 53%;
  height: 16%;
}

.penalty-area.top {
  top: 4.5%;
  border-top: 0;
}

.penalty-area.bottom {
  bottom: 4.5%;
  border-bottom: 0;
}

.goal-area {
  width: 25%;
  height: 6.5%;
}

.goal-area.top {
  top: 4.5%;
  border-top: 0;
}

.goal-area.bottom {
  bottom: 4.5%;
  border-bottom: 0;
}

.goal {
  width: 14%;
  height: 2.6%;
  border-color: rgba(237, 255, 243, 0.55);
  background: repeating-linear-gradient(
    45deg,
    transparent 0 4px,
    rgba(255, 255, 255, 0.1) 4px 5px
  );
}

.goal.top {
  top: 1.9%;
}

.goal.bottom {
  bottom: 1.9%;
}

.penalty-arc {
  position: absolute;
  left: 50%;
  width: 20%;
  height: 8%;
  border: 1.5px solid var(--pitch-line);
  border-radius: 50%;
  transform: translateX(-50%);
}

.penalty-arc.top {
  top: 15.5%;
  clip-path: inset(55% 0 0);
}

.penalty-arc.bottom {
  bottom: 15.5%;
  clip-path: inset(0 0 55%);
}

#player-layer {
  position: absolute;
  inset: 0;
}

.pitch-player {
  position: absolute;
  z-index: 4;
  display: flex;
  width: 100px;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  transform: translate(-50%, -50%);
  transition:
    top 260ms ease,
    left 260ms ease,
    filter 160ms ease;
}

.pitch-player:hover {
  filter: brightness(1.08);
}

.pitch-player:focus-visible {
  outline: 2px solid white;
  outline-offset: 5px;
  border-radius: 12px;
}

.player-disc {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: linear-gradient(145deg, #d7fc51, #92bd08);
  box-shadow:
    0 9px 19px rgba(0, 0, 0, 0.36),
    inset 0 -5px 10px rgba(41, 61, 0, 0.19);
  color: #162005;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.pitch-player.goalkeeper .player-disc {
  background: linear-gradient(145deg, #ffbb66, #ed7f24);
  color: #2b1302;
}

.position-pill {
  position: absolute;
  top: -5px;
  right: -10px;
  display: grid;
  min-width: 27px;
  height: 20px;
  place-items: center;
  border: 2px solid #193d2c;
  border-radius: 999px;
  background: #101822;
  padding: 0 5px;
  color: white;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pitch-player-name {
  max-width: 96px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 6px;
  background: rgba(5, 11, 8, 0.76);
  padding: 4px 8px;
  color: white;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.formation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 23px 20px;
}

.formation-footer p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.text-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 6px;
  color: #c8ced8;
  font-size: 11px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--lime);
}

.text-button svg {
  width: 15px;
  height: 15px;
}

.substitutes-panel {
  align-self: start;
}

.bench-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 15px;
}

.bench-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--surface-2);
  padding: 11px 12px;
  color: inherit;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.bench-player:hover {
  border-color: rgba(200, 241, 53, 0.22);
  background: var(--surface-3);
  transform: translateX(-2px);
}

.bench-player:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.bench-avatar {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #222e3f;
  color: #e6eaf0;
  font-size: 10px;
  font-weight: 850;
}

.bench-player.goalkeeper .bench-avatar {
  background: rgba(255, 159, 67, 0.14);
  color: #ffb267;
}

.bench-player-copy {
  min-width: 0;
}

.bench-player-name {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bench-player-position {
  color: var(--muted);
  font-size: 10px;
}

.swap-action {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.swap-action svg {
  width: 13px;
  height: 13px;
}

.bench-note {
  display: flex;
  gap: 10px;
  margin: 17px 15px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 13px;
  color: var(--muted);
}

.bench-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--muted-2);
}

.bench-note p {
  margin-bottom: 0;
  font-size: 10px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  max-width: min(340px, calc(100vw - 32px));
  border: 1px solid rgba(200, 241, 53, 0.2);
  border-radius: 13px;
  background: #182217;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  padding: 12px 16px;
  color: #e8f4cb;
  font-size: 11px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.game-dialog {
  width: min(470px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  outline: none;
  background: var(--surface);
  padding: 0;
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
}

.game-dialog::backdrop {
  background: rgba(3, 6, 11, 0.76);
  backdrop-filter: blur(7px);
}

.game-form {
  padding: 25px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.dialog-close:hover {
  color: white;
}

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

.form-field {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}

.form-field > span {
  color: #aeb7c5;
  font-size: 10px;
  font-weight: 750;
}

.form-field input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: var(--surface-2);
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  color-scheme: dark;
}

.form-field input:focus {
  border-color: rgba(200, 241, 53, 0.5);
  box-shadow: 0 0 0 3px rgba(200, 241, 53, 0.06);
}

.form-field input::placeholder {
  color: var(--muted-2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dialog-note {
  margin-top: 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  padding: 11px 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.secondary-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 10px 15px;
  color: #cad0da;
  font-size: 10px;
  font-weight: 750;
}

.secondary-button:hover {
  background: var(--surface-3);
}

.primary-button {
  padding-right: 17px;
  padding-left: 17px;
}

@media (min-width: 1200px) {
  .pitch {
    aspect-ratio: 1.04;
  }
}

@media (max-width: 1050px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .pitch {
    aspect-ratio: 1.15;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    height: 66px;
    flex-direction: row;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 10px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  }

  .brand {
    margin: 0 10px 0 2px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    font-size: 22px;
  }

  .brand-name,
  .sidebar-footer {
    display: none;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-item {
    height: 50px;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    padding: 8px;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .main-content {
    padding: 25px 14px 100px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .match-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .game-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 11px;
  }

  .game-picker {
    justify-content: space-between;
  }

  .game-picker select {
    width: 100%;
    max-width: 66%;
  }

  .game-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 7px;
  }

  .squad-summary {
    width: 100%;
    min-width: 0;
  }

  .pitch {
    height: 560px;
    min-height: 0;
    aspect-ratio: auto;
  }
}

@media (max-width: 520px) {
  .topbar-actions {
    align-items: center;
    flex-direction: row;
    gap: 7px;
  }

  .match-status {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
  }

  .match-status > span:last-child {
    display: none;
  }

  .install-button {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
  }

  .install-button span {
    display: none;
  }

  .new-game-button {
    width: 34px;
    height: 34px;
    padding: 0;
  }

  .new-game-button span {
    display: none;
  }

  .game-picker {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .game-picker select {
    width: 100%;
    max-width: none;
  }

  .game-actions {
    justify-content: space-between;
  }

  .toolbar-button {
    flex: 1;
    justify-content: center;
  }

  .competition-icon {
    width: 46px;
    height: 46px;
  }

  .match-banner-copy {
    align-items: flex-start;
  }

  .match-meta {
    flex-direction: column;
    gap: 6px;
  }

  .panel-heading {
    padding-right: 18px;
    padding-left: 18px;
  }

  .pitch-wrap {
    padding: 0 8px;
  }

  .pitch {
    height: 520px;
    min-height: 0;
    border-width: 5px;
  }

  .player-disc {
    width: 46px;
    height: 46px;
    border-width: 2px;
    font-size: 11px;
  }

  .pitch-player-name {
    max-width: 80px;
    font-size: 9px;
  }

  .position-pill {
    right: -11px;
    min-width: 25px;
    height: 18px;
    border-width: 1px;
    font-size: 7px;
  }

  .formation-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 15px 18px 18px;
  }

  .bench-list {
    display: flex;
  }

  .toast {
    right: 16px;
    bottom: 92px;
    left: 16px;
  }

  .game-form {
    padding: 21px 18px 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
