/* Replay viewer, main screen. Tokens and layout follow the design hand-off (Replay viewer — main screen).
   Map-internal token styles below are unchanged from the prototype. */
:root {
  --bg: #0a0e1a;
  --panel: #10162a;
  --panel-2: #171f35;
  --line: #263049;
  --line-strong: #3a4566;
  --text: #e8ecf6;
  --muted: #a3acc6;
  --faint: #8590ad;
  --accent: #4da3ff;
  --accent-2: #7dbbff;
  --gold: #ffd166;
  --blue: #4da3ff;
  --red: #f0555b;
  --radius: 4px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button {
  font: inherit;
}

input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

a {
  color: var(--accent-2);
}

a:hover {
  color: #a9d2ff;
}

.banner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 6px 24px;
  background: rgba(255, 209, 102, 0.1);
  border-bottom: 1px solid rgba(255, 209, 102, 0.25);
  color: #ffd166;
  font-size: 12px;
}

.banner strong {
  letter-spacing: 0.08em;
}

.banner span {
  color: var(--muted);
}

/* Header */
.top {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 24px;
  min-height: 48px;
  background: linear-gradient(180deg, #131b35, #0e1426);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.top-left,
.top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand svg {
  flex: 0 0 auto;
}

.divider {
  display: block;
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.map-name {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.anon-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
}

.map-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* Loading and error states */
.state-block {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.skel {
  background: linear-gradient(180deg, #0e1426, #0b1020);
  animation: hcShimmer 1.4s ease-in-out infinite;
}

.skel-scoreboard {
  height: 132px;
}

.skel-map {
  aspect-ratio: 1000 / 602;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, #18213c, #0b1020);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.skel-timeline {
  height: 178px;
  background: linear-gradient(180deg, #111830, #0b1020);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@keyframes hcShimmer {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.state-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 45vh;
  padding: 24px;
  text-align: center;
}

.state-error h2 {
  margin: 0;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.state-error p {
  margin: 0;
  max-width: 440px;
  color: var(--muted);
}

.error-detail {
  font-size: 12px;
  color: #6f7a99;
}

.retry {
  margin-top: 6px;
  min-height: 44px;
  padding: 0 26px;
  border-radius: 999px;
  border: 0;
  background: #e8ecf6;
  color: #0a0e1a;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Match: scoreboard, map */
.viewer {
  display: flex;
  flex-direction: column;
}

.match {
  position: relative;
  background: #070b16;
}

.scoreboard {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 10px 28px 0;
  background: linear-gradient(180deg, #0e1426 0%, rgba(11, 16, 32, 0.92) 62%, rgba(7, 11, 22, 0) 100%);
}

.team-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 5px 16px;
  min-width: 0;
}

.team-blue {
  background: linear-gradient(90deg, rgba(77, 163, 255, 0.03), rgba(77, 163, 255, 0.2));
  transform: skewX(14deg);
}

.team-red {
  background: linear-gradient(270deg, rgba(240, 85, 91, 0.03), rgba(240, 85, 91, 0.2));
  transform: skewX(-14deg);
}

.hero-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  background: #10162a;
  transition: background 0.15s ease;
}

.hero-card[aria-pressed='true'] .hero-card-body {
  background: #2c3866;
}

.hero-card:hover .card-art img {
  filter: brightness(1.12);
}

.card-art {
  position: relative;
  display: block;
  width: calc(100% - 8px);
  margin: 0 4px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1a1f3a;
  border-bottom: 3px solid var(--strip);
}

.hero-card[aria-pressed='true'] .card-art {
  border-bottom-color: var(--gold);
}

.card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: filter 0.15s ease;
}

.card-art .no-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #c3cadd;
}

.hero-card.is-dead .card-art img,
.hero-card.is-dead .card-art .no-art {
  filter: grayscale(1) brightness(0.7);
}

.card-dead {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(6, 9, 18, 0.5);
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: #ff7a7f;
  text-shadow: 0 2px 4px #000;
}

.card-dead .respawn-label {
  font-family: Inter, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #c3cadd;
  text-shadow: none;
}

.card-dead.respawning {
  color: var(--gold);
}

.card-talents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1fr);
  grid-template-rows: 22px 22px;
  gap: 2px;
  padding: 0 12px 6px;
}

.talent {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 2px;
  background: #0d1324;
  border: 1px solid #2a3452;
  color: #8590ad;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

.talent.heroic {
  grid-row: span 2;
  font-size: 17px;
}

.talent > span {
  display: block;
}

.team-blue .talent > span {
  transform: skewX(-14deg);
}

.team-red .talent > span {
  transform: skewX(14deg);
}

/* Centre strip: levels, structures, kills, time. */
.scorestrip {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  min-width: 360px;
  padding: 0 0 8px;
  background: linear-gradient(180deg, #1a2340, #10172a);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant, 37px)) 100%, var(--slant, 37px) 100%);
}

.levels {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
}

.level {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 96px;
  min-height: 66px;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 700;
  font-size: 54px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #6f7a99;
}

.level-blue {
  color: #eef6ff;
  background: linear-gradient(90deg, rgba(77, 163, 255, 0.04), rgba(77, 163, 255, 0.38));
  box-shadow: inset 0 -3px 0 #4da3ff;
  padding-left: 20px;
}

.level-red {
  color: #fff0f0;
  background: linear-gradient(270deg, rgba(240, 85, 91, 0.04), rgba(240, 85, 91, 0.38));
  box-shadow: inset 0 -3px 0 #f0555b;
  padding-right: 20px;
}

.stats {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 7px 40px 0;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 600;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 7px;
  padding: 4px 12px;
  white-space: nowrap;
  color: #6f7a99;
}

.stat-blue {
  background: rgba(77, 163, 255, 0.16);
  color: #cfe4ff;
}

.stat-red {
  background: rgba(240, 85, 91, 0.16);
  color: #ffd3d5;
}

.stat-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.stat-icon.mirror {
  transform: scaleX(-1);
}

.stat-time {
  display: flex;
  align-items: center;
  padding: 3px 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* The map sits over the bottom of the scoreboard, as in the design. The frame spans the full width;
   app.js sets its height (the map's height, capped at the room left on screen). */
.map-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: -34px auto 0;
  overflow: hidden;
  background: #0d1324;
  border: 0;
  border-radius: 0;
  max-height: none;
}

.map-wrap:focus-visible {
  outline-offset: -3px;
}

/* Toast stack: recent events, top-right of the map. */
.toasts {
  position: absolute;
  right: 20px;
  top: 64px;
  z-index: 6;
  width: 280px;
  max-width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}

.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 7px 14px 7px 20px;
  background: linear-gradient(90deg, rgba(10, 14, 26, 0.92), rgba(10, 14, 26, 0.76));
  backdrop-filter: blur(6px);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
  transition: opacity 0.3s linear;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: var(--stroke);
  clip-path: polygon(10px 0, 14px 0, 4px 100%, 0 100%);
}

.toast svg {
  flex: 0 0 auto;
}

.toast span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}

/* Lane waves: one row of estimated push meters (Top, Mid, Bot), bottom-left of the map. */
.lanes-box {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 6;
  max-width: calc(100% - 40px);
  box-sizing: border-box;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(6px);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.lanes-title {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

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

.lane-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lane-label {
  font-size: 11px;
  color: #c3cadd;
  white-space: nowrap;
}

.lane-bar {
  position: relative;
  width: 56px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    rgba(77, 163, 255, 0.45),
    rgba(77, 163, 255, 0.1) 50%,
    rgba(240, 85, 91, 0.1) 50%,
    rgba(240, 85, 91, 0.45)
  );
}

.lane-bar::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: #3a4566;
}

.lane-front {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 4px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: #e8ecf6;
  box-shadow: 0 0 0 2px #0a0e1a;
}

.lanes-note {
  margin: 0;
  font-size: 10px;
  color: #6f7a99;
  white-space: nowrap;
}

/* Timeline: fights and map tracks, transport and speed. */
.timeline-section {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, #111830, #0b1020);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.4);
}

.timeline-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 6px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 12px;
}

.tl-labels {
  position: relative;
  height: 68px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.tl-labels span {
  position: absolute;
  right: 0;
}

.tl-labels span:nth-child(1) {
  top: 15px;
}

.tl-labels span:nth-child(2) {
  top: 35px;
}

.tl-area {
  position: relative;
  height: 68px;
  margin: 0 8px;
}

.timeline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 68px;
  cursor: pointer;
}

.timeline-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 11px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
}

.timeline-fill {
  position: absolute;
  left: 0;
  top: 11px;
  height: 6px;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(232, 236, 246, 0.35), rgba(232, 236, 246, 0.75));
  pointer-events: none;
}

.timeline-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(195, 202, 221, 0.22) 0 1px,
    transparent 1px var(--tick-step, 5%)
  );
  background-position: 0 20px;
  background-size: 100% 30px;
  background-repeat: repeat-x;
}

