:root {
  color-scheme: dark;
  --bg: #0d0f0c;
  --bg-2: #14160f;
  --surface: rgba(27, 29, 22, 0.92);
  --surface-solid: #1b1d16;
  --surface-2: rgba(39, 42, 31, 0.9);
  --surface-3: #24281e;
  --line: rgba(215, 185, 118, 0.18);
  --line-strong: rgba(215, 185, 118, 0.34);
  --text: #f2ecd9;
  --muted: #aaa28e;
  --muted-2: #7e7768;
  --gold: #d8aa4c;
  --gold-soft: rgba(216, 170, 76, 0.16);
  --green: #79c98c;
  --red: #da6d5f;
  --blue: #6f91d8;
  --axis: #c96a55;
  --allies: #6f91d8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(216, 170, 76, 0.16), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(111, 145, 216, 0.12), transparent 26%),
    linear-gradient(145deg, #0a0b08 0%, #14170f 46%, #0d0f0c 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  isolation: isolate;
}

body.booted .topbar,
body.booted .front-ticker,
body.booted .metrics,
body.booted .gamestate-panel,
body.booted .honor-board,
body.booted .intel-panel,
body.booted .controls,
body.booted .layout {
  animation: commandDeckIn 0.72s ease both;
}

body.booted .front-ticker { animation-delay: 0.05s; }
body.booted .metrics { animation-delay: 0.1s; }
body.booted .gamestate-panel { animation-delay: 0.15s; }
body.booted .honor-board { animation-delay: 0.2s; }
body.booted .intel-panel { animation-delay: 0.24s; }
body.booted .controls { animation-delay: 0.28s; }
body.booted .layout { animation-delay: 0.32s; }

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 82%);
  animation: gridDrift 28s linear infinite;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(216, 170, 76, 0.055) 42% 43%, transparent 43% 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 12px);
  pointer-events: none;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.34;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(0, 0, 0, 0.45) 0 1px, transparent 1px);
  background-position: 0 0, 9px 11px;
  background-size: 18px 18px;
  mix-blend-mode: overlay;
  animation: noiseCrawl 1.8s steps(2, end) infinite;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  outline: none;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(216, 170, 76, 0.85);
  outline-offset: 3px;
}

.shell {
  width: min(1520px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.topbar,
.controls,
.metrics,
.layout,
.panel-head,
.player-row,
.squad-head,
.commander {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(216, 170, 76, 0.22), rgba(216, 170, 76, 0.04)),
    var(--surface-solid);
  box-shadow: inset 0 0 0 8px rgba(0, 0, 0, 0.18), var(--shadow);
  color: var(--gold);
  font-weight: 950;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
}

h3 {
  letter-spacing: -0.02em;
}

.hero-copy {
  max-width: 720px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.status-card {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)), var(--surface);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.status-dot::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 16px currentColor;
}

.status-dot.ok {
  color: var(--green);
  border-color: rgba(117, 197, 138, 0.45);
}

.status-dot.fail {
  color: var(--red);
  border-color: rgba(216, 111, 95, 0.45);
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metrics article,
.gamestate-panel,
.honor-board,
.panel,
.intel-panel,
.controls {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--surface);
  box-shadow: var(--shadow);
}

.metrics article::before,
.gamestate-panel::before,
.honor-board::before,
.panel::before,
.intel-panel::before,
.controls::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(216, 170, 76, 0.16), transparent 28%, transparent 70%, rgba(255, 255, 255, 0.04));
  opacity: 0.54;
}

.metrics article {
  padding: 18px;
}

.metrics span,
label,
.muted,
.sub {
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.battle-ambience {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.flare,
.tracer {
  position: absolute;
  display: block;
  pointer-events: none;
}

.flare {
  width: 28vw;
  height: 28vw;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.18;
  animation: flarePulse 9s ease-in-out infinite;
}

.flare-a {
  left: -8vw;
  top: 18vh;
  background: rgba(216, 170, 76, 0.44);
}

.flare-b {
  right: -10vw;
  bottom: 4vh;
  background: rgba(111, 145, 216, 0.34);
  animation-delay: -4s;
}

.tracer {
  left: -18vw;
  width: 16vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 170, 76, 0.88), transparent);
  box-shadow: 0 0 18px rgba(216, 170, 76, 0.45);
  opacity: 0;
  transform: rotate(-11deg);
  animation: tracerFlight 7s linear infinite;
}

.tracer-a { top: 18vh; animation-delay: 0.8s; }
.tracer-b { top: 41vh; animation-delay: 3.1s; }
.tracer-c { top: 72vh; animation-delay: 5.5s; }

.front-ticker {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: var(--shadow);
}

.front-ticker div {
  display: flex;
  gap: 24px;
  width: max-content;
  min-width: 100%;
  padding: 10px 16px;
  animation: tickerMarch 34s linear infinite;
}

.front-ticker span {
  position: relative;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.front-ticker span::before {
  content: "◆";
  margin-right: 10px;
  color: var(--gold);
  font-size: 9px;
}

.intel-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.intel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.intel-head > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

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

.intel-grid details {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.intel-grid details::after {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-100%);
  animation: panelSweep 4.6s ease-in-out infinite;
  opacity: 0.4;
}

.intel-grid summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 950;
  list-style: none;
}

.intel-grid summary::-webkit-details-marker {
  display: none;
}

.intel-grid summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-right: 8px;
  border: 1px solid rgba(216, 170, 76, 0.38);
  border-radius: 50%;
  color: var(--gold);
  font-size: 12px;
}

.intel-grid details[open] summary::before {
  content: "−";
}

.intel-grid p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.intel-grid code {
  border: 1px solid rgba(216, 170, 76, 0.24);
  border-radius: 6px;
  padding: 1px 5px;
  background: rgba(216, 170, 76, 0.1);
  color: var(--text);
}

