:root {
  --bg: #090b12;
  --panel: rgba(17, 21, 34, 0.94);
  --panel-strong: #111522;
  --card: rgba(22, 28, 45, 0.92);
  --card-hover: rgba(31, 39, 62, 0.96);
  --border: rgba(135, 152, 190, 0.18);
  --border-strong: rgba(135, 152, 190, 0.32);
  --text: #eef3ff;
  --muted: #9da9c1;
  --muted-2: #6f7a91;
  --accent: #73a7ff;
  --accent-2: #8d7aff;
  --positive: #61d394;
  --negative: #ff7474;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 18% 4%, rgba(115, 167, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(141, 122, 255, 0.18), transparent 30rem),
    linear-gradient(180deg, #090b12 0%, #0c101b 52%, #080a10 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), transparent 78%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="file"] {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  color: #06101f;
  background: var(--accent);
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
}

.leaderboard-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.leaderboard-heading {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.leaderboard-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.leaderboard-heading h1,
.leaderboard-heading h2,
.leaderboard-changes h2,
.admin-panel h2,
.auth-panel h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.leaderboard-heading h1 {
  max-width: 760px;
  font-size: clamp(2.2rem, 6vw, 5.4rem);
}

.leaderboard-heading p:not(.leaderboard-kicker) {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-link,
.primary-button,
.ghost-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
}

.primary-button {
  border: 0;
  color: #05101e;
  background: linear-gradient(135deg, var(--accent), #9ac2ff);
}

.ghost-button {
  background: transparent;
}

.admin-link:hover,
.primary-button:hover,
.ghost-button:hover {
  filter: brightness(1.08);
}

.leaderboard-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto 160px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.search-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.search-input,
.select-input,
.admin-form input,
.upload-box input,
.upload-box select,
.admin-form select,
.parser-grid input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: var(--text);
  background: rgba(7, 10, 19, 0.8);
  outline: none;
}

.search-input:focus,
.select-input:focus,
.admin-form input:focus,
.upload-box input:focus,
.upload-box select:focus,
.parser-grid input:focus {
  border-color: rgba(115, 167, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(115, 167, 255, 0.12);
}

.leaderboard-updated {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
}

.leaderboard-table {
  display: grid;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 90px minmax(220px, 1.4fr) minmax(140px, 0.7fr) 130px 110px 100px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--card);
}

.leaderboard-row:not(.leaderboard-row--head):hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}

.leaderboard-row--head {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(8, 12, 22, 0.98);
}

.leaderboard-place {
  display: inline-flex;
  width: fit-content;
  min-width: 48px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(115, 167, 255, 0.3);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 950;
  background: rgba(115, 167, 255, 0.1);
}

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

.leaderboard-player-name,
.change-player a {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.change-player a:hover {
  color: var(--accent);
}

.leaderboard-player small,
.change-player small {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.player-action {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
}

.player-action--wfts {
  color: #06101f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #9ac2ff);
}

.player-action:disabled {
  cursor: not-allowed;
  color: var(--muted-2);
  border-color: rgba(135, 152, 190, 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.clan-text {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-points {
  font-variant-numeric: tabular-nums;
  font-weight: 950;
}

.risk-badge {
  display: inline-flex;
  width: fit-content;
  min-width: 58px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(135, 152, 190, 0.2);
  border-radius: 999px;
  padding: 0 10px;
  color: #c9d3e4;
  font-size: 0.84rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.035);
}

.risk-badge--ok {
  color: var(--positive);
  border-color: rgba(97, 211, 148, 0.24);
  background: rgba(97, 211, 148, 0.08);
}

.risk-badge--warning {
  color: var(--profile-gold, #e0a93d);
  border-color: rgba(224, 169, 61, 0.32);
  background: rgba(224, 169, 61, 0.1);
}

.risk-badge--danger {
  color: #ff6d82;
  border-color: rgba(255, 109, 130, 0.34);
  background: rgba(255, 109, 130, 0.1);
}

.delta-badge,
.rank-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.04);
}

.is-positive {
  color: var(--positive);
  border-color: rgba(97, 211, 148, 0.28);
  background: rgba(97, 211, 148, 0.1);
}

.is-negative {
  color: var(--negative);
  border-color: rgba(255, 116, 116, 0.3);
  background: rgba(255, 116, 116, 0.09);
}

.player-page {
  width: min(1120px, calc(100% - 32px));
}

.player-dashboard {
  display: grid;
  gap: 16px;
}

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

.player-stat-card,
.chart-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}

.player-stat-card {
  min-height: 112px;
  padding: 15px;
}

.player-stat-card span,
.player-stat-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.player-stat-card b {
  display: block;
  margin: 8px 0 5px;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.player-stat-card.is-positive b {
  color: var(--positive);
}

.player-stat-card.is-negative b {
  color: var(--negative);
}

.player-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chart-panel {
  min-width: 0;
  padding: 16px;
}

.chart-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.chart-panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.chart-panel b {
  color: var(--accent);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.history-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(135, 152, 190, 0.16);
  stroke-width: 1;
}

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

.chart-dot {
  fill: var(--panel-strong);
  stroke: var(--accent);
  stroke-width: 3;
}

.chart-dot--last {
  fill: var(--accent);
}

.chart-label {
  fill: var(--muted-2);
  font-size: 13px;
  font-weight: 800;
}

.player-history-table {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.player-history-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px 140px 110px 110px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(135, 152, 190, 0.14);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.player-history-row--head {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(8, 12, 22, 0.8);
}

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

.history-snapshot strong {
  color: var(--text);
}

.history-snapshot small {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 700;
}

.player-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.player-tab {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--muted);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.04);
}

.player-tab.is-active {
  color: #061117;
  border-color: rgba(61, 191, 212, 0.82);
  background: linear-gradient(135deg, #3dbfd4, #7de2f0);
}

.player-page.player-page--profile {
  width: min(2500px, calc(100% - 32px));
}

.profile-dashboard {
  --profile-bg: #0e1419;
  --profile-bg-2: #1a2530;
  --profile-panel: rgba(28, 38, 48, 0.78);
  --profile-panel-strong: rgba(21, 29, 38, 0.92);
  --profile-border: rgba(180, 196, 220, 0.22);
  --profile-text: #ffffff;
  --profile-muted: #8a97a5;
  --profile-cyan: #3dbfd4;
  --profile-gold: #e0a93d;
  color: var(--profile-text);
}

.profile-shell {
  overflow: hidden;
  border: 1px solid rgba(180, 196, 220, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 20, 25, 0.94), rgba(26, 37, 48, 0.98)),
    linear-gradient(145deg, var(--profile-bg), var(--profile-bg-2));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.profile-top {
  position: relative;
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) auto;
  gap: 34px;
  align-items: center;
  padding: 28px 42px;
  isolation: isolate;
}

.profile-top::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background: linear-gradient(90deg, rgba(10, 14, 18, 0.9), rgba(14, 20, 25, 0.72) 48%, rgba(10, 14, 18, 0.84));
}

.profile-top::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.36;
}

.profile-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.profile-eagle {
  width: 108px;
  height: 108px;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--profile-gold);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}

