/* ---------- match cards ---------- */
.match-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.match-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.match-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.match-head:hover {
  background: var(--panel-3);
}
.match-card.collapsed .match-head {
  border-bottom: none;
}
.match-caret {
  flex: 0 0 auto;
  width: 12px;
  color: var(--ink-3);
  font-size: 12px;
}
.match-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}
.match-head .map-thumb {
  width: 84px;
  height: 50px;
}
.match-where {
  flex: 1 1 auto;
  min-width: 0;
}
.match-map {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.match-info {
  flex: 0 0 auto;
  min-width: 88px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.match-mode {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.match-clock {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.team {
  padding: 12px 16px 14px;
  min-width: 0;
}
.team + .team {
  border-left: 1px solid var(--line);
}
.team-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.team-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.team-stats {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}
.team-cubes {
  color: var(--ink-2);
}

/* ---------- queue dodges ---------- */
.dodge-log {
  background: var(--console-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 0;
  height: 156px;
  overflow-y: auto;
}
.dodge-line {
  display: flex;
  gap: 12px;
  padding: 2px 16px;
}
.dodge-line:hover {
  background: rgba(255, 255, 255, 0.03);
}
.dodge-time {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--console-gutter);
}
.dodge-msg {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--console-dim);
  min-width: 0;
}
.dodge-msg b {
  color: var(--console-ink);
  font-weight: 500;
}

.tp {
  display: flex;
  gap: 11px;
  padding: 9px 0;
}
.tp + .tp {
  border-top: 1px dashed var(--line);
}
.tp-face {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
/* Grid, not a flex row: as a flex row the two-line K/D/A + MMR column set the height of
   the name line and left a gap above the loadout. Here it spans both rows instead. */
.tp-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
}
.tp-top {
  grid-column: 1;
}
.tp-kit {
  grid-column: 1;
}
.tp-stats {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
}
.tp-top {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.tp-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
/* A nickname anywhere live — match card, queue, dodge log — is the way into that
   player's editor. One component, so the affordance reads the same in all three.
   It stays --ink: the palette keeps --signal for the rail marker and focus rings, and
   a link colour here would make it look like a state. */
button.player-link,
button.inline-link {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 2px;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 28%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.12s;
}
button.player-link:hover,
button.inline-link:hover {
  background: none;
  text-decoration-color: currentColor;
}
.tp-hero {
  font-size: 13px;
  color: var(--ink-2);
}
.tp-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.tp-mmr {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.tp-kda {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}
.tp-kda b {
  color: var(--ink);
  font-weight: 600;
}
/* Blocks then perks, split by a rule — same order every row, so you read down the
   column rather than parsing each player's kit from scratch. */
.tp-kit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.kit-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.kit-icon.dev {
  border-radius: 2px;
}
.kit-icon.perk {
  border-radius: 50%;
}
.kit-icon.empty {
  background: none;
  border-style: dashed;
  border-color: var(--line);
}
.kit-sep {
  width: 1px;
  height: 18px;
  background: var(--line-2);
  margin: 0 5px;
}
tbody tr:last-child td {
  border-bottom: none;
}