.controls {
  grid-template-columns: auto 180px minmax(220px, 1fr) auto;
  align-items: end;
  padding: 14px;
  margin-bottom: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.segmented button,
.primary,
select,
input {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.segmented button {
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 15px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 850;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active,
.primary {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent),
    var(--gold);
  color: #17140d;
  font-weight: 950;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

select,
input,
.primary {
  border-radius: 12px;
  padding: 0 12px;
}

input::placeholder {
  color: var(--muted-2);
}

.primary {
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.primary:disabled {
  cursor: wait;
  filter: saturate(0.6);
  opacity: 0.72;
}

.gamestate-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  margin-bottom: 18px;
}

.gamestate-main,
.frontline-score,
.gamestate-meta {
  display: grid;
  gap: 14px;
}

.gamestate-main {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.gamestate-main h2 {
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.gamestate-time {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.gamestate-time strong {
  color: var(--gold);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.gamestate-time span,
.team-state span,
.team-state small,
.gamestate-meta span,
.war-score span,
.war-score small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.frontline-score {
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) minmax(0, 1fr);
  align-items: stretch;
}

.team-state,
.war-score {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.team-state {
  position: relative;
}

.team-state::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  content: "";
  opacity: 0.78;
}

.team-state.allies::after {
  background: var(--allies);
}

.team-state.axis::after {
  background: var(--axis);
}

.team-state.leading {
  border-color: rgba(216, 170, 76, 0.56);
  background: rgba(216, 170, 76, 0.09);
}

.team-state strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.war-score {
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle, rgba(216, 170, 76, 0.16), transparent 68%),
    rgba(0, 0, 0, 0.24);
}

.war-score strong {
  color: var(--gold);
  font-size: 40px;
  line-height: 1;
}

.sector-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.sector {
  min-height: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.sector i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent);
}

.sector.allies {
  background: linear-gradient(145deg, rgba(111, 145, 216, 0.96), rgba(55, 80, 142, 0.84));
}

.sector.axis {
  background: linear-gradient(145deg, rgba(201, 106, 85, 0.96), rgba(124, 52, 42, 0.86));
}

.gamestate-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gamestate-meta span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(0, 0, 0, 0.16);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.honor-board {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.honor-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.honor-head > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

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

.award-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.award-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 170, 76, 0.36);
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 18px;
  font-weight: 950;
}

.award-body {
  min-width: 0;
}

.award-body span,
.award-body small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.award-body strong {
  display: block;
  overflow: hidden;
  margin: 2px 0;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.award-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-3);
}

.layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.65fr);
  align-items: start;
}

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

.history-mode .teams {
  display: none;
}

.panel {
  min-width: 0;
}

.panel-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.history-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-pager button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.history-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.history-pager span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.players-list,
.teams-view,
.history-list {
  display: grid;
}

.match-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.match-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.match-hero.winner-allies {
  border-color: rgba(111, 145, 216, 0.42);
}

.match-hero.winner-axis {
  border-color: rgba(201, 106, 85, 0.44);
}

.match-score {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.match-score strong {
  color: var(--gold);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.match-score span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.match-grid,
.match-leaders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.match-leaders {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.match-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
}

.match-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.muted-card {
  opacity: 0.72;
}

.player-item {
  position: relative;
}

.player-item.top-rank {
  background: linear-gradient(90deg, rgba(216, 170, 76, 0.08), transparent 58%);
}

.player-row {
  grid-template-columns: 56px minmax(220px, 1fr) repeat(6, minmax(72px, 0.12fr)) 76px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(215, 185, 118, 0.12);
}

.player-row:hover {
  background: rgba(216, 170, 76, 0.05);
}

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

.rank-badge {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--gold);
  font-weight: 950;
}

.rank-badge span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 170, 76, 0.34);
  border-radius: 50%;
  background: rgba(216, 170, 76, 0.12);
}

.rank-badge small {
  color: var(--muted);
  font-size: 10px;
}

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

.avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--surface-3);
  object-fit: cover;
  flex: 0 0 auto;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-weight: 950;
}

.player-copy {
  min-width: 0;
  width: 100%;
}

.name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.clan-tag,
.team-chip,
.map-mode {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.team-chip.allies,
.winner-allies .map-score span {
  color: #9bb7ff;
  border-color: rgba(111, 145, 216, 0.44);
}

.team-chip.axis,
.winner-axis .map-score span {
  color: #ffad9f;
  border-color: rgba(201, 106, 85, 0.44);
}

.sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scorebar {
  overflow: hidden;
  width: min(100%, 280px);
  height: 5px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.scorebar span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), rgba(216, 170, 76, 0.38));
}

.stat {
  min-width: 0;
  text-align: right;
}

.stat b {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat.accent b,
.stat.good b {
  color: var(--green);
}

.stat.warn b {
  color: var(--red);
}

.stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-cell {
  display: flex;
  justify-content: flex-end;
}

.profile-button {
  min-height: 34px;
  border: 1px solid rgba(216, 170, 76, 0.44);
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(216, 170, 76, 0.12);
  color: var(--gold);
  cursor: pointer;
  font-weight: 900;
}

.profile-button:hover {
  background: rgba(216, 170, 76, 0.22);
}

.profile-panel {
  padding: 18px;
  border-bottom: 1px solid rgba(215, 185, 118, 0.12);
  background: rgba(0, 0, 0, 0.16);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  object-fit: cover;
  background: var(--surface-3);
  flex: 0 0 auto;
}

.profile-title {
  margin-bottom: 7px;
  font-size: 22px;
  font-weight: 950;
}

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

.profile-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(216, 170, 76, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
}

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

.profile-current-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.profile-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(0, 0, 0, 0.18);
}

.profile-metric strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-metric span,
.profile-names span {
  color: var(--muted);
  font-size: 12px;
}

.profile-note {
  margin-top: 10px;
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
}

.profile-note.good {
  background: rgba(117, 197, 138, 0.1);
  color: var(--green);
}

.profile-note.warn {
  background: rgba(216, 170, 76, 0.12);
  color: var(--gold);
}

.profile-names {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  border-top: 1px solid rgba(215, 185, 118, 0.14);
  padding-top: 12px;
}

.profile-names strong {
  font-size: 13px;
}

.longterm-profile {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border-top: 1px solid rgba(215, 185, 118, 0.14);
  padding-top: 14px;
}

.longterm-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.longterm-head h3 {
  font-size: 23px;
}

.duel-card {
  min-width: 136px;
  border: 1px solid rgba(216, 170, 76, 0.48);
  border-radius: 14px;
  padding: 12px;
  background: rgba(216, 170, 76, 0.12);
  text-align: right;
}

.duel-card strong {
  display: block;
  color: var(--gold);
  font-size: 36px;
  line-height: 1;
}

.duel-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.longterm-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.style-bars,
.longterm-columns {
  display: grid;
  gap: 10px;
}

.style-bars {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.style-bar,
.bucket-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(0, 0, 0, 0.18);
}

.style-bar div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.style-bar strong {
  color: var(--text);
}

.style-bar i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--value), rgba(255, 255, 255, 0.08) var(--value));
}

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

.bucket-card {
  display: grid;
  gap: 8px;
}

.bucket-card > strong {
  font-size: 13px;
}

.bucket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.bucket-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bucket-row b {
  color: var(--text);
  white-space: nowrap;
}

.side {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.side:last-child {
  border-bottom: 0;
}

.side-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.side-title strong {
  font-size: 21px;
}

.side-allies .side-title strong {
  color: #9bb7ff;
}

.side-axis .side-title strong {
  color: #ffad9f;
}

.commander {
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background:
    linear-gradient(90deg, rgba(216, 170, 76, 0.11), transparent),
    rgba(0, 0, 0, 0.18);
}

.empty-commander {
  opacity: 0.72;
}

.squad {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.1);
}

.squad-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.025);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(216, 170, 76, 0.14);
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.team-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(215, 185, 118, 0.11);
}

.hidden {
  display: none !important;
}

