/* Finesse: product analytics / Midnight & Amber. Taste: real map art and one data accent. */
.map-stats {
  --map-ink: #eef2f7;
  --map-muted: #aeb9c7;
  --map-rule: #2c3745;
  --map-accent: #ffc875;
  --map-tint: #2f2821;
  --map-ease: cubic-bezier(.16, 1, .3, 1);
  color: var(--map-ink);
  container-type: inline-size;
}
.map-stats__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 15px;
}
.map-stats :is(h2, h3, p) { margin: 0; }
.map-stats__header h2 { font-size: 1.24rem; font-weight: 680; }
.map-stats__header p, .map-stats__result-heading p { color: var(--map-muted); font-size: .82rem; }
.map-stats__filter { position: relative; min-width: 0; font-size: .83rem; }
.map-stats__filter-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: clamp(128px, 22cqw, 194px);
  min-height: 44px;
  padding: 6px 12px 6px 9px;
  color: var(--map-ink);
  background: #18212d;
  border: 1px solid var(--map-rule);
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
  transition: border-color 180ms, background 180ms;
}
.map-stats__filter-trigger::-webkit-details-marker { display: none; }
.map-stats__filter-trigger:hover, .map-stats__filter[open] > summary { border-color: #766249; background: #212c38; }
.map-stats__filter-current { min-width: 0; }
.map-stats__filter-chevron {
  width: 7px;
  height: 7px;
  flex: none;
  border: solid var(--map-muted);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 220ms var(--map-ease);
}
.map-stats__filter[open] .map-stats__filter-chevron { transform: translateY(2px) rotate(225deg); }
.map-stats__options {
  position: absolute;
  inset: calc(100% + 6px) 0 auto auto;
  width: max(100%, 218px);
  max-height: min(292px, 44dvh);
  padding: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: #18212d;
  border: 1px solid #435166;
  border-radius: 11px;
  box-shadow: 0 12px 26px #0a1019a0;
}
.map-stats__filter[open] .map-stats__options { animation: map-team-menu 200ms var(--map-ease); }
@keyframes map-team-menu {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}
.map-stats__option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 5px 11px 5px 7px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--map-ink);
  text-align: start;
  cursor: pointer;
}
.map-stats__option:hover, .map-stats__option:focus-visible { background: #273442; }
.map-stats__option[aria-pressed=true] { background: #342b23; color: #ffdfac; }
.map-stats__option--all { padding-inline-start: 11px; }
.map-stats__option--all + .map-stats__option { margin-top: 4px; }
.map-stats__option[aria-pressed=true]::after {
  content: '';
  width: 5px;
  height: 9px;
  flex: none;
  margin-inline-start: 9px;
  border: solid var(--map-accent);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1px) rotate(45deg);
}
.map-stats__identity, .map-stats__team { display: flex; align-items: center; gap: 7px; min-width: 0; }
.map-stats__identity .map-stats__team-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-stats__option .map-stats__team-name { white-space: normal; }
.map-stats__avatar {
  position: relative;
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #2a3644;
  color: #dce5ef;
  font-size: .71rem;
  font-weight: 680;
  line-height: 1;
}
.map-stats__avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.map-stats__layout {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(320px, 1.04fr);
  grid-template-areas: 'stage ledger' 'rail ledger';
  align-items: start;
  gap: 12px 20px;
}
.map-stats__stage {
  grid-area: stage;
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  height: clamp(300px, 34cqw, 358px);
  overflow: hidden;
  border: 1px solid var(--map-rule);
  border-radius: 14px;
  background: #19232c;
}
.map-stats__photos, .map-stats__photos img, .map-stats__stage::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-stats__photos img { object-fit: cover; object-position: center 47%; }
.map-stats__stage::after {
  content: '';
  pointer-events: none;
  background: linear-gradient(180deg, #111a2600 29%, #111a2660 58%, #101720f4 100%);
}
.map-stats__caption {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding: 18px 20px;
}
.map-stats__intro { min-width: 0; }
.map-stats__intro h3 {
  margin-block-end: 5px;
  color: #f7f3e9;
  font-size: clamp(1.75rem, 4.3cqw, 2.65rem);
  line-height: 1;
  font-weight: 760;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.map-stats__intro p { color: #d4dce5; font-size: .81rem; }
.map-stats__summary {
  display: grid;
  gap: 4px;
  justify-items: end;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.map-stats__summary strong { font-size: 1.62rem; line-height: 1; font-weight: 670; color: var(--map-accent); }
.map-stats__summary > span { color: #e3e5e9; font-size: .77rem; }
.map-stats__track { width: 100%; min-width: 89px; height: 3px; margin-top: 3px; border-radius: 8px; background: #dfe8f142; }
.map-stats__track span { display: block; height: 100%; border-radius: inherit; background: var(--map-accent); transform-origin: left; }
.map-stats__rail {
  grid-area: rail;
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #495563 transparent;
  padding: 3px 3px 6px;
  margin-inline: -3px;
}
.map-stats__tile {
  flex: 1 0 59px;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 4px 4px 7px;
  color: var(--map-muted);
  background: #141d28;
  border: 1px solid var(--map-rule);
  border-radius: 8px;
  text-align: start;
  scroll-snap-align: start;
}
.map-stats__tile strong, .map-stats__tile-count { margin-inline: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-stats__tile strong { font-size: .76rem; line-height: 1.15; }
.map-stats__tile-count { font-size: .74rem; line-height: 1; font-variant-numeric: tabular-nums; }
.map-stats__thumbnail {
  display: block;
  width: 100%;
  height: 37px;
  overflow: hidden;
  border-radius: 4px;
  background: #252d38;
}
.map-stats__thumbnail img { width: 100%; height: 100%; object-fit: cover; opacity: .69; transition: transform 380ms var(--map-ease), opacity 200ms; }
.map-stats__tile:not(:disabled) { cursor: pointer; transition: border-color 210ms, background 210ms, color 180ms, transform 200ms var(--map-ease); }
.map-stats__tile:not(:disabled):hover { transform: translateY(-2px); border-color: #826748; color: var(--map-ink); }
.map-stats__tile:not(:disabled):is(:hover, :focus-visible, [aria-pressed=true]) img { opacity: 1; transform: scale(1.12); }
.map-stats__tile:not(:disabled):active { transform: translateY(1px) scale(.98); }
.map-stats__tile[aria-pressed=true] { background: var(--map-tint); border-color: #af8751; color: #ffdfac; }
.map-stats__tile:disabled { opacity: .45; }
.map-stats__detail {
  grid-area: ledger;
  min-width: 0;
  align-self: start;
  border-block: 1px solid var(--map-rule);
  background: #121b25;
  border-radius: 11px;
  padding: 0 13px 5px;
}
.map-stats__result-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 13px 5px 12px;
  border-bottom: 1px solid var(--map-rule);
}
.map-stats__result-heading h3 { font-size: 1rem; font-weight: 690; }
.map-stats__results { list-style: none; padding: 0; margin: 0; }
.map-stats__results li + li { border-top: 1px solid #25313f; }
.map-stats__result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 51px;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--map-ink);
  cursor: pointer;
  font-size: .82rem;
  text-align: start;
  transition: background 180ms ease;
}
.map-stats__result:hover { background: #1e2b39; }
.map-stats__team-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.map-stats__team--right { flex-direction: row-reverse; text-align: right; }
.map-stats__team .map-stats__avatar { width: 27px; height: 27px; }
.map-stats__center { display: grid; justify-items: center; align-content: center; gap: 1px; }
.map-stats__score { display: flex; justify-content: center; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.map-stats__score .score--win { color: #83dca8; }
.map-stats__date { color: var(--map-muted); font-size: .7rem; line-height: 1.2; }
.map-stats :is(button, summary):focus-visible { outline: 2px solid var(--map-accent); outline-offset: 1px; }
.map-stats__option:focus-visible { outline-offset: -2px; }
@container (max-width: 710px) {
  .map-stats__layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'rail' 'ledger'; gap: 11px; }
  .map-stats__stage { height: clamp(210px, 65cqw, 283px); }
  .map-stats__caption { padding: 14px; }
  .map-stats__rail { scroll-snap-type: x mandatory; }
  .map-stats__tile { flex: 0 0 calc((100% - 18px) / 4); }
  .map-stats__result { min-height: 44px; }
}
@container (max-width: 345px) {
  .map-stats__detail { padding-inline: 8px; }
  .map-stats__result { grid-template-columns: minmax(0, 1fr) 47px minmax(0, 1fr); gap: 5px; padding-inline: 5px; }
  .map-stats__team { gap: 5px; }
  .map-stats__team .map-stats__avatar { width: 21px; height: 21px; }
}
@container (max-width: 302px) {
  .map-stats__tile { flex-basis: calc((100% - 12px) / 3); }
}
@media (prefers-reduced-motion: reduce) {
  .map-stats :is(.map-stats__tile, .map-stats__result, .map-stats__thumbnail img, .map-stats__filter-chevron) { transition: none; }
  .map-stats__filter[open] .map-stats__options { animation: none; }
}