.tl-mark {
  position: absolute;
  margin-left: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #0a0e1a;
}

.tl-mark.death {
  top: 17px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #f0555b;
}

.tl-mark.camp,
.tl-mark.relocation,
.tl-mark.clone,
.tl-mark.symbiote {
  top: 36px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
}

.tl-mark.camp {
  background: #f5b83d;
}

/* Map objective: panel, on-map status, legend circles and timeline milestones. */
.objective-map-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  gap: 3px;
  max-width: min(260px, 58%);
  padding: 8px 10px;
  border: 1px solid rgba(240, 179, 91, 0.65);
  border-radius: 8px;
  background: rgba(8, 10, 13, 0.88);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.objective-map-overlay b {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.objective-map-overlay span {
  overflow: hidden;
  max-height: 2.6em;
}

.objective-panel {
  padding: 14px 16px;
}

.objective-panel h3 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 14px;
}

.objective-panel p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.objective-badge {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.objective-status {
  color: var(--text) !important;
}

.objective-milestones {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
}

.objective-milestones time {
  margin-right: 8px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.objective-footnote {
  color: var(--faint) !important;
  font-size: 10.5px !important;
}

.mkey.objective-circle {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #10151d;
  background: #82909e;
}

.mkey.objective-circle.blue {
  background: #438fe5;
}

.mkey.objective-circle.red {
  background: #e45c68;
}

.tl-mark.objective {
  width: 7px;
  height: 7px;
  border: 1px solid #080a0d;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(240, 179, 91, 0.6);
}

.key.objective {
  background: var(--gold);
  border-radius: 50%;
}

.tl-mark.relocation {
  background: #7dbbff;
}

.tl-mark.clone {
  background: #c58cff;
}

.tl-mark.symbiote {
  background: #7be0a8;
}

.playhead {
  position: absolute;
  top: 20px;
  height: 34px;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, rgba(232, 236, 246, 0.9), rgba(232, 236, 246, 0.15));
  pointer-events: none;
  z-index: 2;
}

.scrub {
  position: absolute;
  left: -8px;
  top: 2px;
  width: calc(100% + 16px);
  height: 24px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

.scrub::-webkit-slider-runnable-track {
  height: 24px;
  background: transparent;
}

.scrub::-moz-range-track {
  height: 24px;
  background: transparent;
}

.scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #111830;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.scrub::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #111830;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.timeline-scale {
  position: absolute;
  left: 0;
  right: 0;
  top: 52px;
  height: 14px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.timeline-scale span {
  position: absolute;
  left: var(--at);
  transform: translateX(-50%);
  white-space: nowrap;
}

.timeline-scale span:first-child {
  left: 0;
  transform: none;
}

.timeline-scale span:last-child {
  left: auto;
  right: 0;
  transform: none;
}

.transport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.readout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
}

.clock {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clock-total {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 18px;
  color: #6f7a99;
  font-variant-numeric: tabular-nums;
}

.clock-sub {
  font-size: 11px;
  color: #6f7a99;
}

.readout .chip {
  align-self: center;
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #c3cadd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #e8ecf6;
  color: #0a0e1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.play svg,
.skip svg {
  display: block;
}

.play .icon-pause {
  display: none;
}

.play[aria-pressed='true'] .icon-play {
  display: none;
}

.play[aria-pressed='true'] .icon-pause {
  display: block;
}

.speed {
  justify-self: end;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.speed button {
  min-width: 40px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.speed button[aria-pressed='true'] {
  background: rgba(232, 236, 246, 0.16);
  color: #ffffff;
}

/* Lower area: selected hero, panels. */
.lower {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 28px 32px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  align-items: start;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.side > section,
.stage > .panel {
  background: linear-gradient(180deg, #141c36, #0f1528);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 14px 16px;
  min-width: 0;
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.legend-panel {
  padding: 10px 14px;
}

.selected-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selected-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-portrait {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--team);
  background: #16294a;
  box-shadow: 0 0 0 2px #0a0e1a;
}

.selected-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selected-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.selected-name {
  font-size: 16px;
  font-weight: 600;
}

.selected-meta {
  font-size: 12px;
  color: var(--muted);
}

.state-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(77, 163, 255, 0.14);
  color: #cfe4ff;
  white-space: nowrap;
}

.state-pill.dead {
  background: rgba(255, 122, 127, 0.14);
  color: #ff7a7f;
}

.state-pill.respawning {
  background: rgba(255, 209, 102, 0.14);
  color: var(--gold);
}

.close-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-talents {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.tcell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  border-radius: 3px;
  border: 1px dashed #263049;
  color: #5e6886;
}

.tcell span:first-child {
  font-size: 11px;
  color: var(--muted);
}

.tcell span:last-child {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
}

.selected-note {
  font-size: 12px;
  color: #8c96b3;
}

h1,
h2 {
  font-family: inherit;
}

h2 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 1280px) {
  .scoreboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .scorestrip {
    min-width: 0;
    clip-path: none;
    padding: 6px 0 0;
    background: transparent;
  }

  .lower {
    padding: 16px;
  }
}

@media (max-width: 720px) {
  .top {
    padding: 8px 12px;
  }

  .timeline-inner {
    padding: 12px;
  }

  .timeline-grid {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .tl-labels {
    display: none;
  }

  .transport {
    grid-template-columns: minmax(0, 1fr);
  }

  .speed {
    justify-self: start;
  }

  .level {
    font-size: 36px;
    min-width: 0;
  }

  .toasts {
    top: 8px;
    right: 8px;
    width: 220px;
  }

  .lanes-box {
    width: calc(100% - 16px);
    left: 8px;
    bottom: 8px;
  }
}

.side section {
  min-width: 0;
}

h2 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
}

.facts {
  display: grid;
  gap: 2px;
  margin: 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(37, 49, 64, 0.7);
}

.facts dt {
  color: var(--faint);
}

.facts dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.players {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.player:hover {
  border-color: var(--line-strong);
}

.player.focused {
  border-color: var(--accent);
  background: rgba(74, 163, 255, 0.1);
}

.player.dimmed {
  opacity: 0.42;
}

.player .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.player .who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.player .hero {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
}

.player .team {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player .state {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.player.in-hiding .swatch,
.player.in-hiding .hero {
  opacity: 0.55;
}

.player.in-hiding .state.path {
  color: #67e8f9;
}

.player .state.dead {
  color: var(--red);
}

.player .state.fresh {
  color: #7ee0b8;
}

.player .state.path {
  color: #9ecbff;
}

.hint {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 11.5px;
}

.layers {
  display: grid;
  gap: 6px;
}

.layers label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
}

.layers input {
  accent-color: var(--accent);
}

.coverage-box {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.coverage-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.link-button {
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.map-image,
.overlay,
.dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-image {
  object-fit: fill;
  image-rendering: auto;
}

.overlay {
  overflow: visible;
  pointer-events: none;
}

.dots {
  pointer-events: none;
}

.minion,
.monster,
.mercenary {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--marker-scale, 1));
  will-change: left, top, opacity;
  pointer-events: none;
}

.minion {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--unit-color);
  box-shadow:
    0 0 0 1px rgba(8, 10, 13, 0.9),
    0 0 5px var(--unit-color);
}

.minion[data-type="FootmanMinion"] {
  border-radius: 1.5px;
}

.minion[data-type="RangedMinion"] {
  width: 6px;
  height: 6px;
}

.minion[data-type="WizardMinion"] {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg) scale(var(--marker-scale, 1));
}

.minion[data-type="CatapultMinion"] {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.monster {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(8, 10, 13, 0.9);
  border-radius: 1px;
  background: rgba(240, 179, 91, 0.92);
  box-shadow: 0 0 8px rgba(240, 179, 91, 0.55);
  animation: monster-idle 2.4s ease-in-out infinite;
}

.monster[data-type="MercDefenderRangedMage"] {
  width: 9px;
  height: 9px;
}

.monster[data-type="MercDefenderSiegeGiant"] {
  width: 15px;
  height: 15px;
}

.monster::after,
.mercenary::after {
  content: "";
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: #0a0e13;
}

.mercenary {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(8, 10, 13, 0.9);
  border-radius: 1px;
  background: var(--unit-color);
  box-shadow: 0 0 8px var(--unit-color);
  animation: monster-idle 2s ease-in-out infinite;
}

.mercenary[data-type="MercLanerRangedMage"] {
  width: 10px;
  height: 10px;
}

.mercenary[data-type="MercLanerSiegeGiant"] {
  width: 15px;
  height: 15px;
}

.locust {
  position: absolute;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%) rotate(45deg) scale(var(--marker-scale, 1));
  border: 1px solid rgba(8, 10, 13, 0.9);
  border-radius: 1.5px;
  background: #b06cff;
  box-shadow:
    0 0 0 1px var(--team-color),
    0 0 7px rgba(176, 108, 255, 0.85);
  pointer-events: none;
  will-change: left, top;
}

.locust::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #2a143d;
}

.locust[data-type="AbathurLocustBombardStrain"] {
  width: 10px;
  height: 10px;
  background: #d08cff;
}

@keyframes monster-idle {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(45deg) scale(calc(var(--marker-scale, 1) * 1));
  }
  50% {
    transform: translate(-50%, -50%) rotate(45deg) scale(calc(var(--marker-scale, 1) * 1.12));
  }
}

.dot {
  position: absolute;
  width: 27px;
  height: 27px;
  margin: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--marker-scale, 1));
  overflow: hidden;
  background: #0a0e13;
  border: 2px solid var(--team-color);
  box-shadow:
    0 0 0 2px rgba(8, 10, 13, 0.92),
    0 0 14px var(--team-color);
  transition: opacity 0.2s ease;
  will-change: left, top;
}

.dot.in-hiding .dot-portrait,
.dot.in-hiding .dot-initial {
  filter: grayscale(1) brightness(0.55);
  opacity: 0.5;
}

.dot-portrait {
  transition: filter 0.25s ease, opacity 0.25s ease;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dot-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--team-color);
  color: #081018;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.dot.fresh {
  animation: pulse 1.1s ease-out infinite;
}

