:root {
  --strategy-line: rgba(255, 255, 255, .13);
  --action-cooperate: #39b899;
  --action-betray: #ed6e78;
  --action-defend: #75a6f5;
  --action-punish: #edb963;
  --action-sabotage: #bd8dea;
  --action-siege: #ca9b7b;
}

.strategy-shell { max-width: 1500px; }

/* Shared action language -------------------------------------------------- */
.action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #f7fbff;
  font: 760 .67rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .035em;
  white-space: nowrap;
}
.action-badge.action-cooperate { background: #166b58; }
.action-badge.action-betray { background: #9b353e; }
.action-badge.action-defend { background: #315c9e; }
.action-badge.action-punish { background: #9b631d; }
.action-badge.action-sabotage { background: #6d3f96; }
.action-badge.action-siege { background: #70513d; }

.distribution { display: grid; gap: 9px; }
.distribution-row,
.meta-row {
  display: grid;
  grid-template-columns: 102px minmax(90px, 1fr) 70px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}
.distribution-row .action-badge,
.meta-row .action-badge { width: 100%; font-size: .59rem; }
.distribution-row > b,
.meta-row > b {
  display: grid;
  justify-items: end;
  text-align: right;
  font: 760 .75rem/1.05 var(--mono);
}
.distribution-row > b strong,
.meta-row > b strong { font: inherit; }
.distribution-row > b small,
.meta-row > b small { margin-top: 4px; color: var(--dim); font: 500 .55rem var(--mono); }
progress.dist-track {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: #343b44;
}
progress.dist-track::-webkit-progress-bar {
  border-radius: 999px;
  background: #343b44;
}
progress.dist-track::-webkit-progress-value { border-radius: 999px; }
progress.dist-track::-moz-progress-bar { border-radius: 999px; }
.distribution-row.action-cooperate progress.dist-track::-webkit-progress-value,
.meta-row.action-cooperate progress.dist-track::-webkit-progress-value { background: #39b899; }
.distribution-row.action-betray progress.dist-track::-webkit-progress-value,
.meta-row.action-betray progress.dist-track::-webkit-progress-value { background: #ed6e78; }
.distribution-row.action-defend progress.dist-track::-webkit-progress-value,
.meta-row.action-defend progress.dist-track::-webkit-progress-value { background: #75a6f5; }
.distribution-row.action-punish progress.dist-track::-webkit-progress-value,
.meta-row.action-punish progress.dist-track::-webkit-progress-value { background: #edb963; }
.distribution-row.action-sabotage progress.dist-track::-webkit-progress-value,
.meta-row.action-sabotage progress.dist-track::-webkit-progress-value { background: #bd8dea; }
.distribution-row.action-siege progress.dist-track::-webkit-progress-value,
.meta-row.action-siege progress.dist-track::-webkit-progress-value { background: #ca9b7b; }
.distribution-row.action-cooperate progress.dist-track::-moz-progress-bar,
.meta-row.action-cooperate progress.dist-track::-moz-progress-bar { background: #39b899; }
.distribution-row.action-betray progress.dist-track::-moz-progress-bar,
.meta-row.action-betray progress.dist-track::-moz-progress-bar { background: #ed6e78; }
.distribution-row.action-defend progress.dist-track::-moz-progress-bar,
.meta-row.action-defend progress.dist-track::-moz-progress-bar { background: #75a6f5; }
.distribution-row.action-punish progress.dist-track::-moz-progress-bar,
.meta-row.action-punish progress.dist-track::-moz-progress-bar { background: #edb963; }
.distribution-row.action-sabotage progress.dist-track::-moz-progress-bar,
.meta-row.action-sabotage progress.dist-track::-moz-progress-bar { background: #bd8dea; }
.distribution-row.action-siege progress.dist-track::-moz-progress-bar,
.meta-row.action-siege progress.dist-track::-moz-progress-bar { background: #ca9b7b; }

/* Main arena: original Axelrod information in the Reversi broadcast frame. */
.axelrod-arena-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1.55fr) minmax(390px, .75fr);
  gap: 18px;
}
.strategy-live-panel,
.strategy-leaderboard-panel { min-width: 0; }
.live-heading-actions { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; justify-content: flex-end; }
.axelrod-broadcast-body {
  min-height: 650px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  align-items: start;
  gap: 26px;
}
.strategy-detail {
  min-width: 0;
  min-height: 600px;
  display: grid;
  align-content: start;
  gap: 22px;
}
.strategy-empty {
  min-height: 560px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.015);
}

.strategy-match-sidebar {
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.strategy-sidebar-head {
  min-height: 52px;
  margin-bottom: 14px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.strategy-sidebar-head h2 { margin: 0; }
.sidebar-count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 720 .65rem var(--mono);
}
.strategy-match-list {
  max-height: 550px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 3px;
}
.strategy-match-card {
  width: 100%;
  padding: 12px;
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.strategy-match-card:hover,
.strategy-match-card.selected {
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}
.strategy-match-card.selected { box-shadow: inset 2px 0 0 var(--text); }
.match-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim);
  font: 650 .57rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.match-card-names {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  font-size: .72rem;
}
.match-card-names strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-card-names strong:last-child { text-align: right; }
.match-card-names em,
.match-card-score em,
.match-card-last em { color: var(--dim); font-style: normal; font-weight: 500; }
.match-card-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  color: var(--text);
  font: 780 1.45rem var(--mono);
  font-variant-numeric: tabular-nums;
}
.match-card-last {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.match-card-last .action-badge { max-width: 95px; overflow: hidden; text-overflow: ellipsis; font-size: .5rem; }
.match-card-last small { color: var(--dim); font-size: .61rem; }

.strategy-scoreboard {
  min-width: 0;
  padding: clamp(20px, 2.4vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  border: 1px solid var(--strategy-line);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.strategy-scoreboard > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.strategy-scoreboard > div:last-child { text-align: right; }
.strategy-scoreboard > div small {
  color: var(--muted);
  font-size: clamp(.8rem, 1.2vw, .98rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.strategy-scoreboard > div strong {
  font: 800 clamp(2.7rem, 5vw, 5.2rem)/.95 var(--mono);
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.strategy-scoreboard > span {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  white-space: nowrap;
}
.strategy-scoreboard > span small {
  color: var(--dim);
  font: 700 .58rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.strategy-scoreboard > span strong { color: var(--muted); font: 760 .82rem var(--mono); }

.strategy-latest {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--strategy-line);
  border-radius: 9px;
}
.strategy-latest-label {
  color: var(--dim);
  font: 700 .58rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.strategy-latest > div {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.strategy-latest em { color: var(--dim); font-style: normal; }
.strategy-latest b { font-family: var(--mono); }

.strategy-distributions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.strategy-distributions section { min-width: 0; }
.strategy-distributions h3 {
  margin: 0 0 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategy-rounds-heading {
  margin-bottom: -10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.strategy-rounds-heading h3 { margin: 0; }
.strategy-rounds-heading small { color: var(--dim); font: .6rem var(--mono); text-transform: uppercase; }
.strategy-rounds {
  display: grid;
  gap: 5px;
  max-height: 245px;
  overflow: auto;
}
.strategy-round-row {
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 42px minmax(86px, 1fr) 38px 14px 38px minmax(86px, 1fr) 92px;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  background: rgba(255,255,255,.035);
  font-size: .75rem;
}
.strategy-round-row > span:first-child { color: var(--dim); font-family: var(--mono); }
.strategy-round-row > b { text-align: center; font-family: var(--mono); }
.strategy-round-row > em { color: var(--dim); font-style: normal; text-align: center; }
.strategy-round-row > small { color: var(--muted); text-align: right; font-family: var(--mono); }
.strategy-round-row .action-badge { justify-self: stretch; font-size: .54rem; }

/* Compact leaderboard, preserving the original Axelrod metrics. */
.axel-leaderboard-head,
.axel-leaderboard-row {
  display: grid;
  grid-template-columns: 32px minmax(145px, 1fr) 76px 82px;
  align-items: center;
  gap: 9px;
}
.axel-leaderboard-head {
  padding: 10px 14px;
  color: var(--dim);
  font: 650 .58rem var(--mono);
  text-transform: uppercase;
}
.axel-leaderboard-head > :nth-child(3),
.axel-leaderboard-head > :nth-child(4) { text-align: right; }
.axel-leaderboard-body { max-height: 650px; overflow: auto; }
.axel-leaderboard-row {
  min-height: 58px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: .76rem;
}
.axel-leaderboard-row.top-three { background: var(--panel-2); }
.rank { color: var(--dim); font-family: var(--mono); }
.bot-cell { min-width: 0; }
.bot-cell strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-cell small { margin-top: 3px; display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: .58rem; white-space: nowrap; }
.compact-ppr { text-align: right; font: 760 .92rem var(--mono); }
.compact-arena-points { text-align: right; font-family: var(--mono); }
.compact-arena-points strong { display: block; font-size: .86rem; }
.compact-arena-points small { display: block; color: var(--dim); font-size: .52rem; }

/* Lower panels ----------------------------------------------------------- */
.strategy-lower-grid { align-items: start; }
.strategy-rules-body { padding: 22px 24px 25px; }
.strategy-rules-body p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.strategy-rules-body p + p { margin-top: 14px; }
.strategy-recent { color: inherit; text-decoration: none; }
.strategy-recent:hover { background: rgba(255,255,255,.045); }
.strategy-recent .recent-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font: 740 .76rem var(--mono);
}
.strategy-recent .recent-score em { color: var(--dim); font-style: normal; }
.strategy-recent-panel .recent-row {
  grid-template-columns: 52px minmax(200px, 1fr) 116px minmax(120px, .65fr) 110px;
}

/* Existing secondary pages, with more breathing room. ------------------- */
.strategy-panel { padding: 26px; margin-bottom: 22px; }
.strategy-panel > .panel-heading { margin: -26px -26px 26px; }
.strategy-panel p { line-height: 1.65; color: var(--muted); }
.strategy-panel > h2 { margin-top: 30px; margin-bottom: 16px; }

.payoff-table { border-collapse: collapse; width: 100%; min-width: 720px; font-variant-numeric: tabular-nums; }
.payoff-table th, .payoff-table td { padding: .72rem; text-align: center; border: 1px solid var(--strategy-line); }
.payoff-table th { background: rgba(255,255,255,.06); }
.payoff-scroll { overflow: auto; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.meta-row { margin: 9px 0; }
.replay-controls {
  margin: 22px 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
}
.replay-controls input { min-width: 0; }
.big-leaderboard { overflow-x: auto; }

@media (max-width: 1240px) {
  .axelrod-arena-grid { grid-template-columns: 1fr; }
  .axel-leaderboard-body { max-height: 430px; }
}

@media (max-width: 900px) {
  .axelrod-broadcast-body { grid-template-columns: 1fr; min-height: auto; }
  .strategy-match-sidebar { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .strategy-match-list { max-height: 300px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strategy-detail { min-height: 0; }
  .strategy-empty { min-height: 260px; }
  .strategy-distributions, .meta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .strategy-recent-panel .recent-row { grid-template-columns: 42px minmax(150px, 1fr) 98px; }
  .strategy-recent-panel .recent-row > :nth-child(4),
  .strategy-recent-panel .recent-row > :nth-child(5) { display: none; }
  .big-leaderboard-head, .big-leaderboard-row { grid-template-columns: 50px 180px 90px 140px 95px 100px 100px; min-width: 800px; }
  .big-leaderboard-head > :nth-child(3), .big-leaderboard-head > :nth-child(4),
  .big-leaderboard-row > :nth-child(3), .big-leaderboard-row > :nth-child(4) { display: block; }
}

@media (max-width: 680px) {
  .axelrod-broadcast-body { padding: 18px; }
  .live-heading-actions { align-items: flex-end; flex-direction: column; gap: 6px; }
  .strategy-scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .strategy-scoreboard > span { grid-column: 1 / -1; grid-row: 2; }
  .strategy-scoreboard > div:last-child { text-align: right; }
  .strategy-latest { grid-template-columns: 1fr; gap: 8px; }
  .strategy-latest > div { justify-content: flex-start; }
  .strategy-match-list { grid-template-columns: 1fr; }
  .strategy-round-row { grid-template-columns: 38px minmax(78px, 1fr) 28px 12px 28px minmax(78px, 1fr); }
  .strategy-round-row > small { display: none; }
  .distribution-row, .meta-row { grid-template-columns: 94px minmax(70px, 1fr) 62px; gap: 9px; }
  .axel-leaderboard-head, .axel-leaderboard-row { grid-template-columns: 28px minmax(120px, 1fr) 64px 72px; gap: 7px; padding-left: 10px; padding-right: 10px; }
  .bot-cell small { overflow: hidden; text-overflow: ellipsis; }
  .strategy-panel { padding: 20px; }
  .strategy-panel > .panel-heading { margin: -20px -20px 22px; }
}

@media (max-width: 430px) {
  .axelrod-broadcast-body { padding: 14px; }
  .strategy-scoreboard { padding: 17px; }
  .strategy-scoreboard > div strong { font-size: clamp(2.35rem, 13vw, 3.5rem); }
  .strategy-recent-panel .recent-row { grid-template-columns: 38px minmax(120px, 1fr) 90px; gap: 7px; padding-left: 12px; padding-right: 12px; }
  .strategy-recent .recent-score { gap: 5px; }
  .strategy-round-row { font-size: .69rem; }
}

#replay-current {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
#replay-current b { font-family: var(--mono); }

/* 2026-09-29 UI pass ----------------------------------------------------- */
/* Home: completed results are the stable spectator view. */
.home-arena-grid {
  grid-template-columns: minmax(720px, 1.35fr) minmax(500px, .9fr);
  align-items: start;
}
.strategy-results-panel { min-width: 0; }
.bot-result-grid {
  min-height: 510px;
  max-height: 650px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  overflow: auto;
}
.home-results-empty { grid-column: 1 / -1; min-height: 470px; }
.bot-result-card {
  min-width: 0;
  min-height: 168px;
  padding: 17px 18px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.018);
  color: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.bot-result-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  transform: translateY(-1px);
}
.bot-result-card.result-win { box-shadow: inset 3px 0 0 #d9d9d9; }
.bot-result-card.result-loss { box-shadow: inset 3px 0 0 #595959; }
.bot-result-card.result-draw { box-shadow: inset 3px 0 0 #8a8a8a; }
.bot-result-card.result-void { border-style: dashed; }
.bot-result-top,
.bot-result-meta,
.bot-result-opponent,
.bot-result-name {
  min-width: 0;
  display: flex;
  align-items: center;
}
.bot-result-top { justify-content: space-between; gap: 12px; }
.bot-result-name { gap: 8px; }
.bot-result-name strong,
.bot-result-opponent strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-result-name strong { font-size: .84rem; }
.bot-result-opponent { gap: 7px; color: var(--muted); font-size: .72rem; }
.bot-result-opponent > span { color: var(--dim); font: 650 .58rem var(--mono); text-transform: uppercase; }
.result-pill {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 700 .56rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.result-win .result-pill { color: var(--text); border-color: #686868; }
.bot-result-score {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font: 790 clamp(1.55rem, 2.1vw, 2.35rem)/1 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}
.bot-result-score strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bot-result-score strong:last-child { text-align: right; }
.bot-result-score em { color: var(--dim); font-style: normal; font-size: .65em; }
.bot-result-meta {
  justify-content: space-between;
  gap: 10px;
  color: var(--dim);
  font: 600 .55rem var(--mono);
  text-transform: uppercase;
}

/* Home leaderboard uses one shared grid for header and rows. */
.axel-leaderboard-head,
.axel-leaderboard-row {
  grid-template-columns: 30px minmax(155px, 1fr) 72px 72px 76px 78px;
  gap: 8px;
}
.axel-leaderboard-head { padding: 10px 12px; }
.axel-leaderboard-row { padding: 11px 12px; }
.axel-leaderboard-head > :nth-child(n+3),
.axel-leaderboard-row > :nth-child(n+3) {
  justify-self: stretch;
  text-align: center;
}
.axel-leaderboard-head > :nth-child(6),
.axel-leaderboard-row > :nth-child(6) { text-align: right; }
.compact-ppr { text-align: center; }
.compact-presence { color: var(--muted); font: 680 .66rem var(--mono); }
.compact-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  font: 650 .57rem var(--mono);
  text-transform: uppercase;
}
.compact-arena-points { text-align: right; }
.status-dot.offline { background: #555; }

/* Home ongoing activity: names only, no round-by-round noise. */
.arena-activity-summary {
  padding: 16px 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.arena-activity-summary strong { font: 740 .74rem var(--mono); }
.arena-activity-summary span { color: var(--dim); font-size: .68rem; text-align: right; }
.home-live-list {
  max-height: 310px;
  padding: 10px;
  display: grid;
  gap: 6px;
  overflow: auto;
}
.home-live-row {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}
.home-live-row:hover { border-color: var(--line); background: var(--panel-2); }
.home-live-pair {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  font-size: .74rem;
}
.home-live-pair strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-live-pair strong:last-child { text-align: right; }
.home-live-pair em { color: var(--dim); font-style: normal; }
.home-live-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font: 650 .56rem var(--mono);
  text-transform: uppercase;
}

/* Connect page spacing and payoff action language. */
.connect-intro-panel > h1 { margin-bottom: 22px; }
.connect-intro-panel > p { margin-bottom: 22px; }
.connect-intro-panel .download-row { margin: 4px 0 24px; gap: 12px; }
.connect-intro-panel pre { margin: 16px 0 24px; padding: 18px; line-height: 1.7; }
.connect-intro-panel > p:last-child { margin-bottom: 0; }
.payoff-table th.payoff-corner { background: rgba(255,255,255,.045); color: var(--muted); }
.payoff-action-header {
  color: #f7fbff;
  font: 760 .65rem var(--mono);
  letter-spacing: .025em;
}
.payoff-action-header.action-cooperate { background: #166b58; }
.payoff-action-header.action-betray { background: #9b353e; }
.payoff-action-header.action-defend { background: #315c9e; }
.payoff-action-header.action-punish { background: #9b631d; }
.payoff-action-header.action-sabotage { background: #6d3f96; }
.payoff-action-header.action-siege { background: #70513d; }
.payoff-cell { background: rgba(255,255,255,.018); }

/* Replay: give each region room, fix range endpoint padding, keep scores inside. */
.replay-shell { max-width: 1400px; }
.replay-panel { padding: 34px; }
.replay-panel > .panel-heading { margin: -34px -34px 30px; }
.replay-meta { margin-bottom: 24px; }
.replay-scoreboard { margin-bottom: 22px; }
.strategy-scoreboard > div strong {
  max-width: 100%;
  font-size: clamp(2.25rem, 4vw, 3.8rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.replay-controls { margin: 0 0 22px; padding: 18px 20px; }
.replay-controls input[type="range"] {
  min-width: 0;
  width: 100%;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #d6d6d6;
}
.replay-controls input[type="range"]:focus { box-shadow: none; }
.replay-current { margin-bottom: 28px; }
.replay-distributions { gap: 22px; margin-bottom: 32px; }
.replay-distribution-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.018);
}
.replay-distribution-card h2 {
  margin: 0 0 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.replay-rounds-heading { margin: 0 0 14px; }
.replay-rounds { max-height: 360px; padding-right: 4px; }

@media (max-width: 1240px) {
  .home-arena-grid { grid-template-columns: 1fr; }
  .bot-result-grid { min-height: 0; max-height: 620px; }
  .home-results-empty { min-height: 260px; }
}

@media (max-width: 820px) {
  .bot-result-grid { grid-template-columns: 1fr; padding: 14px; }
  .axel-leaderboard-head,
  .axel-leaderboard-row { grid-template-columns: 28px minmax(130px, 1fr) 64px 62px 70px 70px; min-width: 510px; }
  .axel-leaderboard-body { overflow-x: auto; }
  .arena-activity-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
  .arena-activity-summary span { text-align: left; }
  .replay-panel { padding: 22px; }
  .replay-panel > .panel-heading { margin: -22px -22px 24px; }
}

@media (max-width: 560px) {
  .home-live-row { grid-template-columns: 1fr; gap: 6px; }
  .home-live-state { justify-self: start; }
  .replay-distribution-card { padding: 15px; }
}
