/* One game as a slim card (public/games.js): Home's "My recent games" and the Match history page.
   Left: my line (hero, K/D/A, best stat, award, talents). Right: both teams with the draft edge between them. */
.gc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
/* The map's art, faded in behind the top left of the card */
.gc.art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.gc.art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: min(560px, 70%);
  background: var(--art) center 30% / cover;
  opacity: 0.26;
  -webkit-mask-image: linear-gradient(90deg, #000 10%, transparent);
  mask-image: linear-gradient(90deg, #000 10%, transparent);
}
.gc.solo {
  grid-template-columns: minmax(0, 1fr);
}
.gc-me {
  display: grid;
  align-content: start;
  gap: 12px;
}
.gc-view {
  display: grid;
  align-content: start;
  gap: 12px;
}
/* Another player shown on the left (click a hero in the teams): a soft swap */
.gc[data-gid] .gc-view {
  animation: gc-in 0.18s ease-out;
}
@keyframes gc-in {
  from {
    opacity: 0.35;
  }
}
.gc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.gc-hero {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 3px var(--c);
}
.gc-head {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.gc-head > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}
.gc-head b {
  font: 600 16px/1.2 var(--display);
  letter-spacing: -0.01em;
}
.gc-res {
  font-weight: 600;
  font-size: 13px;
  color: var(--c);
}
.gc-who {
  align-self: center;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.gc-back {
  align-self: flex-start;
  margin-left: auto;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.gc-back::before {
  content: "‹ ";
}
.gc-back:hover {
  color: var(--text);
}
.gc-meta {
  font-size: 13px;
  color: var(--muted);
}
.gc-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--muted);
}
.gc-stats b {
  font: 600 14px var(--mono);
  color: var(--text);
}
.gc-stats > small {
  margin-left: -9px;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.gc-kda i {
  font-style: normal;
  padding-inline: 3px;
  color: #6d625c;
}
.gc-aw.ic {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-left: 2px;
  color: #f3d48a;
  background: color-mix(in srgb, #e9b949 12%, transparent);
  border-color: color-mix(in srgb, #e9b949 35%, transparent);
}
.gc-aw img {
  width: 26px;
  height: 26px;
  margin: -4px 0 -4px -6px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.gc-aw {
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
/* My talents, one icon per tier */
.gc-tal {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
}
.gc-ics {
  display: flex;
  gap: 5px;
}
.gc-ics > * {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--surface-2);
  overflow: hidden;
}
.gc-ics img {
  display: block;
  width: 100%;
  height: 100%;
}
.gc-ics .none {
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, transparent 4px 8px);
  opacity: 0.6;
}
.gc-load {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.gc-load svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}
.gc-load:hover svg {
  transform: translateX(2px);
}
/* Both teams: label, five faces, the bans in grey; the draft edge bar sits between them */
.gc-teams {
  display: grid;
  align-content: center;
  gap: 8px;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.gc-teams > * {
  max-width: 470px;
}
.gc-team {
  display: grid;
  grid-template-columns: 74px auto 1fr;
  align-items: center;
  gap: 12px;
}
.gc-lbl {
  display: grid;
  font-size: 12px;
  font-weight: 600;
  color: var(--c);
  line-height: 1.3;
}
.gc-lbl small {
  font-weight: 400;
  color: var(--muted);
}
.gc-faces {
  display: flex;
  gap: 4px;
}
.gc-faces img,
.gc-bans img {
  display: block;
  border-radius: 7px;
  background: var(--surface-2);
  object-fit: cover;
}
.gc-faces img {
  width: 32px;
  height: 32px;
}
.gc-faces img.me {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 3.5px var(--brand);
}
/* Clickable faces (games with everyone's builds): the ring marks whose line is on the left */
.gc-p {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  cursor: pointer;
  transition: transform 0.15s;
}
.gc-p img.me {
  box-shadow: none;
}
.gc-p:hover {
  transform: translateY(-2px);
}
.gc-p:hover img {
  filter: brightness(1.15);
}
.gc-p.on img {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 3.5px var(--brand);
}
.gc-p:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.gc-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 2px 0 0;
  font-size: 12px;
  color: #7d736d;
}
.gc-sbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.gc-sbtn:hover {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
}
.gc-sbtn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.15s;
}
.gc-sbtn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
/* The full scoreboard (all ten players), under the whole card */
.gc-sb {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.gc-sbw {
  overflow-x: auto;
}
.gc-sb table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
.gc-sb thead th {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: right;
}
.gc-sb thead th:first-child {
  text-align: left;
  padding-left: 6px;
}
.gc-sb thead th:last-child {
  text-align: left;
}
/* Sortable headings: click to sort each team by that column (the arrow shows which way) */
.gc-sbs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.gc-sbs:hover,
.gc-sb thead th.srt .gc-sbs {
  color: var(--text);
}
.gc-sbs svg {
  width: 12px;
  height: 12px;
  margin-right: -14px; /* the arrow hangs off the side so the numbers below stay lined up */
  color: var(--accent);
}
.gc-sb thead th:first-child .gc-sbs svg,
.gc-sb thead th:last-child .gc-sbs svg {
  margin-right: 0;
}
.gc-sbs:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Sorted: "By hero damage, high to low · Reset" on the right of the first team's heading */
.gc-sbt .gc-sbl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--c);
}
.gc-sbn {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  font-weight: 400;
  color: var(--muted);
}
.gc-sbx {
  margin-left: 12px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.gc-sbx:hover {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
}
.gc-sbt th {
  padding: 12px 6px 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--c);
}
.gc-sbt span {
  font-weight: 400;
  color: var(--muted);
}
.gc-sbr {
  cursor: pointer;
}
.gc-sbr > * {
  padding: 4px 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.gc-sbr td {
  text-align: right;
  font: 500 13px var(--mono);
  color: color-mix(in srgb, var(--text) 82%, transparent);
}
.gc-sbr td.top {
  color: #f3d48a;
  font-weight: 600;
}
.gc-sbr td:last-child,
.gc-sb thead th:last-child {
  text-align: left;
  padding-left: 18px; /* room for the sort arrow of the column before */
}
.gc-sbr:hover > *,
.gc-sbr:focus-visible > * {
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.gc-sbr:focus-visible {
  outline: none;
}
.gc-sbr.me > * {
  background: color-mix(in srgb, var(--brand) 7%, transparent);
}
.gc-sbr.on > th {
  box-shadow: inset 3px 0 0 var(--brand);
}
.gc-sbr th {
  padding-left: 6px;
  text-align: left;
  font-weight: 500;
}
.gc-sbh {
  display: flex;
  align-items: center;
  gap: 9px;
}
.gc-sbh > img:not(.gc-sbaw) {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}
.gc-sbh b {
  font-weight: 500;
}
.gc-sbaw {
  width: 22px;
  height: 22px;
  margin-left: -3px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.gc-ics.sm {
  gap: 3px;
}
.gc-ics.sm > * {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}
/* Phones: the hero column stays put while the numbers scroll sideways */
@media (max-width: 700px) {
  .gc-sbn {
    margin-left: 0; /* next to the team name, not off at the far end of the scrolling table */
  }
  .gc-sbn > span {
    display: none; /* the arrow on the heading already says it */
  }
  .gc-sbr th,
  .gc-sb thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg);
  }
  .gc-sbh b {
    display: none;
  }
}
.gc-bans {
  display: flex;
  gap: 3px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  justify-self: start;
}
.gc-bans img {
  width: 22px;
  height: 22px;
  filter: grayscale(1) brightness(0.6);
}
.gc-edge {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 2px 0;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.gc-edge i {
  grid-column: 2;
  grid-row: 1;
  height: 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--bad) 45%, var(--surface-2));
  overflow: hidden;
}
.gc-edge i::before {
  content: "";
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--good);
  transition: filter 0.15s;
}
.gc-edge span {
  grid-column: 1;
  grid-row: 1;
  white-space: nowrap;
}
.gc-edge b {
  font: 600 13px var(--mono);
  color: var(--text);
}
.gc-edge:hover span {
  color: var(--text);
}
.gc-edge:hover i::before {
  filter: brightness(1.2);
}
.gc-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: #7d736d;
}
@media (max-width: 900px) {
  .gc {
    grid-template-columns: minmax(0, 1fr);
  }
  .gc-teams {
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 480px) {
  .gc {
    padding: 14px;
  }
  /* "Back to mine" as a small line above the player instead of squeezing the name */
  .gc-back {
    order: -1;
    flex-basis: 100%;
    margin: -4px 0 -6px;
    text-align: left;
  }
  .gc-team {
    grid-template-columns: 1fr auto;
    row-gap: 6px;
  }
  .gc-lbl {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
  }
  .gc-faces img {
    width: 30px;
    height: 30px;
  }
  .gc-bans {
    justify-self: end;
  }
  .gc-edge {
    grid-template-columns: auto 1fr;
  }
  .gc-ics {
    gap: 4px;
  }
  .gc-ics > * {
    width: 28px;
    height: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gc-load svg,
  .gc-edge i::before,
  .gc-p {
    transition: none;
  }
  .gc[data-gid] .gc-view {
    animation: none;
  }
}
/* "Watch this game": jumps to the game in my Twitch VOD (only while Twitch keeps it) */
.gc-vod {
  display: block;
  margin-top: 12px;
}
.gc-watch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.gc-watch:hover {
  border-color: #6d4fa8;
}
.gc-watch svg {
  width: 15px;
  height: 15px;
  color: #a970ff;
  flex: none;
}
.gc-watch small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
/* Scoreboard / Timeline buttons under the teams */
.gc-sbtns {
  display: inline-flex;
  gap: 6px;
}
.gc-sbtn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
}
/* Main stats / More stats */
.gc-sbv {
  display: inline-flex;
  margin: 0 0 10px 6px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.gc-sbv button {
  padding: 3px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.gc-sbv button[aria-pressed="true"] {
  background: var(--bg);
  color: var(--text);
}
/* The timeline: XP lead area, deaths as faces, forts/keeps/core, merc camps, level 10/20 */
.tl {
  display: grid;
  gap: 10px;
}
.tl-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  padding-left: 6px;
  font-size: 13px;
  color: var(--muted);
}
.tl-sum b {
  margin-right: 6px;
  font-weight: 600;
  color: var(--text);
}
.tl-g {
  width: 100%;
  height: auto;
  overflow: visible;
}
.tl-area.a {
  fill: color-mix(in srgb, var(--good) 28%, transparent);
}
.tl-area.e {
  fill: color-mix(in srgb, var(--bad) 28%, transparent);
}
.tl-line {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 75%, transparent);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.tl-0 {
  stroke: var(--line);
  stroke-width: 1;
}
.tl-x,
.tl-y {
  font: 11px var(--mono);
  fill: var(--muted);
  text-anchor: middle;
}
.tl-y {
  text-anchor: end;
}
.tl-lv line {
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.tl-lv text {
  font: 600 11px var(--mono);
}
.tl-lv.a line {
  stroke: color-mix(in srgb, var(--good) 70%, transparent);
}
.tl-lv.a text {
  fill: var(--good);
}
.tl-lv.e line {
  stroke: color-mix(in srgb, var(--bad) 70%, transparent);
}
.tl-lv.e text {
  fill: var(--bad);
}
/* Deaths above (enemies) and below (us) the graph: a face, or a count for 3+ close together.
   Hover or tap one for a tower: who died, when, and the heroes in on the kill. */
.tl-gw {
  position: relative;
}
.tl-lane {
  position: relative;
  height: 28px;
}
.tl-m {
  position: absolute;
  top: 2px;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 0 0 1.5px var(--c);
  cursor: pointer;
}
.tl-m.e {
  --c: var(--good); /* an enemy died: good for us */
}
.tl-m.a {
  --c: var(--bad);
}
.tl-m > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.tl-m.n {
  background: color-mix(in srgb, var(--c) 22%, var(--bg));
}
.tl-n {
  font: 700 12px var(--mono);
  color: var(--text);
}
.tl-m:hover,
.tl-m:focus-visible {
  z-index: 3;
  box-shadow: 0 0 0 2.5px var(--c);
  outline: none;
}
.tl-tw {
  position: absolute;
  left: 50%;
  z-index: 5;
  display: none;
  min-width: 210px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
  text-align: left;
  cursor: default;
}
.tl-m.l .tl-tw {
  left: -6px;
  transform: none;
}
.tl-m.r .tl-tw {
  left: auto;
  right: -6px;
  transform: none;
}
.tl-lane.top .tl-tw {
  top: 32px; /* opens downward over the graph */
}
.tl-lane.bot .tl-tw {
  bottom: 32px; /* opens upward */
}
.tl-m:hover .tl-tw,
.tl-m:focus .tl-tw {
  display: block;
}
.tl-tw-h {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c);
  white-space: nowrap;
}
.tl-tw ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tl-tw li {
  display: grid;
  grid-template-columns: 28px auto 1fr;
  align-items: center;
  gap: 8px;
}
.tl-tw .v {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 0 0 1.5px var(--c);
}
.tl-tw li > span:nth-child(2) {
  display: grid;
  line-height: 1.15;
  white-space: nowrap;
}
.tl-tw b {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.tl-tw small {
  font: 11px var(--mono);
  color: var(--muted);
}
.tl-tw .by {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}
.tl-tw .by img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  opacity: 0.9;
}
.tl-s path {
  stroke: var(--bg);
  stroke-width: 1.5;
}
.tl-s.a path {
  fill: var(--good);
}
.tl-s.e path {
  fill: var(--bad);
}
.tl-c {
  stroke: var(--bg);
  stroke-width: 1;
}
.tl-c.a {
  fill: color-mix(in srgb, var(--good) 75%, #fff);
}
.tl-c.e {
  fill: color-mix(in srgb, var(--bad) 75%, #fff);
}
.tl-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-left: 6px;
  font-size: 12px;
  color: #7d736d;
}
.tl-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tl-key i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.tl-key .k.e {
  border: 1.5px solid var(--good);
}
.tl-key .k.a {
  border: 1.5px solid var(--bad);
}
.tl-key .k.n {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  font: 700 9px var(--mono);
  font-style: normal;
  color: var(--text);
  border: 1.5px solid var(--good);
  background: color-mix(in srgb, var(--good) 22%, var(--bg));
}
.tl-key .s {
  width: 9px;
  height: 9px;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--good);
}
.tl-key .c {
  width: 6px;
  height: 6px;
  background: color-mix(in srgb, var(--good) 75%, #fff);
}
.tl-key .l {
  width: 0;
  height: 12px;
  border-radius: 0;
  border-left: 1px dashed var(--good);
}
.tl-note {
  margin-left: auto;
}
@media (max-width: 700px) {
  .tl-g {
    min-width: 640px;
  }
  .tl {
    overflow-x: auto;
  }
  .tl-note {
    margin-left: 0;
  }
}