.map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid rgba(215, 185, 118, 0.12);
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.map-row:hover,
.map-row.selected {
  background: rgba(216, 170, 76, 0.08);
}

.map-score {
  display: grid;
  justify-items: end;
  align-content: center;
}

.map-score strong {
  font-size: 24px;
}

.map-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.empty,
.error {
  padding: 24px 18px;
  color: var(--muted);
}

.error {
  color: var(--red);
}

.updated-flash {
  animation: fieldPing 0.8s ease;
}

.player-item,
.award-card,
.map-row,
.squad,
.match-card,
.team-player {
  animation: rowDeploy 0.48s ease both;
  animation-delay: var(--stagger, 0ms);
}

.scorebar span,
.style-bar i,
.duel-fill span,
.duel-component-bar span {
  animation: barAdvance 0.9s ease both;
  transform-origin: left center;
}

.status-dot.ok::before {
  animation: livePulse 1.45s ease-in-out infinite;
}

.team-state.leading::before,
.rank-badge span::after {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.rank-badge span {
  position: relative;
}

.rank-badge span::after {
  border: 1px solid rgba(216, 170, 76, 0.24);
  animation: badgePing 2.4s ease-out infinite;
}

@keyframes commandDeckIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 46px 46px, 46px 46px; }
}

@keyframes noiseCrawl {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-9px, 5px, 0); }
  100% { transform: translate3d(7px, -6px, 0); }
}

@keyframes flarePulse {
  0%, 100% { transform: scale(0.9); opacity: 0.12; }
  50% { transform: scale(1.16); opacity: 0.24; }
}

@keyframes tracerFlight {
  0%, 28% { opacity: 0; transform: translateX(0) rotate(-11deg); }
  31% { opacity: 0.85; }
  45% { opacity: 0; transform: translateX(138vw) rotate(-11deg); }
  100% { opacity: 0; transform: translateX(138vw) rotate(-11deg); }
}

@keyframes tickerMarch {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes panelSweep {
  0%, 54% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes rowDeploy {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes barAdvance {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.45); opacity: 1; }
}

@keyframes badgePing {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes fieldPing {
  0% { box-shadow: var(--shadow); }
  45% { box-shadow: 0 0 0 1px rgba(216, 170, 76, 0.3), 0 0 34px rgba(216, 170, 76, 0.2), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}

@keyframes duelSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@media (max-width: 1180px) {
  .award-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-row {
    grid-template-columns: 52px minmax(180px, 1fr) repeat(3, minmax(70px, 0.12fr)) 74px;
  }

  .player-row .optional {
    display: none;
  }
}

@media (max-width: 980px) {
  .topbar,
  .controls,
  .layout,
  .metrics,
  .intel-grid,
  .gamestate-main,
  .frontline-score,
  .gamestate-meta {
    grid-template-columns: 1fr;
  }

  .status-card,
  .gamestate-time {
    justify-items: start;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
  }

  .player-row {
    grid-template-columns: 44px minmax(0, 1fr) repeat(2, 72px) 70px;
  }

  .player-row .optional,
  .player-row .mobile-hide {
    display: none;
  }

  .profile-grid,
  .profile-current-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .longterm-head,
  .longterm-metrics,
  .style-bars,
  .longterm-columns {
    grid-template-columns: 1fr;
  }

  .duel-card {
    text-align: left;
  }

  .match-hero,
  .match-grid,
  .match-leaders {
    grid-template-columns: 1fr;
  }

  .match-score {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100vw - 20px, 1480px);
    padding: 20px 0 32px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    display: none;
  }

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

  .honor-head,
  .intel-head,
  .side-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-row {
    grid-template-columns: 36px minmax(0, 1fr) 64px 66px;
    gap: 10px;
    padding: 13px 12px;
  }

  .player-row .mobile-hide,
  .player-row .optional,
  .profile-cell {
    display: none;
  }

  .rank-badge span {
    width: 30px;
    height: 30px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .profile-grid,
  .profile-current-grid {
    grid-template-columns: 1fr;
  }

  .map-row {
    grid-template-columns: 1fr;
  }

  .map-score {
    justify-items: start;
  }
}

/* Zweite Ausbaustufe: mehr Frontbericht, Bewegung und Wert-Erklärungen. */
.page-vignette,
.radio-scan,
.ambient-smoke {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-vignette {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 18%, transparent 0 38%, rgba(0, 0, 0, 0.28) 66%, rgba(0, 0, 0, 0.64) 100%),
    linear-gradient(180deg, rgba(216, 170, 76, 0.03), transparent 28%, rgba(0, 0, 0, 0.18));
}

.radio-scan {
  z-index: 0;
  opacity: 0.16;
  mix-blend-mode: screen;
  background: linear-gradient(180deg, transparent 0 46%, rgba(216, 170, 76, 0.24) 49%, transparent 52% 100%);
  background-size: 100% 260px;
  animation: radioScan 7s linear infinite;
}

.ambient-smoke {
  z-index: -2;
  filter: blur(24px);
  opacity: 0.22;
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
}

.smoke-a {
  background: radial-gradient(circle at 16% 68%, rgba(216, 170, 76, 0.2), transparent 32%);
  animation: smokeDriftA 18s ease-in-out infinite alternate;
}

.smoke-b {
  background: radial-gradient(circle at 82% 34%, rgba(111, 145, 216, 0.16), transparent 34%);
  animation: smokeDriftB 22s ease-in-out infinite alternate;
}

.shell,
.topbar,
.front-intel,
.metrics,
.gamestate-panel,
.honor-board,
.layout {
  position: relative;
  z-index: 1;
}

.brand-mark {
  position: relative;
  isolation: isolate;
  animation: emblemBreathe 4.8s ease-in-out infinite;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: 50%;
  content: "";
  opacity: 0.56;
}

.brand-mark::before {
  border: 1px dashed rgba(216, 170, 76, 0.28);
  animation: slowRotate 18s linear infinite;
}

.brand-mark::after {
  background: radial-gradient(circle, rgba(216, 170, 76, 0.18), transparent 66%);
  animation: softPulse 2.8s ease-in-out infinite;
}

.front-intel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(216, 170, 76, 0.12), transparent 42%, rgba(111, 145, 216, 0.08)),
    rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow);
  animation: fadeUp 640ms ease both;
}

.front-intel::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 0 38%, rgba(255, 255, 255, 0.1) 48%, transparent 58% 100%);
  transform: translateX(-120%);
  animation: tacticalSweep 6.5s ease-in-out infinite;
}

.front-intel-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.front-intel-copy strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.front-intel-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-dish {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(216, 170, 76, 0.34);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(216, 170, 76, 0.22) 0 1px, transparent 1px 11px),
    rgba(0, 0, 0, 0.22);
}

.radar-dish span {
  position: absolute;
  inset: 50% 50% 0 50%;
  width: 50%;
  height: 2px;
  transform-origin: 0 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  animation: radarRotate 2.7s linear infinite;
}