/* Channel progress: a ring that fills clockwise from the cast to the teleport. */
.dot.hearth-channel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(
    #ffd27a var(--channel-progress, 0deg),
    rgba(255, 210, 122, 0.2) 0
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}

.dot.hearth-channel {
  border-color: #ffd27a;
  box-shadow:
    0 0 0 2px rgba(8, 10, 13, 0.92),
    0 0 0 4px rgba(255, 210, 122, 0.75),
    0 0 22px #ffd27a;
  animation: hearth-channel 0.9s ease-in-out infinite;
}

/* The companion is a small token behind its hero, with a dark disc so the portrait reads. */
.dot.companion-dot {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--dot-color);
  background: #0a0e13;
  box-shadow: none;
  opacity: 0.92;
}

/* The companion portrait is a square bear head, so it fills the disc. */
.dot.companion-dot .dot-portrait {
  object-fit: cover;
}

.dot.stale {
  opacity: 0.45;
}

.dot.relocating {
  outline: 2px dashed var(--dot-color);
  outline-offset: 4px;
}

.dot.clone {
  width: 22px;
  height: 22px;
  border-style: dashed;
  opacity: 0.9;
}

.dot.hatted {
  outline: 2px solid #b06cff;
  outline-offset: 2px;
}

.crown-layer {
  z-index: 6;
}

