:root {
  /* Suomi-teema: siniset korostukset punaisen tilalla */
  --accent: #2f6fed;
  --accent-dim: #2f6fed33;
  --accent-strong: #1e4fc4;
  --bg: #0a0d14;
  --panel: #11151f;
  --panel-2: #161b28;
  --line: #232a3a;
  --text: #e9edf5;
  --text-dim: #8a92a6;

  --gold: #d4af37;
  --silver: #9aa3b2;
  --bronze: #b06a3a;

  --tier1: #d4af37;
  --tier2: #b9c0cc;
  --tier3: #c47a3a;
  --tier4: #6b7280;
  --tier5: #4b5160;
  --retired: #5a6072;
  --sub-h: #d4af37;
  --sub-l: #b9c0cc;

  --font-display: "Russo One", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #141a29 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Slow-drifting soft glow blobs -- purely decorative depth behind the panels. */
body::before, body::after {
  content: "";
  position: fixed;
  width: 620px; height: 620px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .16;
  z-index: -1;
  pointer-events: none;
}
body::before { background: var(--accent); top: -220px; left: -180px; animation: blobFloatA 20s ease-in-out infinite; }
body::after { background: #7a5bd4; bottom: -260px; right: -160px; animation: blobFloatB 24s ease-in-out infinite; }
@keyframes blobFloatA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(50px, 40px); }
}
@keyframes blobFloatB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, -50px); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

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

.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -3px; margin-right: 4px; }

/* ---------------- Topbar ---------------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: #0c0f18cc;
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { text-decoration: none; display: flex; align-items: center; }
.brand__mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-shadow: 0 0 18px var(--accent-dim);
}
.topnav {
  display: flex;
  gap: 8px;
  background: #0e1220;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}
.topnav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 7px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease);
}
.topnav__link:hover { color: var(--text); background: #1a2032; transform: translateY(-1px); }
.topnav__link:active { transform: translateY(0); }
.topnav__link--discord { color: #b9c2ff; }

.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0e1220;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 220px;
}
.search .icon { color: var(--text-dim); }
.search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  width: 100%;
}
.search input::placeholder { color: var(--text-dim); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

/* ---------------- Page / panel ---------------- */
.page { max-width: 1220px; margin: 28px auto 80px; padding: 0 20px; }
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 60px #0006;
}
.panel::before {
  content: "";
  position: absolute;
  top: -1px; left: 12px; right: 12px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .7;
  border-radius: 2px;
  pointer-events: none;
}

/* ---------------- Kit bar ---------------- */
.kitbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  background: #0c0f18;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 16px;
  margin-bottom: 22px;
}
.kitbtn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.kitbtn:hover {
  color: var(--text);
  background: #1a2032;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px #0006;
}
.kitbtn:active { transform: translateY(0); }
.kitbtn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.kitbtn.active:hover { transform: translateY(-2px); box-shadow: 0 0 0 3px var(--accent-dim); }
.kitbtn .kicon { width: 24px; height: 24px; object-fit: contain; vertical-align: -6px; margin-right: 1px; }