.radar-dish i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px var(--gold);
  animation: softPulse 1.6s ease-in-out infinite;
}

.ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 360px;
}

.ticker span {
  border: 1px solid rgba(216, 170, 76, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: tickerFlash 4.8s ease-in-out infinite;
}

.ticker span:nth-child(2) { animation-delay: 0.45s; }
.ticker span:nth-child(3) { animation-delay: 0.9s; }
.ticker span:nth-child(4) { animation-delay: 1.35s; }

.metrics article,
.panel,
.controls,
.gamestate-panel,
.honor-board {
  animation: fadeUp 580ms ease both;
}

.metrics article:nth-child(2) { animation-delay: 60ms; }
.metrics article:nth-child(3) { animation-delay: 120ms; }
.metrics article:nth-child(4) { animation-delay: 180ms; }
.metrics article:nth-child(5) { animation-delay: 240ms; }

.metrics article::after,
.panel::after,
.controls::after,
.gamestate-panel::after,
.honor-board::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 42%, rgba(216, 170, 76, 0.12) 50%, transparent 58% 100%);
  opacity: 0;
  transform: translateX(-125%);
}

.fresh-ping .metrics article::after,
.fresh-ping .panel::after,
.fresh-ping .controls::after,
.fresh-ping .gamestate-panel::after,
.fresh-ping .honor-board::after {
  animation: panelPing 900ms ease both;
}

.metric-pop {
  animation: metricPop 520ms cubic-bezier(0.2, 1.55, 0.34, 1) both;
}

.status-dot.ok::before {
  animation: radioBlink 1.8s ease-in-out infinite;
}

.primary.loading {
  position: relative;
  overflow: hidden;
}

.primary.loading::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%);
  animation: tacticalSweep 1.05s linear infinite;
}

.award-card,
.player-item,
.map-row,
.squad,
.team-player,
.commander,
.match-card {
  animation: rowEnter 540ms ease both;
  animation-delay: var(--row-delay, 0ms);
}

.award-card {
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.award-card:hover,
.player-row:hover,
.map-row:hover,
.squad:hover {
  border-color: rgba(216, 170, 76, 0.36);
}

.award-card:hover {
  transform: translateY(-2px);
  background: rgba(216, 170, 76, 0.08);
}

.award-icon {
  animation: medalGlow 3.4s ease-in-out infinite;
}

.scorebar span {
  transform-origin: left center;
  animation: drawBar 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sector {
  position: relative;
}

.sector i {
  position: relative;
  overflow: hidden;
}

.sector i::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.36), transparent);
  transform: translateX(-120%);
  animation: tacticalSweep 3.2s ease-in-out infinite;
}

.gamestate-time strong,
.war-score strong,
.match-score strong {
  text-shadow: 0 0 20px rgba(216, 170, 76, 0.16);
}

.style-bar i {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.style-bar i::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), rgba(216, 170, 76, 0.42));
  content: "";
  transform-origin: left center;
  animation: drawBar 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

details.duel-card {
  width: min(440px, 100%);
  min-width: 330px;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.duel-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.duel-card summary::-webkit-details-marker {
  display: none;
}

.duel-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--duel-value), rgba(255, 255, 255, 0.08) 0);
  box-shadow: 0 0 26px rgba(216, 170, 76, 0.12);
}

.duel-ring::before {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface-solid);
  content: "";
}

.duel-ring i {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold);
  animation: softPulse 1.8s ease-in-out infinite;
}

.duel-score {
  display: grid;
  gap: 2px;
}

