:root {
  color-scheme: dark;
  --background: #0d100e;
  --surface: #141815;
  --surface-raised: #1a1f1b;
  --ink: #f1f0e4;
  --muted: #c2c0b5;
  --dim: #969a90;
  --line: rgba(241, 240, 228, 0.12);
  --accent: #e4ef62;
  --accent-soft: rgba(228, 239, 98, 0.1);
  --soul-teal: #59f1d0;
  --danger: #f1786e;
  --win: #7ed09a;
  --loss: #f1786e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--background);
}

[hidden] { display: none !important; }

button,
a { -webkit-tap-highlight-color: transparent; }

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.ascii-border {
  position: fixed;
  z-index: 0;
  top: 0;
  bottom: 0;
  display: none;
  width: calc((100vw - 1220px) / 2);
  min-width: 174px;
  overflow: hidden;
  color: var(--soul-teal);
  opacity: 0.72;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}

.ascii-border-left { left: 0; }
.ascii-border-right { right: 0; }

.ascii-border::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(89, 241, 208, 0.38), transparent);
  content: "";
}

.ascii-border-left::after { right: 5px; }
.ascii-border-right::after { left: 5px; }

.ascii-stack {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(30px, 4vh, 52px);
  padding: clamp(60px, 8vh, 94px) 4px;
}

.ascii-bag {
  display: block;
  width: min(214px, calc(100% - 8px));
  height: auto;
  aspect-ratio: 1;
  flex: 0 0 auto;
  background: url("/assets/ascii-bag-placeholder.webp?v=20260817-1") center / contain no-repeat;
  opacity: 0.62;
  filter: drop-shadow(0 0 18px rgba(89, 241, 208, 0.26));
  transform: scale(0.96);
  transition: opacity 350ms ease, transform 500ms ease;
  user-select: none;
}

.ascii-bag[data-ready="true"] {
  background-image: none;
  opacity: 0.92;
  transform: scale(1);
}
.ascii-bag:nth-child(2)[data-ready="true"] { opacity: 0.76; }
.ascii-bag[data-error="true"] { display: none; }

@media (min-width: 1501px) {
  .ascii-border { display: block; }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #11140e;
  background: var(--accent);
  border-radius: 7px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 900;
}

.live-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.live-pill span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(228, 239, 98, 0.55);
}

h1,
h2,
h3,
p { margin-top: 0; }