/* ---------------- Overall leaderboard ---------------- */
.lb-head {
  display: grid;
  grid-template-columns: 64px minmax(140px, 1fr) minmax(0, 700px);
  padding: 0 16px 10px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: .06em;
  font-weight: 700;
}
.lb-row {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) minmax(0, 700px);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.lb-row:hover {
  transform: translateY(-2px);
  border-color: var(--accent-strong);
  box-shadow: 0 8px 20px #0007, 0 0 16px var(--accent-dim);
}
.lb-row.rowin { animation: rowIn .35s var(--ease) backwards; }
.lb-row--placeholder { cursor: default; }
.lb-row--placeholder:hover { transform: none; border-color: var(--line); box-shadow: none; }
.lb-row.rank-1 { background: linear-gradient(90deg, #4a3a12, #1c2130); border-color: #7a5b1c; }
.lb-row.rank-2 { background: linear-gradient(90deg, #262b38, #1c2130); border-color: #454f66; }
.lb-row.rank-3 { background: linear-gradient(90deg, #3a2a1a, #1c2130); border-color: #7a4d24; }

/* Rank-1/2/3 get a medal-colored glow on hover instead of the default blue. */
.lb-row.rank-1:hover { border-color: var(--gold); box-shadow: 0 10px 26px #0009, 0 0 26px #d4af3799; }
.lb-row.rank-2:hover { border-color: var(--silver); box-shadow: 0 10px 26px #0009, 0 0 26px #9aa3b299; }
.lb-row.rank-3:hover { border-color: var(--bronze); box-shadow: 0 10px 26px #0009, 0 0 26px #b06a3a99; }

.lb-row--placeholder { opacity: .45; }
.lb-row--placeholder .lb-name { color: var(--text-dim); }

/* Ribbon/flag shaped rank number -- its own border gives a second, inner
   outline distinct from the row card's outer border. */
.lb-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-width: 46px;
  padding: 0 16px 0 10px;
  clip-path: polygon(0 0, 74% 0, 100% 50%, 74% 100%, 0 100%);
  background: #1b2030;
  border: 1px solid var(--line);
  font-style: italic;
  font-weight: 800;
  font-size: 19px;
  color: var(--text-dim);
}
.rank-1 .lb-rank {
  background: linear-gradient(135deg, #f0d478, #a67f1e);
  border-color: #7a5b1c;
  color: #2a1e02;
}
.rank-2 .lb-rank {
  background: linear-gradient(135deg, #d3d9e4, #838da3);
  border-color: #454f66;
  color: #1b2030;
}
.rank-3 .lb-rank {
  background: linear-gradient(135deg, #e0a868, #935b2c);
  border-color: #7a4d24;
  color: #2a1508;
}

.lb-player { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-player > div { min-width: 0; }
.avatar { width: 60px; height: 60px; border-radius: 8px; image-rendering: pixelated; background: transparent; flex: none; object-fit: cover; object-position: top center; }
.avatar--placeholder { filter: brightness(0) saturate(0%); opacity: .85; }
.lb-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-size: 12px; color: var(--text-dim); }

.lb-badges {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.lb-badges::-webkit-scrollbar { display: none; }

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 64px;
  flex: none;
}
.badge__circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e1220;
  border: 3px solid var(--ring-color, var(--tier5));
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.badge:hover .badge__circle { transform: scale(1.08); }
.badge__circle .badge-icon { width: 34px; height: 34px; object-fit: contain; }
.badge.empty .badge__circle .badge-icon { opacity: .5; filter: grayscale(70%); }

.badge__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--tier5);
  background: #00000055;
  padding: 2px 7px;
  border-radius: 6px;
}
.badge__label.dash { color: var(--text-dim); }

.badge.t1 { --ring-color: var(--tier1); }
.badge.t1 .badge__circle { box-shadow: 0 0 10px #d4af3766; }
.badge.t1 .badge__label { color: var(--tier1); }
.badge.t2 { --ring-color: var(--tier2); }
.badge.t2 .badge__label { color: var(--tier2); }
.badge.t3 { --ring-color: var(--tier3); }
.badge.t3 .badge__label { color: var(--tier3); }
.badge.t4 { --ring-color: var(--tier4); }
.badge.t4 .badge__label { color: var(--tier4); }
.badge.t5 { --ring-color: var(--tier5); }
.badge.t5 .badge__label { color: var(--tier5); }

/* Retired keeps its tier colour (e.g. a retired HT1 is still gold) -- just
   slightly muted, never grey. */
.badge.retired .badge__circle { opacity: .78; }
.badge.retired .badge__label { opacity: .85; }

.badge.empty { --ring-color: #2a3143; }
.badge.empty .badge__label { color: var(--text-dim); }

/* ---------------- Kit board (Tier 1-5 columns) ---------------- */
.kitboard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tiercol { min-width: 0; }
.tiercol__head {
  text-align: center;
  padding: 8px 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--text-dim);
  border-bottom: 2px solid var(--line);
  margin-bottom: 10px;
}
.tiercol.t1 .tiercol__head { color: var(--tier1); border-color: var(--tier1); }
.tiercol.t2 .tiercol__head { color: var(--tier2); border-color: var(--tier2); }
.tiercol.t3 .tiercol__head { color: var(--tier3); border-color: var(--tier3); }
.tiercol.t4 .tiercol__head { color: var(--tier4); border-color: var(--tier4); }
.tiercol.t5 .tiercol__head { color: var(--tier5); border-color: var(--tier5); }

.tierplayer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.tierplayer:hover { transform: translateY(-1px); border-color: var(--accent-strong); }
.tierplayer.rowin { animation: rowIn .3s var(--ease) backwards; }
.tierplayer .avatar { width: 38px; height: 38px; border-radius: 6px; }
.sub-pill {
  font-size: 10px;
  font-weight: 800;
  color: #0a0d14;
  background: var(--text-dim);
  border-radius: 4px;
  padding: 1px 5px;
  flex: none;
}
.sub-pill.H { background: var(--sub-h); color: #221a03; }
.sub-pill.L { background: var(--sub-l); color: #20242c; }
.tierplayer.retired .sub-pill { background: var(--retired); color: #fff; }
.tierplayer.retired { opacity: .7; }
.tiername { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tiercol__empty { color: var(--text-dim); font-size: 12px; text-align: center; padding: 10px 4px; opacity: .6; }

.loading { text-align: center; color: var(--text-dim); padding: 40px 0; }

/* ---------------- Empty state (no players yet) ---------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--text-dim);
}
.empty-state .avatar { width: 64px; height: 64px; border-radius: 12px; }
.empty-state .name { font-weight: 700; font-size: 18px; color: var(--text); }
.empty-state small { max-width: 360px; text-align: center; }

/* ---------------- Modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: #000a;
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--panel);
  border: 1px solid var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-dim), 0 20px 60px #000c;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 0;
}
.modal__eyebrow {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--accent);
}
.modal__eyebrow .icon { color: var(--accent); }
.modal__title {
  margin: 10px 20px 16px;
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
}
.modal__close {
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; cursor: pointer; line-height: 1;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.modal__close:hover { color: var(--text); transform: rotate(90deg); }
.modal__close--floating {
  position: absolute; top: 14px; right: 14px; z-index: 2;
}
.modal__body {
  padding: 0 20px 22px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}

/* ---- Tietoa: tabs ---- */
.tabs {
  display: flex;
  gap: 8px;
  margin: 0 20px 16px;
  background: #0c0f18;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}
.tabbtn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}
.tabbtn:hover { color: var(--text); }
.tabbtn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.tabpanel__h { margin: 0 0 14px; font-size: 15px; font-weight: 800; color: var(--text); }

.infocard {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.infocard p { margin: 0; color: var(--text-dim); }
.infocard__title { font-weight: 800; color: var(--accent); margin-bottom: 6px; font-size: 14px; }
.infocard--cta { border-left-color: var(--accent); background: linear-gradient(135deg, var(--accent-dim), var(--panel-2)); }
.infocard__eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 6px;
}
.infocard--cta p { color: var(--text); margin-bottom: 12px; }

.btn-join {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 9px;
  transition: background-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.btn-join:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-dim); }
.btn-join .icon { margin: 0; width: 18px; height: 18px; }

.points-table { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.points-tier {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.points-tier__label { font-weight: 800; font-size: 14px; color: var(--text); }
.points-tier__pills { display: flex; gap: 8px; }
.points-pill {
  display: flex; align-items: center; gap: 6px;
  background: #0e1220;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.points-pill__tag { color: var(--text-dim); }
.points-pill__val { color: var(--text); }
.points-tier.t1 { border-left-color: var(--tier1); }
.points-tier.t1 .points-pill__tag { color: var(--tier1); }
.points-tier.t2 { border-left-color: var(--tier2); }
.points-tier.t2 .points-pill__tag { color: var(--tier2); }
.points-tier.t3 { border-left-color: var(--tier3); }
.points-tier.t3 .points-pill__tag { color: var(--tier3); }
.points-tier.t4 { border-left-color: var(--tier4); }
.points-tier.t4 .points-pill__tag { color: var(--tier4); }
.points-tier.t5 { border-left-color: var(--tier5); }
.points-tier.t5 .points-pill__tag { color: var(--tier5); }
.points-footnote { display: block; margin: 4px 2px 0; color: var(--text-dim); }

/* ---- Search dropdown ---- */
.search { position: relative; }
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px #000a;
  overflow: hidden;
  z-index: 30;
}
.search-results[hidden] { display: none; }
.search-result {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background-color .12s var(--ease);
}
.search-result:hover { background: #1a2032; }
.search-result .avatar { width: 34px; height: 34px; border-radius: 6px; }
.search-result__name { font-size: 13px; font-weight: 600; }
.search-result__meta { margin-left: auto; font-size: 11px; color: var(--text-dim); }
.search-empty { padding: 12px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ---- Player profile modal ---- */
.modal--profile { max-width: 768px; position: relative; }
.profile__head {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px 18px;
  background: radial-gradient(380px 240px at 50% 0%, var(--accent-dim), transparent 70%);
}

/* Tight circular "medal" frame: the body render is cropped (object-fit) to
   a bust so it fills the circle edge-to-edge, with a clean solid ring.
   Rank colour via --ring-color / --ring-glow. */
.profile__avatar-ring {
  width: 204px;
  height: 204px;
  border-radius: 50%;
  padding: 5px;
  background: var(--panel-2);
  border: 4px solid var(--ring-color, var(--accent));
  box-shadow: 0 0 26px var(--ring-glow, var(--accent-dim));
}
.profile__avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  image-rendering: pixelated;
  background: transparent;
}
.profile__head.rank-1 { --ring-color: var(--gold); --ring-glow: #d4af3788; }
.profile__head.rank-2 { --ring-color: var(--silver); --ring-glow: #9aa3b288; }
.profile__head.rank-3 { --ring-color: var(--bronze); --ring-glow: #b06a3a88; }

.profile__name { font-family: var(--font-display); font-size: 24px; color: var(--text); margin-top: 14px; }
.profile__section { padding: 0 20px 20px; }
.profile__label {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 10px;
}
.profile__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile__stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.profile__stat--right { text-align: right; }
.profile__stat-label { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.profile__stat-value { font-family: var(--font-display); font-size: 24px; color: var(--text); }

/* Force the 8 kit badges onto one row; scroll horizontally as a fallback on
   narrow screens instead of ever wrapping to a lonely second row. */
.profile__badges {
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.profile__badges::-webkit-scrollbar { display: none; }
.profile__badges .badge { cursor: pointer; }

/* ---- Load more (Overall tab pagination) ---- */
.load-more-btn {
  display: block;
  margin: 6px auto 4px;
  padding: 10px 22px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease);
}
.load-more-btn:hover { border-color: var(--accent-strong); background: #1a2032; transform: translateY(-1px); }
.load-more-btn:active { transform: translateY(0); }

/* ---- Profile: tier history ---- */
.profile-history { display: flex; flex-direction: column; gap: 6px; }
.history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
}
.history-kit { font-weight: 700; color: var(--text-dim); min-width: 70px; }
.history-change { flex: 1; color: var(--text); }
.history-change strong { color: var(--accent); }
.history-date { color: var(--text-dim); font-size: 11px; white-space: nowrap; }
.history-empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 10px 0; }

/* ---- Testaajat (tester leaderboard) modal ---- */
.modal--testaajat { max-width: 460px; }
.tester-list { display: flex; flex-direction: column; gap: 6px; }
.tester-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
}
.tester-rank { font-family: var(--font-display); color: var(--text-dim); min-width: 24px; }
.tester-tag { flex: 1; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tester-count { font-size: 12px; color: var(--accent); font-weight: 700; white-space: nowrap; }

@media (max-width: 760px) {
  .topbar__inner { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; width: 100%; }
  .kitboard { grid-template-columns: repeat(2, 1fr); }
  .lb-row { grid-template-columns: 32px 1fr; row-gap: 10px; }
  .lb-badges {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .profile__avatar { height: 150px; }
  .modal--profile { max-width: 94vw; }
}