.profile-eagle::before {
  content: "♔";
  font-size: 4.8rem;
  line-height: 1;
}

.profile-eagle::after {
  position: absolute;
  inset: 31px 25px 18px;
  content: "";
  border: 2px solid rgba(224, 169, 61, 0.82);
  background: linear-gradient(135deg, rgba(120, 24, 24, 0.9), rgba(190, 42, 42, 0.86));
}

.profile-rank-emblem,
.rank-medal {
  display: grid;
  place-items: center;
  border: 1px solid rgba(224, 169, 61, 0.46);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 240, 185, 0.88) 0 18%, rgba(224, 169, 61, 0.9) 19% 31%, rgba(56, 47, 34, 0.92) 32% 100%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5), 0 8px 18px rgba(0, 0, 0, 0.36);
}

.profile-rank-emblem {
  width: 62px;
  height: 62px;
}

.profile-rank-emblem::before,
.rank-medal::before {
  content: "★";
  color: #231b10;
  font-size: 1.3rem;
}

.profile-rank-emblem--image {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-rank-emblem--image::before {
  content: none;
}

.profile-rank-emblem--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.46));
}

.profile-name-stack {
  min-width: 0;
}

.profile-clan {
  margin: 0 0 6px;
  color: var(--profile-muted);
  font-size: 1rem;
  font-weight: 800;
}

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