.hero-copy {
  max-width: 850px;
  padding: 72px 0 44px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

h1 {
  max-width: 800px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 em {
  color: var(--accent);
  font-weight: 500;
}

.intro {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.7;
}

.friend-card,
.leaderboard-card,
.recent-card,
.panel,
.verdict-card,
.metric-grid,
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.group-overview {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
}

.leaderboard-card,
.recent-card {
  overflow: hidden;
}

.overview-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  padding: 25px 25px 21px;
  border-bottom: 1px solid var(--line);
}

.overview-heading h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.overview-heading > p {
  max-width: 360px;
  margin-bottom: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.overview-loading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 126px;
  color: var(--muted);
  font-size: 13px;
}

.leaderboard {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-row {
  border-bottom: 1px solid var(--line);
}

.leaderboard-row:last-child { border-bottom: 0; }

.leaderboard-button {
  display: grid;
  width: 100%;
  grid-template-columns: 62px minmax(220px, 1.25fr) minmax(120px, 0.65fr) minmax(145px, 0.7fr);
  gap: 18px;
  align-items: center;
  min-height: 88px;
  padding: 12px 25px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease;
}

.leaderboard-button:hover,
.leaderboard-button:focus-visible {
  background: rgba(228, 239, 98, 0.065);
  outline: none;
}

.rank-1 .leaderboard-button {
  background: linear-gradient(90deg, rgba(241, 120, 110, 0.12), transparent 65%);
}

.rank-1 .leaderboard-button:hover,
.rank-1 .leaderboard-button:focus-visible {
  background: linear-gradient(90deg, rgba(241, 120, 110, 0.19), rgba(228, 239, 98, 0.04));
}

.leaderboard-rank {
  color: var(--dim);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.rank-1 .leaderboard-rank { color: var(--danger); }

.leaderboard-identity,
.recent-player-identity {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
}

.leaderboard-avatar,
.leaderboard-avatar-placeholder,
.recent-avatar,
.recent-avatar-placeholder {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  object-fit: cover;
  color: var(--dim);
  background: #252a25;
  border: 1px solid rgba(241, 240, 228, 0.18);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.leaderboard-identity-copy,
.recent-player-identity > span:last-child {
  display: block;
  min-width: 0;
}

.leaderboard-identity-copy strong,
.recent-player-identity strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-identity-copy > span,
.recent-player-identity > span > span {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.35;
}

.leaderboard-average,
.leaderboard-total,
.recent-souls {
  text-align: right;
}

.leaderboard-average strong,
.leaderboard-total strong,
.recent-souls strong {
  display: block;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.leaderboard-average strong { font-size: 16px; }

.leaderboard-total strong {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.rank-1 .leaderboard-total strong { color: var(--danger); }

.leaderboard-average > span,
.leaderboard-total > span,
.recent-souls > span {
  display: block;
  color: var(--dim);
  font-size: 10.5px;
  line-height: 1.35;
}

.overview-note {
  margin: 0;
  padding: 13px 25px;
  color: var(--danger);
  border-top: 1px solid rgba(241, 120, 110, 0.25);
  font-size: 12px;
  line-height: 1.5;
}

.recent-heading { align-items: center; }

.recent-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  color: var(--muted);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.recent-meta > span {
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
}

.recent-player-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent-player-list > li { border-bottom: 1px solid var(--line); }
.recent-player-list > li:last-child { border-bottom: 0; }

.recent-player {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(210px, 1.25fr) minmax(165px, 0.8fr) minmax(130px, 0.65fr);
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 10px 25px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

a.recent-player {
  cursor: pointer;
  transition: background 140ms ease;
}

a.recent-player:hover,
a.recent-player:focus-visible {
  background: rgba(228, 239, 98, 0.065);
  outline: none;
}

.recent-avatar,
.recent-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 7px;
}

.recent-hero {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recent-hero-image {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
  background: var(--surface-raised);
  border-radius: 7px;
}

.recent-souls strong {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.recent-player.did-not-play { color: var(--dim); }

.recent-absent {
  grid-column: 3;
  text-align: right;
}

.recent-empty {
  margin: 0;
  padding: 30px 25px;
  color: var(--muted);
}

.friend-card {
  margin-bottom: 54px;
  padding: 24px 24px 14px;
}

.picker-heading,
.chart-heading,
.table-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
}

.picker-heading { margin-bottom: 18px; }

.picker-heading h2,
.chart-heading h2,
.table-heading h2,
.player-heading h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.picker-heading > p,
.chart-heading > p,
.table-heading > p {
  margin-bottom: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.friend-picker {
  display: flex;
  gap: 9px;
  padding: 0 0 10px;
  overflow-x: auto;
  scrollbar-color: var(--dim) transparent;
  scrollbar-width: thin;
}

.friend-button,
.secondary-button {
  border: 1px solid var(--line);
  font: inherit;
  cursor: pointer;
  transition: 150ms ease;
}

.friend-button {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 9px;
  align-items: center;
  padding: 7px 13px 7px 7px;
  color: var(--muted);
  background: var(--surface-raised);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.friend-button:hover,
.friend-button[aria-current="true"] {
  color: #11140e;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.friend-avatar,
.friend-avatar-placeholder {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  background: #252a25;
  border: 1px solid rgba(241, 240, 228, 0.18);
  border-radius: 7px;
}

.friend-avatar {
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}

.friend-avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 11px;
  font-weight: 900;
}

.friend-button:hover .friend-avatar,
.friend-button[aria-current="true"] .friend-avatar,
.friend-button:hover .friend-avatar-placeholder,
.friend-button[aria-current="true"] .friend-avatar-placeholder {
  border-color: rgba(17, 20, 14, 0.45);
}

.friend-name { white-space: nowrap; }

.panel { padding: 27px; }

.empty-state {
  display: flex;
  gap: 18px;
  align-items: center;
}

.empty-state[hidden],
.loading-state[hidden],
.error-state[hidden],
#report[hidden] { display: none; }

.empty-icon {
  color: var(--accent);
  font-size: 32px;
}

.empty-state h2 { margin-bottom: 5px; }

.empty-state p,
.error-state p {
  margin-bottom: 0;
  color: var(--muted);
}

code { color: var(--accent); }

.loading-state {
  display: flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  color: var(--muted);
}

.loading-state p { margin: 0; }

.loader {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border-color: rgba(241, 120, 110, 0.4);
}

.secondary-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--ink);
  background: transparent;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.secondary-button:hover {
  color: #11140e;
  background: var(--accent);
  border-color: var(--accent);
}

.player-heading {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.player-identity {
  display: flex;
  gap: 15px;
  align-items: center;
}

.player-avatar {
  width: 58px;
  height: 58px;
  object-fit: cover;
  background: var(--surface-raised);
  border: 2px solid var(--accent);
  border-radius: 10px;
}

.player-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.verdict-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 14px;
  padding: 23px 25px;
  background: linear-gradient(100deg, var(--accent-soft), transparent 55%), var(--surface);
  border-left: 3px solid var(--accent);
}

.verdict-kicker {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.verdict-card h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.7vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.verdict-card > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.metric {
  min-width: 0;
  padding: 25px;
  border-left: 1px solid var(--line);
}

.metric:first-child { border-left: 0; }

.metric-primary { background: var(--accent-soft); }

.metric p {
  min-height: 31px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  padding: 0.06em 0 0.1em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  white-space: nowrap;
}

.metric-primary strong,
.metric:last-child strong { color: var(--accent); }

.metric span {
  display: block;
  margin-top: 11px;
  color: var(--dim);
  font-size: 11.5px;
}

.coverage-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding: 13px 3px 0;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.5;
}

.chart-card {
  position: relative;
  margin-top: 46px;
  padding: 24px;
}

.chart-heading { margin-bottom: 8px; }

.chart-help {
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.soul-chart {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.soul-chart-svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.chart-grid-line {
  stroke: rgba(241, 240, 228, 0.09);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
}

.chart-date-label { font-size: 12px; }

.chart-area { fill: rgba(228, 239, 98, 0.08); }

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.chart-average-line {
  stroke: rgba(241, 240, 228, 0.32);
  stroke-dasharray: 5 7;
  stroke-width: 1;
}

.chart-point {
  fill: var(--background);
  stroke: var(--accent);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 120ms ease, stroke 120ms ease, transform 120ms ease;
}

.chart-point-hit {
  fill: transparent;
  pointer-events: all;
}

.chart-point-link {
  cursor: pointer;
  outline: none;
}

.chart-point-link:hover .chart-point,
.chart-point-link:focus .chart-point {
  fill: var(--accent);
  stroke: var(--ink);
  transform: scale(1.65);
}

.chart-point-link:focus-visible .chart-point {
  stroke-width: 3;
}

.chart-tooltip {
  position: fixed;
  z-index: 30;
  width: min(280px, calc(100vw - 24px));
  padding: 13px 15px 14px;
  color: var(--ink);
  background: #1b201b;
  border: 1px solid rgba(228, 239, 98, 0.55);
  border-radius: 9px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.chart-tooltip-kicker,
.chart-tooltip-copy,
.chart-tooltip-action {
  display: block;
}

.chart-tooltip-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.15;
}

.chart-tooltip-copy {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.chart-tooltip-action {
  margin-top: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chart-empty {
  margin: 24px 0 4px;
  color: var(--muted);
}

.table-heading { padding: 56px 0 18px; }

.table-heading > p { max-width: 470px; }

.match-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.match-row {
  --shame-level: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(76px, 0.58fr)) minmax(125px, 0.75fr);
  gap: 14px;
  align-items: center;
  min-height: 98px;
  padding: 0 16px;
  scroll-margin-top: 24px;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(228, 239, 98, calc(var(--shame-level) * 0.06)), transparent 50%);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 140ms ease;
}

.match-row:last-child { border-bottom: 0; }

.match-row::before {
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 0;
  width: calc(2px + var(--shame-level) * 2px);
  background: rgba(228, 239, 98, calc(0.15 + var(--shame-level) * 0.8));
  content: "";
}

.match-row:hover,
.match-row:focus-visible,
.match-row:target {
  background: rgba(228, 239, 98, 0.08);
  outline: none;
}

.match-row:target {
  box-shadow: inset 0 0 0 1px rgba(228, 239, 98, 0.55);
}

.match-row.worst-offence {
  background: linear-gradient(90deg, rgba(241, 120, 110, 0.1), transparent 58%);
}

.hero-cell {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
}

.hero-cell > div { min-width: 0; }

.hero-image,
.hero-placeholder {
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  object-fit: contain;
  background: var(--surface-raised);
  border-radius: 8px;
}

.hero-placeholder {
  display: grid;
  place-items: center;
  color: var(--dim);
}

.recent-hero > .recent-hero-image.hero-placeholder {
  width: 38px;
  height: 38px;
}

.shame-rank {
  display: inline-block;
  margin-bottom: 3px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-name {
  margin-bottom: 3px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-date,
.cell-label,
.match-destination {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.4;
}

.match-destination {
  margin-top: 2px;
  transition: color 140ms ease;
}

.match-row:hover .match-destination,
.match-row:focus-visible .match-destination { color: var(--accent); }

.match-stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.outcome {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.outcome.win { color: var(--win); }
.outcome.loss { color: var(--loss); }
.outcome.other { color: var(--muted); }

.soul-result { text-align: right; }

.soul-result strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 500;
}

.soul-result .cell-label { display: block; }

.worst-offence .soul-result strong { color: var(--danger); }

.soul-result.unavailable strong {
  color: var(--dim);
  font-family: inherit;
  font-size: 12px;
}

.profile-page .shell {
  width: min(1400px, calc(100% - 40px));
}

.profile-back {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 140ms ease;
}

.profile-back:hover,
.profile-back:focus-visible {
  color: var(--accent);
  outline: none;
}

.profile-loading,
.profile-error {
  margin-top: 54px;
}

.profile-error {
  align-items: flex-end;
}

.profile-error h1 {
  max-width: none;
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.error-actions {
  display: flex;
  gap: 8px;
}

.profile-hero {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 58px 0 30px;
}

.profile-identity {
  min-width: 0;
}

.profile-avatar {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 13px;
}

.profile-hero h1 {
  max-width: none;
  margin-bottom: 7px;
  overflow: hidden;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.verdict-card h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.7vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.analytics-section {
  margin-top: 60px;
}

.analytics-heading {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.analytics-heading h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.analytics-heading > div:first-child > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.chart-filter {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.chart-filter-button {
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.chart-filter-button:hover,
.chart-filter-button:focus-visible {
  color: var(--ink);
  border-color: var(--line);
  outline: none;
}

.chart-filter-button.active {
  color: #11140e;
  background: var(--accent);
  border-color: var(--accent);
}

.chart-filter-summary {
  margin: 0 0 18px;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
}

.chart-load-error {
  margin-bottom: 16px;
  padding: 18px;
  color: var(--danger);
  background: rgba(241, 120, 110, 0.08);
  border: 1px solid rgba(241, 120, 110, 0.4);
  border-radius: 10px;
  font-size: 13px;
}

.chart-dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.chart-dashboard-card {
  grid-column: span 6;
  min-width: 0;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 58%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.chart-dashboard-wide {
  grid-column: span 12;
}

.chart-dashboard-card > header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-dashboard-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.chart-dashboard-card > header > p {
  max-width: 290px;
  margin: 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.chart-canvas-wrap {
  position: relative;
  height: 310px;
  min-width: 0;
}

.chart-canvas-wide {
  height: 350px;
}

.match-section {
  margin-top: 62px;
}

.match-section .table-heading {
  margin-bottom: 18px;
}

footer {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 64px;
  padding: 25px 0 34px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  line-height: 1.5;
}

footer p { margin: 0; }

@media (max-width: 940px) {
  .leaderboard-button {
    grid-template-columns: 56px minmax(200px, 1fr) minmax(135px, 0.65fr);
  }

  .leaderboard-average { display: none; }

  .recent-player {
    grid-template-columns: minmax(205px, 1fr) minmax(155px, 0.75fr) minmax(120px, 0.6fr);
  }

  .metric-grid { grid-template-columns: 1fr 1fr; }

  .metric:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric:nth-child(4) { border-top: 1px solid var(--line); }

  .chart-dashboard-card,
  .chart-dashboard-wide {
    grid-column: span 12;
  }

  .match-row {
    grid-template-columns: minmax(205px, 1.45fr) 0.65fr 0.75fr minmax(105px, 0.7fr);
  }

  .match-stat.duration,
  .match-stat.net-worth { display: none; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 1180px); }

  .profile-page .shell { width: min(100% - 24px, 1400px); }

  .site-header { min-height: 72px; }

  .brand { font-size: 10px; }

  .live-pill { display: none; }

  .hero-copy { padding: 52px 0 34px; }

  h1 { font-size: clamp(2.8rem, 14vw, 4.3rem); }

  .group-overview { gap: 12px; }

  .overview-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 18px 17px;
  }

  .overview-heading > p { text-align: left; }

  .recent-heading { gap: 14px; }

  .leaderboard-button {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 78px;
    padding: 10px 14px;
  }

  .leaderboard-rank { font-size: 1.35rem; }

  .leaderboard-avatar,
  .leaderboard-avatar-placeholder {
    width: 40px;
    height: 40px;
  }

  .leaderboard-total strong { font-size: 1.45rem; }

  .leaderboard-total > span { max-width: 65px; }

  .overview-note { padding: 12px 18px; }

  .recent-meta {
    gap: 5px;
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 18px;
  }

  .recent-player {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    min-height: 94px;
    padding: 10px 18px;
  }

  .recent-player-identity { grid-column: 1; }

  .recent-hero {
    grid-column: 1;
    padding-left: 50px;
  }

  .recent-hero-image {
    width: 28px;
    height: 28px;
  }

  .recent-hero > .recent-hero-image.hero-placeholder {
    width: 28px;
    height: 28px;
  }

  .recent-souls {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .recent-player.did-not-play {
    min-height: 70px;
  }

  .recent-absent { grid-column: 2; }

  .friend-card {
    margin-bottom: 42px;
    padding: 19px 18px 10px;
  }

  .picker-heading,
  .chart-heading,
  .table-heading,
  .player-heading,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .picker-heading > p,
  .chart-heading > p,
  .table-heading > p { text-align: left; }

  .player-heading { gap: 14px; }

  .profile-hero {
    gap: 20px;
    align-items: flex-start;
    flex-direction: column;
    padding: 42px 0 24px;
  }

  .profile-identity {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
  }

  .profile-hero h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
    white-space: normal;
  }

  .profile-subtitle { line-height: 1.5; }

  .profile-error {
    align-items: flex-start;
    flex-direction: column;
  }

  .error-actions { flex-wrap: wrap; }

  .verdict-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px;
  }

  .metric { padding: 20px; }

  .coverage-line { flex-direction: column; }

  .chart-card {
    margin-top: 38px;
    padding: 19px;
  }

  .analytics-section { margin-top: 48px; }

  .analytics-heading {
    gap: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-dashboard-card { padding: 17px; }

  .chart-dashboard-card > header {
    gap: 8px;
    flex-direction: column;
  }

  .chart-dashboard-card > header > p {
    max-width: none;
    text-align: left;
  }

  .chart-canvas-wrap,
  .chart-canvas-wide {
    height: 300px;
  }

  .match-section { margin-top: 48px; }

  .table-heading { gap: 9px; }

  .match-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 84px;
    padding: 0 11px;
  }

  .match-stat { display: none; }

  .soul-result { min-width: 84px; }

  footer { gap: 8px; }
}

@media (max-width: 420px) {
  .leaderboard-identity-copy > span { display: none; }

  .leaderboard-avatar,
  .leaderboard-avatar-placeholder {
    width: 36px;
    height: 36px;
  }

  .metric strong { font-size: 1.85rem; }

  .metric p { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