.symbiote-crown {
  position: absolute;
  width: 17px;
  height: 12px;
  transform: translate(-50%, -50%) scale(var(--marker-scale, 1)) translateY(-20px);
  filter: drop-shadow(0 0 4px rgba(176, 108, 255, 0.9));
  pointer-events: none;
  animation: symbiote-crown-pulse 1.2s ease-in-out infinite;
  will-change: left, top;
}

.symbiote-crown svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

@keyframes symbiote-crown-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(calc(var(--marker-scale, 1) * 1)) translateY(-20px);
  }
  50% {
    transform: translate(-50%, -50%) scale(calc(var(--marker-scale, 1) * 1.12)) translateY(-20px);
  }
}

.dot.dead {
  opacity: 0.24;
  box-shadow: none;
  filter: grayscale(1);
}

.dot.hero-label {
  width: auto;
  height: auto;
  padding: 1px 5px;
  border: 0;
  border-radius: 4px;
  background: rgba(8, 10, 13, 0.7);
  box-shadow: none;
  color: var(--dot-color);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(var(--marker-scale, 1)) translate(0, calc(-50% - 17px));
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dot.hero-label.visible {
  opacity: 0.9;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 11.5px;
}

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

.mkey {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #93a3b5;
}

.mkey.solid {
  background: #93a3b5;
}

.mkey.line {
  width: 14px;
  height: 2px;
  border: 0;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.55;
}

.mkey.objective {
  background: transparent;
  border: 1.5px solid #f0b35b;
}

.mkey.death {
  border: 0;
  border-radius: 1px;
  background: var(--red);
  transform: rotate(45deg);
}

.mkey.camp {
  border: 0;
  border-radius: 1px;
  background: #7ee0b8;
  transform: rotate(45deg);
}

.mkey.minion {
  width: 7px;
  height: 7px;
  border: 0;
  background: var(--accent);
}

.mkey.monster {
  border: 0;
  border-radius: 1px;
  background: #f0b35b;
  transform: rotate(45deg);
}

.mkey.mercenary {
  border: 0;
  border-radius: 1px;
  background: linear-gradient(90deg, #4aa3ff 50%, #ff6b6b 50%);
  transform: rotate(45deg);
}

.mkey.structure {
  border: 0;
  border-radius: 1px;
  background: linear-gradient(90deg, #4aa3ff 50%, #ff6b6b 50%);
}

.mkey.toxic-nest {
  border: 0;
  border-radius: 0;
  background: #8fd14f;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.mkey.locust-nest {
  border: 0;
  border-radius: 0;
  background: #b06cff;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.timeline-panel {
  padding: 14px 16px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--faint);
  font-size: 11.5px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.key {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.key.death {
  background: var(--red);
  transform: rotate(45deg);
}

.key.camp {
  background: #7ee0b8;
  transform: rotate(45deg);
}

.event-log {
  display: grid;
  gap: 4px;
  max-height: 200px;
  overflow: auto;
  font-size: 12px;
}

.event-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(37, 49, 64, 0.55);
}

.event-row.past {
  opacity: 0.5;
}

.event-row.recent {
  background: rgba(74, 163, 255, 0.08);
}

.event-row .t {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.event-row .what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-row .where {
  color: var(--faint);
  font-size: 11px;
}

.event-empty {
  color: var(--faint);
  font-size: 12px;
}

.footer {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 24px 32px;
  color: var(--faint);
  font-size: 11.5px;
}

.footer p {
  margin: 0 0 6px;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer .fine {
  max-width: 900px;
  line-height: 1.6;
}

@keyframes hearth-channel {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(8, 10, 13, 0.92),
      0 0 0 4px rgba(255, 210, 122, 0.55),
      0 0 16px #ffd27a;
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(8, 10, 13, 0.92),
      0 0 0 7px rgba(255, 210, 122, 0.15),
      0 0 28px #ffd27a;
  }
}

@keyframes pulse {
  0% {
    box-shadow:
      0 0 0 2px rgba(8, 10, 13, 0.92),
      0 0 12px var(--team-color);
  }
  70% {
    box-shadow:
      0 0 0 5px rgba(74, 163, 255, 0),
      0 0 20px var(--team-color);
  }
  100% {
    box-shadow:
      0 0 0 2px rgba(8, 10, 13, 0.92),
      0 0 12px var(--team-color);
  }
}

/* Win-probability estimate panel */
.win-prob-panel {
  padding: 14px 16px;
}

.win-prob-panel .section-head {
  align-items: center;
}

.wp-estimate {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(201, 250, 72, 0.35);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

.wp-meta {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.wp-note {
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
}

#win-prob-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 10, 13, 0.45);
}

.wp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

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

.wp-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 1px;
}

.wp-legend i[style*="border-radius: 50%"] {
  border-radius: 50%;
}

.wp-readout {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 13px;
  min-height: 18px;
}

.map-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-picker select {
  appearance: none;
  min-width: 180px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(10, 14, 19, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.map-picker select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(111, 211, 255, 0.22);
  outline-offset: 1px;
}

.attribution {
  margin: 16px;
  font-size: 12px;
  color: #7d8a99;
}

/* Talent picks: the icon is the whole cell's background (cover), so it fills the box. The
   hero-card cell and the selected-panel tile both use it; --icon is set per cell by app.js. */
.talent.picked,
.tcell.picked {
  background-color: #171f35;
  background-image: linear-gradient(rgba(10, 14, 26, 0.25), rgba(10, 14, 26, 0.25)), var(--icon);
  background-size: cover;
  background-position: center;
  border: 0;
}

.tcell.picked > span:first-child {
  text-shadow: 0 1px 3px #000;
}

/* Hero card: art and talent grid share one skewed frame (14 degrees, as in the design). The card
   body carries the skew; the art and the portraits inside it are counter-skewed so faces stay
   upright, and the art is widened by the skew offset so it covers the slanted edges. */
.team-blue .card-art > img,
.team-blue .card-art > .no-art {
  transform: skewX(-14deg);
}

.team-red .card-art > img,
.team-red .card-art > .no-art {
  transform: skewX(14deg);
}

/* The art box is 4:5, so its height is 1.25x its width. The 14deg skew shifts the top and bottom
   edges by height x tan(14deg) / 2 each, about 0.156 of the width per side. Percentages of the
   box width keep that overflow in step with the box. */
.card-art > img,
.card-art > .no-art {
  width: 132%;
  margin-left: -16%;
}

.card-art > .card-dead {
  left: -16%;
  right: -16%;
}

/* Restored from main (#264, #268): hiding-spot key and the chosen-talents table. */
.mkey.hiding {
  border: 1px solid #22d3ee;
  border-radius: 1px;
  background: rgba(34, 211, 238, 0.35);
}

/* Chosen talents */
.talents-panel {
  padding: 14px 16px;
}

.talents-meta {
  max-width: 62%;
  overflow: hidden;
  color: var(--faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.talents-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.talents-wrap {
  overflow-x: auto;
}

.talents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.talents-table th,
.talents-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(37, 49, 64, 0.55);
  text-align: left;
  vertical-align: top;
}

.talents-table thead th {
  position: sticky;
  top: 0;
  background: rgba(16, 21, 28, 0.98);
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.talents-table thead th.level {
  text-align: center;
}

.talents-table tbody th {
  font-weight: 600;
  white-space: nowrap;
}

.hero-cell {
  min-width: 120px;
}

.talent-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.talent-cell {
  min-width: 124px;
  color: var(--text);
}

.talent-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  border-radius: 3px;
  background: #0b0e13;
  object-fit: cover;
  vertical-align: middle;
}

.talent-label {
  vertical-align: middle;
}

.talent-cell.seekable,
.hero-cell.seekable {
  cursor: pointer;
}

.talent-cell.seekable:hover,
.hero-cell.seekable:hover {
  background: rgba(74, 163, 255, 0.08);
}

.talent-empty {
  color: var(--faint);
}

.talent-unresolved {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.talents-table tbody tr {
  transition: opacity 0.15s ease, background 0.15s ease;
}

.talents-table tbody tr.focused {
  background: rgba(74, 163, 255, 0.08);
}

.talents-table tbody tr.dimmed {
  opacity: 0.42;
}

/* Zoom and pan: the map image, objective geometry and markers share one canvas that is
   scaled and moved as a unit. The map tag, toasts and lane waves stay fixed on the frame. */
.map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  --marker-scale: 1;
}

.map-wrap {
  touch-action: pan-y;
}

.map-wrap.is-zoomed {
  touch-action: none;
  cursor: grab;
}

.map-wrap.is-zoomed.is-panning {
  cursor: grabbing;
}

.map-zoom {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  gap: 4px;
}

.map-zoom button {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 10, 13, 0.8);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.map-zoom button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Dragging to pan must not select or highlight the map image, its labels or the page under it. */
.map-wrap {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.map-wrap ::selection {
  background: transparent;
}