.profile-nickname {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  color: var(--profile-text);
  font-family: "Oswald", "Bebas Neue", Impact, var(--font);
  font-size: clamp(2.2rem, 3vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.profile-level {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 4px 9px;
  color: var(--profile-text);
  font-size: clamp(1.2rem, 1.7vw, 2rem);
  font-weight: 900;
  background: rgba(0, 0, 0, 0.24);
}

.profile-edit {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--profile-text);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
}

.profile-edit::before {
  content: "✎";
  font-size: 1rem;
}

.profile-header-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, auto));
  gap: 26px;
  align-items: center;
}

.profile-header-stat {
  min-height: 70px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 26px;
}

.profile-header-stat span {
  display: block;
  margin-bottom: 9px;
  color: var(--profile-muted);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-header-stat strong {
  color: var(--profile-text);
  font-family: "Oswald", "Bebas Neue", Impact, var(--font);
  font-size: clamp(1.55rem, 1.8vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0;
}

.profile-header-stat small {
  color: var(--profile-text);
  font-size: 1rem;
}

.profile-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 22px 42px 0;
}

.profile-select {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(180, 196, 220, 0.42);
  border-radius: 2px;
  padding: 0 18px;
  color: var(--profile-text);
  background: rgba(9, 12, 18, 0.72);
}

.profile-main {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 0.9fr) minmax(620px, 1.55fr);
  gap: 28px;
  padding: 32px 42px 42px;
}

.profile-panel {
  min-width: 0;
  border: 1px solid var(--profile-border);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    var(--profile-panel);
  background-size: 5px 5px, 5px 5px, auto;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.26);
}

.profile-panel-title {
  margin: 0 0 22px;
  color: var(--profile-muted);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 34px;
  margin-bottom: 34px;
}

.profile-metric span,
.profile-rank-row span {
  display: block;
  margin-bottom: 8px;
  color: var(--profile-muted);
  font-size: 1rem;
}

.profile-metric strong {
  display: block;
  font-family: "Oswald", "Bebas Neue", Impact, var(--font);
  font-size: clamp(2.1rem, 2.4vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.profile-ranks {
  display: grid;
  gap: 24px;
  margin-top: 20px;
}

.profile-rank-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.rank-medal {
  width: 70px;
  height: 70px;
}

.rank-medal--image {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rank-medal--image::before {
  content: none;
}

.rank-medal--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}

.profile-rp {
  display: inline-flex;
  flex-wrap: wrap;
  column-gap: 0;
  align-items: baseline;
}

.profile-rp-value {
  font-family: "Oswald", "Bebas Neue", Impact, var(--font);
  font-size: 3rem;
  line-height: 1;
}

.profile-rp-unit {
  margin-left: 14px;
  margin-right: 20px;
  color: var(--profile-gold);
  font-size: 2rem;
}

.profile-rp-league {
  color: var(--profile-text);
  font-size: 1.55rem;
  font-weight: 900;
}

.profile-trust {
  position: relative;
  overflow: hidden;
  align-self: start;
  background:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px),
    rgba(26, 29, 37, 0.94);
  background-size: 5px 5px, 5px 5px, auto;
}

.profile-trust--danger {
  border-color: rgba(255, 71, 96, 0.36);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 71, 96, 0.06);
}

.profile-trust--warning {
  border-color: rgba(224, 169, 61, 0.36);
}

.profile-trust--ok {
  border-color: rgba(61, 191, 212, 0.3);
}

