/* ---------- публичные страницы ---------- */
.public-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(35, 36, 38, 0.96);
}
.public-brand { text-decoration: none; }
.public-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
}
.public-main {
  width: min(1320px, calc(100% - 32px));
  margin: 18px auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.public-footer {
  width: min(1320px, calc(100% - 32px));
  margin: 8px auto 22px;
  color: var(--faint);
  font-size: 10.5px;
}

/* ---------- история матчей ---------- */
.match-table-wrap { overflow-x: auto; }
.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.match-table th {
  text-align: left;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 9px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.match-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  vertical-align: middle;
}
.match-table tbody tr { cursor: pointer; }
.match-table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.match-table tbody tr:last-child td { border-bottom: 0; }
.match-table .right { text-align: right; }
.match-table .match-date { white-space: nowrap; color: var(--muted); }
.match-map-name {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}
.match-table .mono { font-family: var(--mono); }

.match-summary {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.match-summary-main { flex: 1 1 560px; min-width: 0; }
.match-summary-title h2 { margin-bottom: 3px; }
.match-summary-score {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.match-score-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.match-score-team.is-winner {
  border-color: rgba(111, 227, 161, 0.35);
  background: rgba(111, 227, 161, 0.055);
}
.match-score-team b {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text);
  margin-left: 6px;
}
.match-score-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.match-score-colon { color: var(--faint); font-size: 20px; }
.match-summary-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 160px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.match-summary-side > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}
.match-summary-side span { color: var(--faint); }
.match-summary-side b { font-weight: 650; text-align: right; }

.match-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.match-team {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.match-team.team-1 .match-team-head { border-top-color: #c74444; }
.match-team.team-2 .match-team-head { border-top-color: #3e8fd6; }
.match-team.is-winner { box-shadow: inset 0 0 0 1px rgba(111, 227, 161, 0.18); }
.match-team-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-top: 3px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #2e2f32;
}
.match-team-ident { min-width: 0; flex: 1; }
.match-team-ident h3 { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-team-tickets { text-align: right; }
.match-team-tickets span {
  display: block;
  color: var(--faint);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.match-team-tickets b { font-family: var(--mono); font-size: 16px; }

.match-stat-head,
.match-player,
.match-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px repeat(5, 32px);
  gap: 6px;
  align-items: center;
  padding: 4px 12px;
}
.match-stat-head {
  min-height: 26px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.match-stat-head span:nth-child(n + 3) { text-align: right; }
.match-player {
  font-size: 11.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}
.match-player:nth-child(even) { background: rgba(255, 255, 255, 0.012); }
.match-player > span:nth-child(n + 3) {
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}
.match-player-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.match-player-name > span:not(.match-leader):not(.match-left-badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-player-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-size: 10px;
}
.match-leader { color: var(--warn); font-size: 10px; flex: 0 0 auto; }
.match-left-badge {
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(226, 184, 92, 0.12);
  color: var(--warn);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.match-player.is-left { opacity: 0.82; }
.match-squad-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.045);
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
  font-size: 11px;
}
.match-squad-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-squad-head .hint { margin-left: auto; }
.match-squad-id {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 17px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(90, 167, 255, 0.16);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
}
.match-totals {
  margin-top: 7px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 650;
  font-size: 10.5px;
}
.match-totals span:nth-child(n + 3) { text-align: right; font-family: var(--mono); }
.match-team > .empty { margin: 10px 12px; }

.match-left-card { margin-top: 0; }
.match-left-card .match-player { padding-left: 12px; padding-right: 12px; }

@media (max-width: 1100px) {
  .match-teams { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .match-summary-side {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 9px;
    width: 100%;
  }
  .match-stat-head,
  .match-player,
  .match-totals {
    grid-template-columns: minmax(0, 1fr) repeat(5, 27px);
    gap: 4px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .match-col-role,
  .match-player-role { display: none; }
  .match-player { font-size: 10.5px; }
  .match-player-name { font-size: 11px; }
  .match-score-name { max-width: 130px; }
}