.duel-score strong {
  color: var(--gold);
  font-size: 38px;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.duel-score small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.duel-explain {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 13px;
}

.duel-card[open] .duel-explain {
  animation: fadeUp 260ms ease both;
}

.duel-explain code {
  display: block;
  overflow-x: auto;
  border: 1px solid rgba(216, 170, 76, 0.18);
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.duel-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.duel-breakdown span {
  min-width: 0;
  border: 1px solid rgba(216, 170, 76, 0.14);
  border-radius: 10px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

@keyframes radioScan {
  from { background-position-y: -260px; }
  to { background-position-y: 260px; }
}

@keyframes smokeDriftA {
  from { transform: translate3d(-2%, 1%, 0) scale(1); }
  to { transform: translate3d(4%, -2%, 0) scale(1.08); }
}

@keyframes smokeDriftB {
  from { transform: translate3d(2%, -1%, 0) scale(1.02); }
  to { transform: translate3d(-4%, 3%, 0) scale(1.12); }
}

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

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

@keyframes softPulse {
  0%, 100% { opacity: 0.58; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes emblemBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes tacticalSweep {
  0% { transform: translateX(-125%); }
  46%, 100% { transform: translateX(125%); }
}

@keyframes panelPing {
  0% { opacity: 0; transform: translateX(-125%); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(125%); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rowEnter {
  from { opacity: 0; transform: translateY(8px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes metricPop {
  from { transform: scale(0.92); filter: brightness(1.35); }
  to { transform: scale(1); filter: brightness(1); }
}

@keyframes drawBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes medalGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(216, 170, 76, 0); }
  50% { box-shadow: 0 0 24px rgba(216, 170, 76, 0.18); }
}

@keyframes tickerFlash {
  0%, 100% { color: var(--muted); border-color: rgba(216, 170, 76, 0.2); }
  44%, 58% { color: var(--gold); border-color: rgba(216, 170, 76, 0.52); }
}

@keyframes radioBlink {
  0%, 100% { opacity: 0.62; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.18); }
}

@media (max-width: 980px) {
  .front-intel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ticker {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }

  details.duel-card {
    min-width: 0;
  }

  .duel-breakdown {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .front-intel {
    grid-template-columns: 1fr;
  }

  .radar-dish {
    display: none;
  }

  .front-intel-copy span {
    white-space: normal;
  }
}

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

  .radio-scan,
  .ambient-smoke {
    display: none;
  }
}

/* --- refinement: calmer background, separate guide page, FLN branding --- */
body {
  background:
    linear-gradient(180deg, #0b0d0a 0%, #12150f 48%, #0d0f0c 100%),
    radial-gradient(circle at 50% 0%, rgba(216, 170, 76, 0.06), transparent 28%);
}

body::before {
  animation: none;
  opacity: 0.12;
  background-size: 64px 64px;
}

body::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%);
}

.page-noise,
.page-vignette,
.radio-scan,
.ambient-smoke,
.battle-ambience,
.flare,
.tracer,
.front-ticker {
  display: none !important;
}

.topbar-side {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.powered-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.powered-badge:hover,
.powered-badge:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.inline-guide-link:hover,
.inline-guide-link:focus-visible,
.footer-link:hover,
.footer-link:focus-visible {
  border-color: rgba(216, 170, 76, 0.42);
  background: rgba(216, 170, 76, 0.08);
  transform: translateY(-1px);
}

.powered-badge img,
.footer-logo {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.powered-badge span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.controls {
  grid-template-columns: auto 180px minmax(220px, 1fr) auto auto;
}

.ghost-button,
.inline-guide-link,
.footer-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.inline-guide-link {
  justify-content: flex-start;
  padding: 10px 12px;
  font-size: 12px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)), var(--surface);
  box-shadow: var(--shadow);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.footer-brand strong {
  display: block;
  margin-bottom: 4px;
}

.footer-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.guide-shell {
  padding-bottom: 52px;
}

.guide-topbar {
  align-items: start;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
}

.guide-copy {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.guide-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 8px;
}

.guide-tags span {
  border: 1px solid rgba(216, 170, 76, 0.24);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

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

.guide-panel {
  padding: 20px;
}

.guide-panel h2 {
  margin-bottom: 10px;
}

.guide-panel p,
.guide-panel li {
  color: var(--muted);
  line-height: 1.65;
}

.guide-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 14px 0 0;
}

.guide-list.compact {
  margin-top: 10px;
}

.formula-box {
  margin-top: 16px;
  border: 1px solid rgba(216, 170, 76, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.formula-box code {
  display: block;
  overflow-x: auto;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  white-space: nowrap;
}

.duel-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.duel-pillars > div {
  border: 1px solid rgba(216, 170, 76, 0.18);
  border-radius: 14px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.duel-pillars strong {
  display: block;
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
}

.duel-pillars span {
  display: block;
  margin-top: 6px;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
}

.duel-pillars p {
  font-size: 13px;
}

.duel-card {
  width: min(440px, 100%);
  min-width: 330px;
  padding: 12px;
}

.duel-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.duel-explain.compact {
  padding: 10px 0 0;
}

.duel-breakdown.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1160px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .guide-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-side,
  .guide-tags {
    justify-items: start;
    justify-content: flex-start;
  }

  .guide-hero,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 780px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .duel-card {
    min-width: 0;
    width: 100%;
  }

  .duel-breakdown.compact,
  .duel-pillars {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    align-items: flex-start;
  }
}


/* --- refinement: keep FLN credit out of the command focus --- */
.topbar {
  align-items: center;
}

.topbar-side {
  align-self: center;
}

.status-card {
  min-width: 250px;
}

.site-footer {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(17, 20, 14, 0.9);
}

.footer-brand {
  color: inherit;
  text-decoration: none;
}

.footer-brand:hover .footer-logo,
.footer-brand:focus-visible .footer-logo {
  transform: translateY(-1px) scale(1.03);
}

.footer-logo {
  width: 42px;
  height: 42px;
  transition: transform 0.2s ease;
}

.footer-link {
  min-width: 88px;
  padding-inline: 16px;
}

@media (max-width: 980px) {
  .topbar-side {
    justify-items: start;
  }

  .status-card {
    min-width: min(100%, 320px);
    justify-items: start;
  }
}

/* --- final FLN cleanup and player-list focus polish --- */
.powered-badge {
  border-radius: 14px;
  padding: 9px 11px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(0, 0, 0, 0.16));
}

.powered-badge img {
  width: 42px;
  height: 34px;
  object-fit: contain;
}

.powered-badge span {
  max-width: 210px;
  line-height: 1.15;
}

.site-footer.fln-footer {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
}

.fln-strip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.fln-strip .footer-logo {
  width: 54px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.32));
}

.fln-strip span {
  display: grid;
  gap: 2px;
}

.fln-strip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fln-strip strong {
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.01em;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.footer-actions .footer-link {
  min-height: 38px;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
}

.footer-copy,
.footer-brand {
  display: none;
}

.players-list {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

@media (max-width: 780px) {
  .site-footer.fln-footer {
    align-items: stretch;
  }

  .footer-actions {
    justify-content: flex-start;
  }

  .fln-strip .footer-logo {
    width: 46px;
    height: 36px;
  }
}


/* --- Frontbericht quick status: replaces the old busy Funkverkehr block --- */
.ops-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(216, 170, 76, 0.09), transparent 45%),
    rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow);
}

.ops-strip::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(216, 170, 76, 0.11), transparent 32%, rgba(255, 255, 255, 0.025));
  opacity: 0.48;
}

.ops-strip-main,
.ops-strip-meta {
  position: relative;
  z-index: 1;
}

.ops-strip-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ops-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 1px solid rgba(117, 197, 138, 0.3);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(117, 197, 138, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ops-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
  animation: radioBlink 1.8s ease-in-out infinite;
}

.ops-strip strong {
  display: block;
  margin-bottom: 3px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.ops-strip p {
  overflow: hidden;
  max-width: 820px;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-strip-meta {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-strip-meta a {
  border: 1px solid rgba(216, 170, 76, 0.22);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ops-strip-meta a:hover,
.ops-strip-meta a:focus-visible {
  border-color: rgba(216, 170, 76, 0.48);
  background: rgba(216, 170, 76, 0.09);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .ops-strip {
    grid-template-columns: 1fr;
  }

  .ops-strip-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .ops-strip-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-strip p {
    white-space: normal;
  }
}

/* --- top area cleanup: compact command header instead of billboard hero --- */
.command-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(19, 21, 15, 0.96);
  box-shadow: var(--shadow);
}

.command-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.title-stack {
  min-width: 0;
}

.command-header h1 {
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 0.92;
}

.command-header .hero-copy {
  max-width: 860px;
  margin-top: 8px;
}

.fln-lockup {
  display: grid;
  grid-template-columns: 44px auto;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  border: 1px solid rgba(216, 170, 76, 0.2);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.fln-lockup:hover,
.fln-lockup:focus-visible {
  border-color: rgba(216, 170, 76, 0.48);
  background: rgba(216, 170, 76, 0.08);
  transform: translateY(-1px);
}

.fln-lockup img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.fln-lockup span {
  display: grid;
  gap: 2px;
}

.fln-lockup small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fln-lockup strong {
  font-size: 14px;
  line-height: 1.05;
}

.command-header .status-card {
  align-self: stretch;
  min-width: 210px;
  box-shadow: none;
  background: rgba(0, 0, 0, 0.18);
}

.ops-strip {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.ops-strip > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.18);
}

.ops-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-strip strong,
.ops-strip a {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.ops-strip a {
  color: var(--gold);
}

.controls {
  grid-template-columns: auto 180px minmax(220px, 1fr) auto;
}

.data-chip {
  border: 1px solid rgba(121, 201, 140, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(121, 201, 140, 0.09);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .command-header,
  .command-title,
  .ops-strip {
    grid-template-columns: 1fr;
  }

  .command-header .status-card {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .fln-lockup {
    min-width: 0;
    width: 100%;
  }
}

/* --- final: subtle FLN footer, no top-right sponsor brick --- */
.site-footer.fln-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-top: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(13, 15, 12, 0.82);
}

.fln-strip {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.fln-strip .footer-logo {
  display: block;
  width: 54px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.32));
}

.fln-strip span {
  display: grid;
  gap: 2px;
}

.fln-strip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fln-strip strong {
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.01em;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.footer-actions .footer-link {
  min-height: 38px;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
}

@media (max-width: 780px) {
  .site-footer.fln-footer {
    align-items: stretch;
  }

  .footer-actions {
    justify-content: flex-start;
  }

  .fln-strip .footer-logo {
    width: 46px;
    height: 36px;
  }
}

/* --- final header pass: focused, compact, less billboard nonsense --- */
.command-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
}

.command-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-mark-compact {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(216, 170, 76, 0.12);
  animation: none;
}

.brand-mark-compact::before,
.brand-mark-compact::after {
  display: none;
}

.command-header h1 {
  font-size: clamp(32px, 4vw, 54px);
  letter-spacing: -0.045em;
}

.command-aside {
  display: grid;
  grid-template-columns: auto auto;
  align-items: stretch;
  gap: 10px;
}

.fln-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.fln-card:hover,
.fln-card:focus-visible {
  border-color: rgba(216, 170, 76, 0.44);
  background: rgba(216, 170, 76, 0.075);
  transform: translateY(-1px);
}

.fln-card img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.fln-card span {
  display: grid;
  gap: 2px;
}

.fln-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fln-card strong {
  font-size: 13px;
  line-height: 1.08;
}

.command-header .status-card {
  min-width: 195px;
  box-shadow: none;
}

.ops-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ops-strip::before {
  display: none;
}

.ops-strip > div,
.ops-strip-main,
.ops-strip-meta {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.18);
}

.ops-strip-main {
  display: flex !important;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ops-strip-main > div {
  min-width: 0;
}

.ops-strip p,
#coverageText {
  display: block;
  overflow: hidden;
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-strip-meta {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ops-strip-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}

.controls {
  grid-template-columns: auto 180px minmax(220px, 1fr) auto;
}

@media (max-width: 1180px) {
  .command-header,
  .command-aside,
  .ops-strip {
    grid-template-columns: 1fr;
  }

  .command-aside {
    justify-items: stretch;
  }
}

@media (max-width: 680px) {
  .command-title {
    grid-template-columns: 1fr;
  }

  .brand-mark-compact {
    display: none;
  }

  .ops-strip-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-strip p,
  #coverageText {
    white-space: normal;
  }
}

/* --- final polish: FLN stays present, but not as a header distraction --- */
.command-aside {
  grid-template-columns: auto;
}

.command-header .status-card {
  min-width: 220px;
}

.ops-strip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.ops-strip-main,
.ops-strip-meta {
  box-shadow: none;
}

@media (max-width: 1180px) {
  .command-aside {
    grid-template-columns: 1fr;
  }
}

/* --- roster/cardfix pass: no overlapping profile label, no hidden 80-player cap --- */
.longterm-profile {
  overflow: visible;
}

.longterm-head {
  display: block;
  min-width: 0;
}

.longterm-head h3 {
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.08;
}

.longterm-head .sub {
  max-width: 76ch;
  margin-top: 4px;
  line-height: 1.45;
}

.longterm-profile > .duel-card-clean {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: none;
  min-width: 0;
  overflow: hidden;
  border-color: rgba(216, 170, 76, 0.34);
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(216, 170, 76, 0.16), rgba(216, 170, 76, 0.055)),
    rgba(0, 0, 0, 0.16);
  text-align: left;
}

.longterm-profile > .duel-card-clean::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(216, 170, 76, 0.12), transparent 40%, rgba(255, 255, 255, 0.025));
  opacity: 0.72;
}

.longterm-profile > .duel-card-clean > * {
  position: relative;
  z-index: 1;
}

.duel-card-clean .duel-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 178px;
}

.duel-card-clean .duel-ring {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
}

.duel-card-clean .duel-score {
  min-width: 0;
}

.duel-card-clean .duel-score strong {
  color: var(--gold);
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.duel-card-clean .duel-score small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.duel-summary {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.duel-summary strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0;
}

.duel-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-transform: none;
  overflow-wrap: anywhere;
}

.duel-summary .inline-guide-link {
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  white-space: normal;
}

@media (max-width: 760px) {
  .longterm-profile > .duel-card-clean {
    grid-template-columns: 1fr;
  }

  .duel-card-clean .duel-card-main {
    min-width: 0;
  }
}

/* --- history cleanup: readable match report and no JSON-looking chips --- */
.history-mode .leaderboard {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(31, 33, 25, 0.94);
}

.history-mode .match-summary {
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(216, 170, 76, 0.08), transparent 32%),
    rgba(0, 0, 0, 0.08);
}

.history-mode .match-hero {
  min-height: 126px;
  border-color: rgba(216, 170, 76, 0.24);
  background:
    linear-gradient(135deg, rgba(216, 170, 76, 0.08), transparent 46%),
    rgba(0, 0, 0, 0.2);
}

.history-mode .match-hero h2 {
  max-width: 980px;
  margin-top: 4px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.history-mode .match-score {
  min-width: 170px;
  border: 1px solid rgba(216, 170, 76, 0.16);
  border-radius: 16px;
  padding: 13px 15px;
  background: rgba(0, 0, 0, 0.2);
}

.history-mode .match-score strong {
  font-size: 48px;
}

.history-mode .match-grid,
.history-mode .match-leaders,
.history-side-grid {
  gap: 12px;
}

.history-mode .match-card {
  border-color: rgba(215, 185, 118, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.18);
}

.history-mode .match-card strong {
  font-size: 25px;
}

.history-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-side-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.5fr) minmax(0, 1fr) minmax(180px, 0.7fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.18);
}