.profile-trust-kicker {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--profile-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-trust-shield {
  width: 15px;
  height: 17px;
  border: 2px solid currentColor;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  clip-path: polygon(50% 0, 100% 18%, 88% 76%, 50% 100%, 12% 76%, 0 18%);
}

.profile-trust-title {
  margin: 0 0 9px;
  color: #ff4760;
  font-size: clamp(1.25rem, 1.3vw, 1.72rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.profile-trust--warning .profile-trust-title {
  color: var(--profile-gold);
}

.profile-trust--ok .profile-trust-title {
  color: var(--profile-cyan);
}

.profile-trust-description {
  margin: 0 0 17px;
  color: #b9c1ce;
  font-size: 0.94rem;
  line-height: 1.38;
}

.profile-trust-signals {
  display: grid;
  gap: 10px;
  margin-bottom: 17px;
}

.profile-trust-signal {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: #d4dae4;
}

.profile-trust-signal-icon {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--profile-gold);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.profile-trust-signal--danger .profile-trust-signal-icon {
  color: #ff4760;
}

.profile-trust-signal--info .profile-trust-signal-icon {
  color: var(--profile-cyan);
}

.profile-trust-signal strong {
  display: block;
  color: #dfe5ee;
  font-size: 0.93rem;
  line-height: 1.22;
}

.profile-trust-signal small {
  display: block;
  margin-top: 2px;
  color: var(--profile-muted);
  font-size: 0.86rem;
}

.profile-trust-divider {
  height: 1px;
  margin: 4px 0 14px;
  background: rgba(180, 196, 220, 0.15);
}

.profile-trust-subtitle {
  margin: 0 0 10px;
  color: var(--profile-muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-trust-facts {
  display: grid;
  gap: 7px;
}

.profile-trust-fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.profile-trust-fact span {
  color: #a6afbe;
  font-size: 0.88rem;
}

.profile-trust-fact strong {
  color: #ff4760;
  font-size: 0.92rem;
  text-align: right;
}

.profile-trust--warning .profile-trust-fact strong {
  color: var(--profile-gold);
}

.profile-trust--ok .profile-trust-fact strong {
  color: var(--profile-cyan);
}

.profile-trust-note {
  display: block;
  margin-top: 16px;
  color: rgba(138, 151, 165, 0.72);
  font-size: 0.74rem;
  line-height: 1.3;
}

.profile-ai {
  position: relative;
  overflow: hidden;
  align-self: start;
  border-color: rgba(61, 191, 212, 0.24);
  background:
    linear-gradient(135deg, rgba(61, 191, 212, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(22, 31, 42, 0.96), rgba(15, 20, 27, 0.96));
}

.profile-ai::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: linear-gradient(180deg, var(--profile-cyan), var(--profile-gold));
}

.profile-ai--danger::before {
  background: linear-gradient(180deg, #ff5b70, var(--profile-gold));
}

.profile-ai--warning::before {
  background: linear-gradient(180deg, var(--profile-gold), var(--profile-cyan));
}

.profile-ai-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.profile-ai-kicker,
.profile-ai-subtitle {
  display: block;
  color: var(--profile-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-ai-title {
  margin: 8px 0 0;
  color: var(--profile-text);
  font-size: clamp(1.22rem, 1.25vw, 1.68rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.profile-ai-score {
  min-width: 76px;
  border: 1px solid rgba(61, 191, 212, 0.35);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--profile-cyan);
  text-align: right;
  background: rgba(3, 9, 13, 0.38);
}

.profile-ai--danger .profile-ai-score {
  border-color: rgba(255, 91, 112, 0.36);
  color: #ff5b70;
}

.profile-ai--warning .profile-ai-score {
  border-color: rgba(224, 169, 61, 0.42);
  color: var(--profile-gold);
}

.profile-ai-score strong {
  font-family: "Oswald", "Bebas Neue", Impact, var(--font);
  font-size: 2.1rem;
  line-height: 0.95;
}

.profile-ai-score span {
  color: var(--profile-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-ai-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.profile-ai-meta span {
  border: 1px solid rgba(180, 196, 220, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: #b9c4d2;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.035);
}

.profile-ai-description {
  margin: 14px 0 12px;
  color: #c3ccd8;
  font-size: 0.94rem;
  line-height: 1.42;
}

.profile-ai-brief-facts {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.profile-ai-brief-fact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  align-items: baseline;
  border: 1px solid rgba(180, 196, 220, 0.11);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.026);
}

.profile-ai-brief-fact span {
  min-width: 0;
  color: #99a6b5;
  font-size: 0.78rem;
}

.profile-ai-brief-fact strong {
  min-width: 0;
  overflow: hidden;
  color: #eef4ff;
  font-size: 0.84rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-ai-details {
  border-top: 1px solid rgba(180, 196, 220, 0.12);
  padding-top: 10px;
}

.profile-ai-details-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #d5deea;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-ai-details-toggle::-webkit-details-marker {
  display: none;
}

.profile-ai-details-toggle::after {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(180, 196, 220, 0.22);
  border-radius: 50%;
  color: var(--profile-cyan);
  content: "+";
  font-size: 1rem;
  line-height: 1;
}

.profile-ai-details[open] .profile-ai-details-toggle::after {
  content: "-";
}

.profile-ai-details .profile-ai-signals {
  margin-top: 12px;
}

.profile-ai-signals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.profile-ai-signal {
  border: 1px solid rgba(180, 196, 220, 0.14);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-ai-signal b {
  display: block;
  margin-bottom: 3px;
  color: #e6edf6;
  font-size: 0.88rem;
}

.profile-ai-signal span {
  color: var(--profile-muted);
  font-size: 0.82rem;
}

.profile-ai-signal--danger {
  border-color: rgba(255, 91, 112, 0.24);
}

.profile-ai-signal--warning {
  border-color: rgba(224, 169, 61, 0.24);
}

.profile-ai-signal--info {
  border-color: rgba(61, 191, 212, 0.22);
}

.profile-ai-subtitle {
  margin: 0 0 10px;
}

.profile-ai-facts {
  display: grid;
  gap: 7px;
}

.profile-ai-fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.profile-ai-fact span {
  color: #99a6b5;
  font-size: 0.85rem;
}

.profile-ai-fact strong {
  color: #eef4ff;
  font-size: 0.88rem;
  text-align: right;
}

.profile-ai-note {
  display: block;
  margin-top: 15px;
  color: rgba(138, 151, 165, 0.72);
  font-size: 0.72rem;
  line-height: 1.32;
}

.profile-donut-wrap {
  display: grid;
  place-items: center;
  margin: 4px 0 30px;
}

.profile-donut {
  width: min(310px, 74vw);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--profile-cyan) 0deg, var(--profile-cyan) 260deg, #ffffff 260deg, #ffffff 290deg, #67c56e 290deg, #67c56e 315deg, var(--profile-gold) 315deg, var(--profile-gold) 360deg);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08), 0 14px 36px rgba(0, 0, 0, 0.34);
}

.profile-donut-core {
  width: 72%;
  height: 72%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--profile-text);
  background: rgba(27, 32, 43, 0.96);
}

.profile-donut-core strong {
  display: block;
  font-family: "Oswald", "Bebas Neue", Impact, var(--font);
  font-size: clamp(2.3rem, 3vw, 4.3rem);
  line-height: 1;
  text-align: center;
}

.profile-donut-core span {
  display: block;
  margin-top: 6px;
  color: var(--profile-muted);
  font-size: 1rem;
  text-align: center;
}

.profile-table {
  display: grid;
  gap: 4px;
}

.profile-class-row,
.profile-weapon-row {
  display: grid;
  gap: 14px;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
}

.profile-class-row {
  grid-template-columns: minmax(140px, 1fr) 70px 86px 70px;
}

.profile-table-head {
  color: var(--profile-muted);
  font-size: 0.9rem;
}

.profile-class-name {
  font-weight: 900;
}

.profile-weapon-panel {
  padding-top: 0;
}

.profile-weapon-table {
  margin-bottom: 34px;
}

.profile-weapon-row {
  grid-template-columns: 42px minmax(160px, 1fr) 92px 110px 100px 130px;
  min-height: 64px;
  background: rgba(30, 36, 52, 0.52);
}

.profile-weapon-row:nth-child(even):not(.profile-table-head) {
  background: rgba(17, 22, 32, 0.58);
}

.weapon-category-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 6px;
  color: var(--profile-text);
  font-size: 0.86rem;
  font-weight: 900;
}

.weapon-render {
  position: relative;
  width: min(190px, 100%);
  height: 32px;
}

.weapon-render::before {
  position: absolute;
  left: 22px;
  right: 36px;
  top: 14px;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, #6c7380, #d5dce2 28%, #5d6570 72%, #c0392b);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.weapon-render::after {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 40px;
  height: 3px;
  content: "";
  background: #9aa2aa;
  box-shadow: -96px 12px 0 -1px #4b535e, -64px -6px 0 -1px #2c323a;
}

.weapon-render[data-class="recon"]::after {
  right: 0;
  width: 78px;
}

.weapon-render[data-class="medic"]::before {
  right: 54px;
}

.profile-achievements-title {
  margin: 0 0 16px;
  color: var(--profile-muted);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-achievements {
  display: grid;
  grid-template-columns: 96px 96px minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
}

.achievement-slot {
  position: relative;
  min-height: 82px;
  border: 1px solid rgba(220, 226, 245, 0.45);
  border-radius: 2px;
  display: grid;
  place-items: center;
  background: rgba(11, 12, 18, 0.58);
}

.achievement-diamond::before {
  width: 36px;
  height: 36px;
  content: "";
  border: 4px solid #e12d2d;
  border-radius: 6px;
  background: #12131a;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 5px rgba(255, 38, 38, 0.28);
}

.achievement-ribbon::before {
  width: 78%;
  height: 36px;
  content: "";
  border-left: 10px solid #a62828;
  border-right: 10px solid #a62828;
  background: linear-gradient(90deg, #d8dde2, #ffffff 42%, #c5cbd2);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.3);
}

.achievement-ribbon::after {
  position: absolute;
  content: "★ ★";
  color: rgba(30, 34, 38, 0.78);
  font-size: 1.7rem;
  letter-spacing: 0.2em;
}

.achievement-empty::before {
  content: "+";
  color: rgba(255,255,255,0.32);
  font-size: 2.4rem;
  font-weight: 200;
}

.profile-empty-panel {
  border: 1px dashed var(--profile-border);
  border-radius: 8px;
  padding: 36px;
  color: var(--profile-muted);
  text-align: center;
  background: rgba(28, 38, 48, 0.42);
}

.profile-empty-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--profile-text);
  font-size: 1.35rem;
}

@media (max-width: 1500px) {
  .profile-top {
    grid-template-columns: 1fr;
  }

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

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

  .profile-weapon-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .player-page.player-page--profile {
    width: min(100% - 20px, 100%);
  }

  .profile-top,
  .profile-filters,
  .profile-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .profile-top,
  .profile-main,
  .profile-filters,
  .profile-header-stats {
    grid-template-columns: 1fr;
  }

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

  .profile-rank-emblem {
    display: none;
  }

  .profile-eagle {
    width: 74px;
    height: 74px;
  }

  .profile-eagle::before {
    font-size: 3.4rem;
  }

  .profile-eagle::after {
    inset: 23px 19px 12px;
  }

  .profile-header-stat {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 14px 0 0;
  }

  .profile-panel {
    padding: 18px;
  }

  .profile-weapon-panel {
    overflow-x: auto;
  }

  .profile-weapon-row {
    min-width: 680px;
  }

  .profile-achievements {
    min-width: 680px;
  }
}

.leaderboard-changes {
  margin-top: 28px;
}

.leaderboard-changes-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.leaderboard-changes h2,
.admin-panel h2,
.auth-panel h2 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.leaderboard-change-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.leaderboard-change-stats span {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.leaderboard-change-stats b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.leaderboard-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.leaderboard-change-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(9, 13, 24, 0.7);
}

.leaderboard-change-card--wide {
  grid-column: 1 / -1;
}

.leaderboard-change-card h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.leaderboard-change-card ol {
  display: grid;
  gap: 8px;
  max-height: 720px;
  margin: 0;
  overflow: auto;
  padding: 0;
  list-style: none;
}

.leaderboard-change-card li {
  display: grid;
  grid-template-columns: 92px minmax(160px, 1fr) minmax(120px, auto) 92px;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(135, 152, 190, 0.12);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.leaderboard-change-card:not(.leaderboard-change-card--wide) li {
  grid-template-columns: 74px minmax(120px, 1fr) 92px;
}

.leaderboard-change-card:not(.leaderboard-change-card--wide) .points-flow {
  display: none;
}

.leaderboard-change-place {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.change-player {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.points-flow {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-page {
  width: min(980px, calc(100% - 32px));
}

.auth-panel,
.admin-panel {
  margin-top: 16px;
}

.admin-form,
.upload-box {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-form label,
.upload-box label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-message.is-error {
  color: var(--negative);
}

.form-message.is-success {
  color: var(--positive);
}

.admin-headline {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-headline.compact {
  margin-top: 28px;
}

.parser-control {
  border: 1px solid rgba(135, 152, 190, 0.14);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.parser-control + .parser-control,
.parser-control + .upload-box {
  margin-top: 16px;
}

.parser-control .admin-headline.compact {
  margin-top: 0;
}

.parser-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.parser-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

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

.parser-status span {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--muted);
  background: rgba(8, 12, 22, 0.54);
}

.parser-status b {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.admin-result {
  margin-top: 20px;
}

.snapshot-list {
  display: grid;
  gap: 10px;
}

.snapshot-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.snapshot-item strong {
  display: block;
  margin-bottom: 4px;
}

.snapshot-item small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-profile-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.admin-profile-search .form-message {
  grid-column: 1 / -1;
}

.admin-checkbox {
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  color: var(--muted);
}

.admin-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.profile-job-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.profile-job-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(141, 164, 193, 0.24);
  background: rgba(7, 13, 19, 0.36);
  border-radius: 8px;
}

.profile-job-item strong {
  color: var(--text);
}

.profile-job-item small {
  color: var(--muted);
}

.profile-job-status {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-job-status--running,
.profile-job-status--queued {
  color: var(--accent);
}

.profile-job-status--done {
  color: var(--positive);
}

.profile-job-status--error {
  color: var(--negative);
}

.profile-archive-toolbar {
  margin: 14px 0 10px;
}

.profile-archive-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.profile-archive-toolbar input {
  width: 100%;
  border: 1px solid rgba(141, 164, 193, 0.34);
  background: rgba(5, 10, 15, 0.56);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 12px;
}

.profile-archive-item {
  grid-template-columns: 1fr auto;
}

.admin-profile-preview {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(61, 191, 212, 0.32);
  background: linear-gradient(145deg, rgba(15, 25, 34, 0.94), rgba(22, 33, 44, 0.88));
  border-radius: 8px;
}

.admin-profile-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-profile-head h3 {
  margin: 2px 0 4px;
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.9;
}

.admin-profile-head small {
  color: var(--muted);
}

.admin-profile-score {
  min-width: 82px;
  padding: 10px 12px;
  text-align: center;
  border: 1px solid rgba(224, 169, 61, 0.45);
  border-radius: 8px;
  color: var(--warning);
  font-family: var(--display-font);
  font-size: 2rem;
  line-height: 1;
}

.admin-profile-metrics,
.admin-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-profile-metrics span,
.admin-profile-facts span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(141, 164, 193, 0.22);
  background: rgba(7, 13, 19, 0.34);
  border-radius: 8px;
}

.admin-profile-metrics small,
.admin-profile-facts small {
  color: var(--muted);
}

.admin-profile-metrics b,
.admin-profile-facts b {
  color: var(--text);
}

.admin-profile-ai {
  margin-top: 14px;
}

.admin-profile-ai > strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
}

.admin-profile-ai > p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-profile-signals {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-profile-signal {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(224, 169, 61, 0.28);
  border-radius: 8px;
  background: rgba(224, 169, 61, 0.08);
}

.admin-profile-signal--danger {
  border-color: rgba(255, 91, 112, 0.32);
  background: rgba(255, 91, 112, 0.08);
}

.admin-profile-signal--info {
  border-color: rgba(61, 191, 212, 0.28);
  background: rgba(61, 191, 212, 0.08);
}

.admin-profile-signal span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .admin-profile-search,
  .admin-profile-metrics,
  .admin-profile-facts {
    grid-template-columns: 1fr;
  }

  .admin-profile-head {
    display: grid;
  }

  .admin-profile-score {
    width: max-content;
  }
}

.danger-button {
  min-height: 38px;
  border: 1px solid rgba(255, 116, 116, 0.35);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--negative);
  background: rgba(255, 116, 116, 0.08);
}

.player-page.player-page--profile {
  width: min(1680px, calc(100% - 8px));
}

.profile-top {
  min-height: 166px;
  grid-template-columns: minmax(420px, 0.75fr) minmax(720px, 1.25fr);
  gap: 28px;
  padding: 18px 28px;
}

.profile-identity {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
}

.profile-eagle {
  width: 76px;
  height: 76px;
}

.profile-eagle::before {
  font-size: 3.4rem;
}

.profile-eagle::after {
  inset: 22px 18px 13px;
}

.profile-rank-emblem {
  width: 46px;
  height: 46px;
}

.profile-nickname {
  font-size: clamp(1.9rem, 2.4vw, 3.2rem);
}

.profile-level {
  padding: 3px 7px;
  font-size: clamp(1rem, 1.2vw, 1.35rem);
}

.profile-header-stats {
  grid-template-columns: minmax(120px, 0.45fr) minmax(220px, 0.7fr) minmax(360px, 1fr);
  gap: 30px;
  align-items: stretch;
}

.profile-header-stat {
  display: grid;
  min-height: 56px;
  align-content: center;
  gap: 4px;
  padding-left: 24px;
  min-width: 0;
}

.profile-header-stat span {
  margin-bottom: 5px;
  font-size: 0.78rem;
}

.profile-header-stat strong {
  display: block;
  font-size: clamp(1.16rem, 1.18vw, 1.58rem);
  line-height: 1.12;
}

.profile-header-stat small {
  display: block;
  font-size: 0.82rem;
  line-height: 1.22;
}

.profile-filters--compact {
  grid-template-columns: 1fr;
  justify-content: stretch;
  gap: 0;
  padding: 14px 26px 0;
}

.profile-filters--compact .profile-select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
}

.profile-main--compact {
  grid-template-columns: minmax(470px, 1.18fr) minmax(370px, 0.88fr) minmax(410px, 1fr);
  gap: 18px;
  padding: 18px 28px 28px;
}

.profile-main--compact .profile-panel {
  padding: 18px;
}

.profile-main--compact .profile-panel-title {
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.profile-main--compact .profile-metrics {
  gap: 16px 22px;
  margin-bottom: 20px;
}

.profile-main--compact .profile-metric span,
.profile-main--compact .profile-rank-row span {
  margin-bottom: 5px;
  font-size: 0.82rem;
}

.profile-main--compact .profile-metric strong {
  font-size: clamp(1.7rem, 2vw, 2.55rem);
}

.profile-main--compact .profile-ranks {
  gap: 14px;
  margin-top: 10px;
}

.profile-main--compact .profile-rank-row {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
}

.profile-main--compact .rank-medal {
  width: 66px;
  height: 66px;
}

.profile-main--compact .profile-rp-value {
  font-size: 2.85rem;
}

.profile-main--compact .profile-rp-unit {
  margin-left: 13px;
  margin-right: 18px;
  font-size: 1.9rem;
}

.profile-main--compact .profile-rp-league {
  font-size: 1.42rem;
}

.profile-main--compact .profile-donut-wrap {
  margin: 0 0 18px;
}

.profile-main--compact .profile-donut {
  width: min(220px, 54vw);
}

.profile-main--compact .profile-donut-core strong {
  font-size: clamp(1.8rem, 2.1vw, 2.8rem);
}

.profile-main--compact .profile-donut-core span {
  font-size: 0.82rem;
}

.profile-main--compact .profile-class-row {
  grid-template-columns: minmax(118px, 1fr) 56px 70px 58px;
  min-height: 36px;
  gap: 10px;
  padding: 0 4px;
}

.profile-main--compact .profile-table-head {
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .profile-top,
  .profile-main--compact,
  .profile-filters--compact,
  .profile-header-stats {
    grid-template-columns: 1fr;
  }

  .profile-top,
  .profile-filters--compact,
  .profile-main--compact {
    padding-left: 14px;
    padding-right: 14px;
  }

  .profile-filters--compact {
    justify-content: stretch;
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .leaderboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .leaderboard-row,
  .leaderboard-row--head {
    grid-template-columns: 70px minmax(150px, 1fr) 90px 74px;
  }

  .leaderboard-row > :nth-child(3),
  .leaderboard-row > :nth-child(6),
  .leaderboard-row--head > :nth-child(3),
  .leaderboard-row--head > :nth-child(6) {
    display: none;
  }

  .leaderboard-change-stats,
  .leaderboard-change-grid,
  .player-summary,
  .player-charts,
  .parser-grid,
  .parser-status {
    grid-template-columns: 1fr;
  }

  .leaderboard-change-card--wide {
    grid-column: auto;
  }

  .leaderboard-change-card li,
  .leaderboard-change-card:not(.leaderboard-change-card--wide) li {
    grid-template-columns: 72px minmax(0, 1fr) 86px;
  }

  .points-flow {
    display: none;
  }

  .player-history-row {
    grid-template-columns: minmax(150px, 1fr) 84px 110px;
  }

  .player-history-row > :nth-child(4),
  .player-history-row > :nth-child(5),
  .player-history-row--head > :nth-child(4),
  .player-history-row--head > :nth-child(5) {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .leaderboard-row,
  .admin-link,
  .primary-button,
  .ghost-button,
  .player-action {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, filter 160ms ease, transform 160ms ease;
  }

  .leaderboard-row:not(.leaderboard-row--head):hover,
  .admin-link:hover,
  .primary-button:hover,
  .ghost-button:hover,
  .player-action:not(:disabled):hover {
    transform: translateY(-1px);
  }
}