.history-side-card.allies {
  border-color: rgba(111, 145, 216, 0.32);
  background:
    linear-gradient(90deg, rgba(111, 145, 216, 0.1), transparent 44%),
    rgba(0, 0, 0, 0.18);
}

.history-side-card.axis {
  border-color: rgba(201, 106, 85, 0.34);
  background:
    linear-gradient(90deg, rgba(201, 106, 85, 0.1), transparent 44%),
    rgba(0, 0, 0, 0.18);
}

.history-side-card strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.history-side-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-side-stats span,
.history-side-top {
  border: 1px solid rgba(215, 185, 118, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.history-side-top {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.history-side-top span {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-side-top b {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-roster-note {
  border: 1px solid rgba(216, 170, 76, 0.16);
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(216, 170, 76, 0.055);
}

.history-roster-note strong {
  display: block;
  margin-bottom: 3px;
  font-size: 18px;
}

.history-roster-note span {
  color: var(--muted);
  font-size: 13px;
}

.history-mode .players-list {
  gap: 10px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 180px),
    rgba(0, 0, 0, 0.04);
}

.history-mode .player-item.top-rank,
.history-mode .player-item {
  background: none;
}

.history-mode .player-row {
  grid-template-columns: 54px minmax(280px, 1fr) repeat(5, minmax(86px, 0.11fr)) 78px;
  overflow: hidden;
  border: 1px solid rgba(215, 185, 118, 0.14);
  border-radius: 15px;
  padding: 15px 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 58%),
    rgba(0, 0, 0, 0.16);
}

.history-mode .player-row:hover {
  border-color: rgba(216, 170, 76, 0.34);
  background:
    linear-gradient(90deg, rgba(216, 170, 76, 0.07), transparent 60%),
    rgba(0, 0, 0, 0.18);
}

.history-mode .player-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: rgba(216, 170, 76, 0.38);
}

.history-mode .player-row.side-allies::before {
  background: rgba(111, 145, 216, 0.75);
}

.history-mode .player-row.side-axis::before {
  background: rgba(201, 106, 85, 0.8);
}

.history-mode .rank-badge span {
  background: rgba(0, 0, 0, 0.2);
}

.history-mode .name-line {
  flex-wrap: wrap;
}

.history-mode .player-copy .sub {
  max-width: 740px;
  white-space: normal;
}

.history-mode .scorebar {
  width: min(100%, 360px);
  height: 4px;
}

.history-mode .team-chip,
.history-mode .clan-tag,
.history-mode .data-chip {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-mode .profile-panel {
  margin: -10px 14px 10px;
  border: 1px solid rgba(215, 185, 118, 0.14);
  border-top: 0;
  border-radius: 0 0 15px 15px;
}

@media (max-width: 1180px) {
  .history-mode .player-row {
    grid-template-columns: 52px minmax(180px, 1fr) repeat(3, minmax(72px, 0.12fr)) 76px;
  }

  .history-side-card {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 780px) {
  .history-side-grid {
    grid-template-columns: 1fr;
  }

  .history-mode .player-row {
    grid-template-columns: 42px minmax(0, 1fr) 64px 66px;
  }

  .history-mode .players-list {
    padding: 10px;
  }

  .history-mode .match-score {
    justify-items: start;
  }
}

/* --- history polish: cleaner archived match view, no raw JSON trench-art --- */
.history-mode .match-summary {
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 16% 0%, rgba(216, 170, 76, 0.08), transparent 34%),
    rgba(0, 0, 0, 0.08);
}

.history-mode .match-hero {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(216, 170, 76, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.2);
}

.history-mode .match-hero h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.history-mode .match-grid,
.history-mode .match-leaders,
.history-side-grid {
  display: grid;
  gap: 12px;
}

.history-side-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-side-card,
.history-roster-note {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(0, 0, 0, 0.18);
}

.history-side-card::before,
.history-roster-note::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: var(--gold);
  opacity: 0.8;
}

.history-side-card.allies::before { background: var(--allies); }
.history-side-card.axis::before { background: var(--axis); }

.history-side-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.6fr) minmax(0, 1fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 14px;
}

.history-side-card strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.history-side-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-side-stats span,
.history-side-top span,
.history-roster-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.history-side-stats span {
  border: 1px solid rgba(215, 185, 118, 0.13);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.16);
}

.history-side-top {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
  text-align: right;
}

.history-side-top b {
  overflow: hidden;
  max-width: 100%;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-roster-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.history-roster-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.history-mode .players-list {
  gap: 10px;
  padding: 14px;
}

.history-player-item.top-rank {
  background: none;
}

.history-player-card {
  display: grid;
  grid-template-columns: 54px minmax(340px, 1.15fr) minmax(460px, 1fr) auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(215, 185, 118, 0.16);
  border-radius: 16px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.history-player-card:hover {
  border-color: rgba(216, 170, 76, 0.34);
  background:
    linear-gradient(145deg, rgba(216, 170, 76, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(0, 0, 0, 0.18);
}

.history-player-card.side-allies {
  border-left: 3px solid rgba(111, 145, 216, 0.72);
}

.history-player-card.side-axis {
  border-left: 3px solid rgba(201, 106, 85, 0.72);
}

.history-player-card.side-neutral {
  border-left: 3px solid rgba(216, 170, 76, 0.62);
}

.history-rank span {
  width: 38px;
  height: 38px;
}

.history-player-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.history-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.history-player-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.history-name-line,
.history-chip-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.history-name-line .name {
  max-width: min(420px, 40vw);
  font-size: 17px;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(215, 185, 118, 0.14);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(0, 0, 0, 0.14);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.history-player-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-scorebar {
  width: min(100%, 340px);
}

.history-stat-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(58px, 1fr));
  gap: 8px;
  min-width: 0;
}

.history-stat {
  min-width: 0;
  border: 1px solid rgba(215, 185, 118, 0.12);
  border-radius: 12px;
  padding: 9px 8px;
  background: rgba(0, 0, 0, 0.16);
  text-align: right;
}

.history-stat b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-stat.accent b,
.history-stat.good b {
  color: var(--green);
}

.history-stat.warn b {
  color: var(--red);
}

.history-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-profile-cell {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1320px) {
  .history-player-card {
    grid-template-columns: 54px minmax(280px, 1fr) auto;
  }

  .history-stat-grid {
    grid-column: 2 / -1;
    grid-template-columns: repeat(5, minmax(72px, 1fr));
  }

  .history-profile-cell {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 900px) {
  .history-side-grid,
  .history-side-card {
    grid-template-columns: 1fr;
  }

  .history-side-top {
    justify-items: start;
    text-align: left;
  }

  .history-player-card {
    grid-template-columns: 1fr;
  }

  .history-stat-grid,
  .history-profile-cell {
    grid-column: auto;
    grid-row: auto;
  }

  .history-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-name-line .name {
    max-width: 100%;
  }
}

/* --- quiet live refresh: values update without loader flashes or row re-entry animations --- */
body.silent-refresh .metric-pop,
body.silent-refresh .metrics strong,
body.silent-refresh .metrics article,
body.silent-refresh .gamestate-panel,
body.silent-refresh .honor-board,
body.silent-refresh .award-card,
body.silent-refresh .player-item,
body.silent-refresh .player-row,
body.silent-refresh .history-player-card,
body.silent-refresh .map-row,
body.silent-refresh .squad,
body.silent-refresh .team-player,
body.silent-refresh .commander,
body.silent-refresh .match-card,
body.silent-refresh .scorebar span,
body.silent-refresh .style-bar i::before,
body.silent-refresh .sector i::after,
body.silent-refresh .award-icon,
body.silent-refresh .duel-ring i,
body.silent-refresh .status-dot.ok::before {
  animation: none !important;
  transition-duration: 0.01ms !important;
}

body.silent-refresh .metrics article::after,
body.silent-refresh .panel::after,
body.silent-refresh .controls::after,
body.silent-refresh .gamestate-panel::after,
body.silent-refresh .honor-board::after {
  display: none !important;
}


.dashboard-section-disabled {
  display: none !important;
}

body[data-show-player-avatars="false"] .avatar,
body[data-show-player-avatars="false"] .history-avatar,
body[data-show-player-avatars="false"] .award-avatar,
body[data-show-player-avatars="false"] .profile-avatar {
  display: none !important;
}

body[data-show-scorebars="false"] .scorebar,
body[data-show-scorebars="false"] .history-scorebar {
  display: none !important;
}

/* Runtime presets: first layout/theming hooks */
body[data-density="compact"] .shell {
  width: min(1700px, calc(100vw - 20px));
  padding-top: 18px;
}

body[data-density="compact"] .topbar,
body[data-density="compact"] .ops-strip,
body[data-density="compact"] .metrics,
body[data-density="compact"] .gamestate-panel,
body[data-density="compact"] .honor-board,
body[data-density="compact"] .controls,
body[data-density="compact"] .layout {
  margin-bottom: 10px;
}

body[data-density="compact"] .metrics article,
body[data-density="compact"] .panel,
body[data-density="compact"] .controls,
body[data-density="compact"] .gamestate-panel,
body[data-density="compact"] .honor-board {
  border-radius: 12px;
}

body[data-density="compact"] .player-row,
body[data-density="compact"] .history-player-card,
body[data-density="compact"] .squad,
body[data-density="compact"] .team-player {
  padding-block: 10px;
}

body[data-density="compact"] .hero-copy,
body[data-density="compact"] .front-intel-copy span,
body[data-density="compact"] .footer-copy {
  display: none;
}

body[data-density="dense"] .layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

body[data-density="dense"] .player-row,
body[data-density="dense"] .history-player-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

body[data-density="showcase"] .metrics article strong,
body[data-density="showcase"] .war-score strong,
body[data-density="showcase"] .gamestate-time strong {
  font-size: clamp(34px, 5vw, 62px);
}

body[data-density="showcase"] .layout {
  grid-template-columns: 1fr;
}

body[data-density="showcase"] .teams,
body[data-preset="broadcast_overlay"] .teams,
body[data-preset="player_showcase"] .teams,
body[data-preset="history_archive"] .teams {
  display: none !important;
}

body[data-preset="war_room_pro"] .honor-board,
body[data-preset="compact_ops"] .honor-board {
  display: none !important;
}

body[data-preset="history_archive"] .gamestate-panel,
body[data-preset="player_showcase"] .gamestate-panel {
  display: none !important;
}

body[data-motion="static"] *,
body[data-motion="static"] *::before,
body[data-motion="static"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

body[data-motion="smooth"] .award-card,
body[data-motion="smooth"] .player-item,
body[data-motion="smooth"] .map-row,
body[data-motion="smooth"] .history-player-card {
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

body[data-motion="smooth"] .award-card:hover,
body[data-motion="smooth"] .player-row:hover,
body[data-motion="smooth"] .map-row:hover,
body[data-motion="smooth"] .history-player-card:hover {
  transform: translateY(-2px);
}

body[data-theme="broadcast_gold"] {
  --gold-soft: rgba(216, 170, 76, 0.24);
}

body[data-theme="compact_ops"] {
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  --radius: 12px;
}

/* Preset-aware display metadata. Das sind bewusst sanfte Anpassungen, keine neue CSS-Schlacht. */
body[data-theme="war_room_dark"] {
  --gold: #c7b37a;
  --surface: rgba(20, 23, 20, 0.95);
  --line: rgba(199, 179, 122, 0.16);
  --line-strong: rgba(199, 179, 122, 0.32);
}

body[data-theme="broadcast_gold"] {
  --gold: #f0bf5a;
  --surface: rgba(25, 22, 16, 0.94);
  --line: rgba(240, 191, 90, 0.22);
  --line-strong: rgba(240, 191, 90, 0.42);
}

body[data-theme="compact_ops"] {
  --surface: rgba(17, 20, 17, 0.96);
  --radius: 12px;
}

body[data-theme="archive_report"] {
  --surface: rgba(28, 25, 20, 0.94);
  --gold: #d1ad70;
}

body[data-theme="showcase_dark"] {
  --gold: #e0b85d;
  --line: rgba(224, 184, 93, 0.2);
}

body[data-density="compact"] .shell {
  width: min(1640px, calc(100vw - 20px));
  padding-top: 18px;
}

body[data-density="compact"] .command-header,
body[data-density="compact"] .metrics,
body[data-density="compact"] .controls,
body[data-density="compact"] .layout {
  gap: 10px;
}

body[data-density="compact"] .metrics article,
body[data-density="compact"] .panel,
body[data-density="compact"] .controls,
body[data-density="compact"] .gamestate-panel,
body[data-density="compact"] .honor-board {
  border-radius: 12px;
}

body[data-density="compact"] h1 {
  font-size: clamp(32px, 4vw, 54px);
}

body[data-density="compact"] .hero-copy,
body[data-density="compact"] .ops-strip,
body[data-density="compact"] .site-footer {
  font-size: 12px;
}

body[data-density="compact"] .avatar,
body[data-density="compact"] .player-avatar,
body[data-density="compact"] .avatar-fallback {
  display: none;
}

body[data-density="broadcast"] .layout {
  grid-template-columns: 1fr;
}

body[data-density="broadcast"] .leaderboard {
  min-height: 0;
}

body[data-density="broadcast"] .player-row,
body[data-density="broadcast"] .history-player-card {
  padding: 18px;
}

body[data-density="broadcast"] h1 {
  font-size: clamp(48px, 7vw, 96px);
}

body[data-motion="none"] *,
body[data-motion="none"] *::before,
body[data-motion="none"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* Preset backend v1: theme aliases and density hooks */
body[data-theme="war_room"] {
  --gold: #c7b37a;
  --surface: rgba(20, 23, 20, 0.95);
  --line: rgba(199, 179, 122, 0.16);
  --line-strong: rgba(199, 179, 122, 0.32);
}

body[data-theme="profile_showcase"] {
  --gold: #e0b85d;
  --line: rgba(224, 184, 93, 0.2);
}

body[data-density="spacious"] .layout,
body[data-density="spacious"] .metrics,
body[data-density="spacious"] .controls {
  gap: 22px;
}

body[data-density="spacious"] .player-row,
body[data-density="spacious"] .history-player-card,
body[data-density="spacious"] .profile-card {
  padding: 20px;
}

body[data-motion="showcase"] .award-card,
body[data-motion="showcase"] .player-item,
body[data-motion="showcase"] .map-row,
body[data-motion="showcase"] .history-player-card {
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

body[data-motion="showcase"] .award-card:hover,
body[data-motion="showcase"] .player-row:hover,
body[data-motion="showcase"] .map-row:hover,
body[data-motion="showcase"] .history-player-card:hover {
  transform: translateY(-2px);
}

/* Shared inline SVG icons used by template-aware views. */
.ui-icon,
.award-symbol,
.rank-symbol-icon {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.award-symbol path:first-child,
.rank-symbol-icon path:first-child {
  fill: currentColor;
  opacity: 0.1;
}
