/* SlakStats - engnekken spelersstats
   Zwart en goud uit het serverlogo; de kop is altijd donker, de rest volgt licht/donker van het apparaat. */

:root {
  color-scheme: light;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --bg: #f4ead5;
  --surface: #fffaf0;
  --surface-2: #f7eedb;
  --line: #e4d5b5;
  --line-strong: #a08a60;
  --text: #1d160b;
  --text-2: #5a4a30;
  --text-3: #6f5f45;
  --gold: #a8740f;          /* staafjes */
  --gold-ink: #8a5c0a;      /* gouden tekst */
  --gold-soft: rgba(200, 146, 47, 0.16);
  --accent: #e9b44c;        /* gekozen tab */
  --accent-on: #1d1405;
  --online: #1e8f38;
  --focus: #9a6a0c;
  --px-ink: #8a5c0a;
  --px-shadow: rgba(138, 92, 10, 0.24);

  /* metalen van het podium (ook in licht en donker gelijk) */
  --metal-gold: #f1c232;
  --metal-gold-edge: #c8901c;
  --metal-iron: #d6d6d6;
  --metal-iron-edge: #a9a9a9;
  --metal-copper: #cf7246;
  --metal-copper-edge: #a2522c;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d0b08;
    --surface: #17130d;
    --surface-2: #211b12;
    --line: #30271a;
    --line-strong: #84704a;
    --text: #f3e8cf;
    --text-2: #c9b792;
    --text-3: #9e8e70;
    --gold: #e9b44c;
    --gold-ink: #f0c060;
    --gold-soft: rgba(233, 180, 76, 0.13);
    --accent: #e9b44c;
    --accent-on: #1d1405;
    --online: #4fd16b;
    --focus: #f0c060;
    --px-ink: #f0c060;
    --px-shadow: #3f2d0f;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

.app { overflow-x: clip; }

a { color: var(--gold-ink); }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.ico { display: block; flex: none; }

/* ------------------------------------------------------------------ kop */

.hero {
  --h-text: #f3e8cf;
  --h-text-2: #bfae8b;
  --h-gold: #f0c060;
  --h-line: rgba(240, 192, 96, 0.22);
  position: relative;
  padding: 36px 16px 60px;
  color: var(--h-text);
  text-align: center;
  background-color: #0a0805;
  background-image:
    radial-gradient(ellipse 62% 58% at 50% 22%, rgba(233, 180, 76, 0.2), rgba(233, 180, 76, 0) 72%),
    linear-gradient(rgba(240, 192, 96, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 192, 96, 0.035) 1px, transparent 1px);
  background-size: auto, 16px 16px, 16px 16px;
  background-position: center, center top, center top;
}

/* pixelrand onderaan: kantelen zoals op een kasteelmuur */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--bg) 50%, transparent 50%) 0 0 / 16px 8px repeat-x;
}

.hero__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  color: inherit;
  text-decoration: none;
  max-width: 100%;
}

.hero__logo {
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  image-rendering: pixelated;
  background: #000;
  box-shadow:
    0 0 0 3px #0a0805,
    0 0 0 5px rgba(240, 192, 96, 0.6),
    0 12px 60px 6px rgba(233, 180, 76, 0.22);
}

.hero__title { margin: 0; line-height: 0; max-width: 100%; }

.hero__title--text {
  font: 900 clamp(40px, 11vw, 88px)/1 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f3c24f;
  text-shadow: 4px 4px 0 #3d2a0c;
}

/* blokletter-titel; --bp = pixels per blok, steeds een heel getal voor scherpe randen */
.wm {
  --bp: 5px;
  display: block;
  width: calc(var(--units) * var(--bp));
  max-width: 100%;
  height: auto;
  overflow: visible;
  shape-rendering: crispEdges;
}
@media (min-width: 360px) { .wm { --bp: 6px; } }
@media (min-width: 560px) { .wm { --bp: 8px; } }
@media (min-width: 800px) { .wm { --bp: 10px; } }
@media (min-width: 1100px) { .wm { --bp: 12px; } }

.wm__glint { animation: wm-glint 7s cubic-bezier(0.45, 0.05, 0.35, 1) 1.2s infinite; }

@keyframes wm-glint {
  0% { transform: translateX(0); }
  16%, 100% { transform: translateX(calc(var(--units) * 1px + 12px)); }
}

.hero__sub {
  margin: 16px 0 0;
  font: 700 13px/1 var(--font-ui);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--h-gold);
}

.status {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
}
.status:empty { display: none; }

.status__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--h-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--h-text-2);
  font-size: 14px;
  line-height: 1.3;
}
.status__item--live { color: var(--h-text); font-weight: 600; }
.status__item--warn { color: #ffd08f; border-color: rgba(240, 160, 64, 0.5); text-align: left; }

.status__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7a705f;
}
.status__item--live .status__dot,
.tag--live .status__dot {
  background: #4fd16b;
  animation: live 2.4s ease-out infinite;
}
.status__dot--warn { background: #f0a040; }

@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(79, 209, 107, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(79, 209, 107, 0); }
}

.totals {
  list-style: none;
  width: 100%;
  max-width: 1000px;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--h-line);
  border: 1px solid var(--h-line);
  border-radius: 6px;
  overflow: hidden;
  text-align: left;
}
@media (min-width: 600px) { .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .totals { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.totals__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon value" "icon label";
  column-gap: 10px;
  align-items: center;
  align-content: start;
  padding: 14px 14px 13px;
  background: #0e0b07;
}
.totals__icon { grid-area: icon; width: 20px; height: 20px; color: var(--h-gold); align-self: start; margin-top: 4px; }
.totals__value { grid-area: value; font-size: 22px; font-weight: 800; line-height: 1.15; color: #fbf1d9; white-space: nowrap; }
.totals__label { grid-area: label; font-size: 12.5px; color: var(--h-text-2); }

/* compacte kop op de spelerspagina */
.hero--compact { padding: 16px 16px 30px; text-align: left; }
.hero--compact .hero__inner {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.hero--compact .hero__brand { flex-direction: row; gap: 14px; }
.hero--compact .hero__logo { width: 64px; height: 64px; box-shadow: 0 0 0 2px #0a0805, 0 0 0 3px rgba(240, 192, 96, 0.6); }
.hero--compact .wm { --bp: 3px; }
@media (min-width: 560px) { .hero--compact .wm { --bp: 4px; } }
.hero--compact .hero__title--text { font-size: 28px; text-shadow: 2px 2px 0 #3d2a0c; }
.hero--compact .hero__sub { display: none; }
.hero--compact .status { margin: 0; justify-content: flex-start; }
.hero--compact .hero__brand:hover .hero__logo { box-shadow: 0 0 0 2px #0a0805, 0 0 0 3px var(--h-gold); }

/* ------------------------------------------------------------------ algemeen */

.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 56px;
}

.section { margin-top: 44px; }
.section:first-child { margin-top: 28px; }

.shead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.shead::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
}
.shead__title { margin: 0; line-height: 0; font: 800 22px/1.2 var(--font-ui); }
.shead__count {
  flex: none;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* blokletters voor sectiekoppen, 3px per blok */
.px {
  --u: 3px;
  display: block;
  width: calc(var(--w) * var(--u));
  height: calc(8 * var(--u));
}
.px__ink { fill: var(--px-ink); }
.px__shadow { fill: var(--px-shadow); }

.loading { margin: 0; padding: 48px 0; text-align: center; color: var(--text-3); }
.empty { color: var(--text-3); margin: 12px 0 0; }

.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}
.notice p { margin: 0 0 12px; }
.notice--big { margin-top: 32px; padding: 40px 20px; text-align: center; }
.notice__title { margin: 0 0 8px; font-size: 22px; }

.more {
  margin-top: 16px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: 600 14px/1 var(--font-ui);
  cursor: pointer;
}
.more:hover { background: var(--surface-2); }

/* namen, badges en avatars */
.pname { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.pname__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  flex: none;
  padding: 2px 5px 3px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge--lg { font-size: 12px; padding: 3px 7px 4px; }

.av {
  --av: 40px;
  position: relative;
  flex: none;
  display: block;
  width: var(--av);
  height: var(--av);
}
.av__tile,
.av__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  image-rendering: pixelated;
}
.av__dot {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--online);
  border: 3px solid var(--surface);
}
.av--xl .av__dot { width: 22px; height: 22px; border-width: 4px; right: -6px; bottom: -6px; }

/* ------------------------------------------------------------------ toplijsten */

.boards { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .boards { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
}

.cats {
  position: relative;
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 2px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent);
}
.cats::-webkit-scrollbar { display: none; }

.cat {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-2);
  font: 600 14px/1.25 var(--font-ui);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.cat:hover { color: var(--text); border-color: var(--line-strong); }
.cat__icon { width: 18px; height: 18px; color: var(--gold-ink); }
.cat__text { display: flex; flex-direction: column; min-width: 0; }
.cat__lead { display: none; }
.cat[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
  box-shadow: inset 0 -3px 0 rgba(60, 35, 0, 0.28);
}
.cat[aria-selected="true"] .cat__icon { color: var(--accent-on); }

@media (min-width: 900px) {
  .cats {
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .cat { width: 100%; padding: 8px 12px; gap: 12px; white-space: normal; }
  .cat__icon { width: 20px; height: 20px; }
  .cat__lead {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--text-3);
    white-space: nowrap;
  }
  .cat__lead-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .cat__crown { width: 11px; height: 11px; color: var(--gold-ink); }
  .cat[aria-selected="true"] .cat__lead,
  .cat[aria-selected="true"] .cat__crown { color: rgba(29, 20, 5, 0.78); }
}

.board {
  min-width: 0;
  padding: 20px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.board:focus { outline: none; }
@media (min-width: 640px) { .board { padding: 24px 24px 20px; } }
/* naast de lange lijst met categorieen blijft de toplijst in beeld */
@media (min-width: 900px) { .board { position: sticky; top: 16px; } }

.board__head { display: flex; align-items: flex-start; gap: 12px; }
.board__icon { width: 28px; height: 28px; margin-top: 2px; color: var(--gold-ink); }
.board__title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; }
.board__desc { margin: 3px 0 0; color: var(--text-3); font-size: 14px; }

/* podium van blokken: goud, ijzer, koper */
.podium {
  --bs: 32px;   /* blokmaat: 16px-textuur x2 */
  --u: 3px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
}
@media (max-width: 359px) { .podium { --cols: 2; } }
@media (min-width: 640px) { .podium { --bs: 48px; --u: 4px; gap: 16px; } }

.pod { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pod--1 { order: 2; }
.pod--2 { order: 1; }
.pod--3 { order: 3; }

.pod__who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 6px 2px 12px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}
.pod__who:hover .pname__text { text-decoration: underline; text-underline-offset: 3px; }
.pod__crown { width: 24px; height: 24px; color: var(--gold-ink); margin-bottom: -2px; }
.pod__name { flex-direction: column; gap: 4px; font-weight: 700; font-size: 13.5px; }
.pod__name .pname__text {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.25;
}
.pod__val { font-size: 15px; font-weight: 800; line-height: 1.2; }
@media (min-width: 640px) {
  .pod__name { font-size: 15px; }
  .pod__val { font-size: 17px; }
}

.pod__step {
  position: relative;
  width: calc(var(--bs) * var(--cols, 3));
  height: calc(var(--bs) * var(--blocks));
  background-color: var(--metal);
  background-image: var(--tex);
  background-size: var(--bs) var(--bs);
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px var(--metal-edge);
}
.pod--1 .pod__step { --blocks: 3; --metal: var(--metal-gold); --metal-edge: var(--metal-gold-edge); --tex: var(--tex-gold, none); }
.pod--2 .pod__step { --blocks: 2; --metal: var(--metal-iron); --metal-edge: var(--metal-iron-edge); --tex: var(--tex-iron, none); }
.pod--3 .pod__step { --blocks: 1; --metal: var(--metal-copper); --metal-edge: var(--metal-copper-edge); --tex: var(--tex-copper, none); }

/* ingegraveerd plaatsnummer op het bovenste blok */
.pod__num {
  position: absolute;
  top: calc((var(--bs) - 8 * var(--u)) / 2);
  left: 50%;
  width: calc(6 * var(--u));
  height: calc(8 * var(--u));
  transform: translateX(-50%);
}
.pod--1 .pod__num__ink { fill: #7a4d06; }
.pod--1 .pod__num__shadow { fill: #fff0a8; }
.pod--2 .pod__num__ink { fill: #575757; }
.pod--2 .pod__num__shadow { fill: #fbfbfb; }
.pod--3 .pod__num__ink { fill: #5e2610; }
.pod--3 .pod__num__shadow { fill: #f4ad85; }

.ranks {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.rank { border-bottom: 1px solid var(--line); }
.rank__link {
  display: grid;
  grid-template-columns: 26px 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  color: inherit;
  text-decoration: none;
}
.rank__link:hover { background: var(--surface-2); }
.rank__link:hover .pname__text { text-decoration: underline; text-underline-offset: 3px; }
.rank__pos { text-align: right; color: var(--text-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank__main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rank__name { font-weight: 600; }
.rank__bar { display: block; height: 6px; }
.rank__fill { display: block; height: 100%; background: var(--gold); border-radius: 0 3px 3px 0; }
.rank__val { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }

/* ------------------------------------------------------------------ spelerslijst */

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }

.search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 520px; }
.search__icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search__input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: 400 16px/1.3 var(--font-ui);
}
.search__input::placeholder { color: var(--text-3); opacity: 1; }
.search__input:focus-visible { outline-offset: 0; }
.search--small { max-width: 380px; margin-bottom: 12px; }

.sort { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 14px; }
.sort::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border: solid var(--text-2);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.sort__select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 34px 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: 600 15px/1.3 var(--font-ui);
  cursor: pointer;
}

.plist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
@media (min-width: 760px) { .plist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .plist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.prow__link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
.prow__link:hover { border-color: var(--line-strong); background: var(--surface-2); }
.prow__link:hover .pname__text { text-decoration: underline; text-underline-offset: 3px; }
.prow__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prow__name { font-weight: 700; }
.prow__meta { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow__meta--live { color: var(--online); font-weight: 600; }
.prow__stats { display: flex; gap: 14px; }
.pstat { display: flex; flex-direction: column; align-items: flex-end; }
.pstat__v { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pstat__l { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
@media (max-width: 440px) { .pstat + .pstat { display: none; } }

/* ------------------------------------------------------------------ spelerspagina */

.crumbs { margin-top: 22px; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: none;
}
.back:hover { text-decoration: underline; text-underline-offset: 3px; }

.profile {
  margin-top: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.profile__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px 20px;
}
@media (max-width: 479px) { .profile__head .av--xl { --av: 72px !important; } }
@media (min-width: 760px) { .profile__head { grid-template-columns: auto minmax(0, 1fr) auto; } }

.eyebrow {
  margin: 0;
  color: var(--gold-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.profile__name {
  margin: 6px 0 8px;
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.profile__name:focus { outline: none; }
.profile__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tag { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 14px; }
.tag--live { color: var(--online); font-weight: 600; }

.profile__key {
  grid-column: 1 / -1;
  display: flex;
  gap: 28px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) {
  .profile__key { grid-column: auto; padding: 0 0 0 28px; border-top: 0; border-left: 1px solid var(--line); }
}
.profile__key div { display: flex; flex-direction: column-reverse; }
.profile__key dt { color: var(--text-3); font-size: 13px; }
.profile__key dd { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15; white-space: nowrap; }

.places { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.places__title { margin: 0 0 10px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.places__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.place {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.place:hover { border-color: var(--line-strong); }
.place__rank { font-weight: 800; font-variant-numeric: tabular-nums; }
.place__icon { width: 16px; height: 16px; color: var(--gold-ink); }
.place.place--gold, .rchip.rchip--gold { background: var(--metal-gold); border-color: var(--metal-gold-edge); color: #2b1b02; }
.place.place--iron, .rchip.rchip--iron { background: var(--metal-iron); border-color: var(--metal-iron-edge); color: #1d1d1d; }
.place.place--copper, .rchip.rchip--copper { background: var(--metal-copper); border-color: var(--metal-copper-edge); color: #2a1206; }
.place--gold .place__icon, .place--iron .place__icon, .place--copper .place__icon { color: currentColor; }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 980px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile {
  min-width: 0;
  padding: 13px 14px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.tile--wide { grid-column: 1 / -1; }
@media (min-width: 980px) { .tile--wide { grid-column: span 2; grid-row: span 3; } }
.tile__top { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.tile__icon { width: 18px; height: 18px; color: var(--gold-ink); }
.tile__label { min-width: 0; color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.25; }
.tile__value { margin: 8px 0 0; font-size: 24px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.tile__note { margin: 4px 0 0; color: var(--text-3); font-size: 12.5px; }
.tile--zero .tile__value { color: var(--text-3); font-weight: 600; }
.tile--zero .tile__icon { color: var(--text-3); }

.rchip {
  flex: none;
  margin-left: auto;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.moves { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 11px; }
.moves__row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.moves__label { color: var(--text-2); }
.moves__bar { display: block; height: 10px; }
.moves__fill { display: block; height: 100%; background: var(--gold); border-radius: 0 4px 4px 0; }
.moves__val { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* alle stats */
.rtabs {
  position: relative;
  display: flex;
  gap: 6px;
  margin: 0 -16px 12px;
  padding: 2px 16px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rtabs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .rtabs { flex-wrap: wrap; margin: 0 0 12px; padding: 0; overflow: visible; } }

.rtab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-2);
  font: 600 14px/1.2 var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
}
.rtab:hover { color: var(--text); border-color: var(--line-strong); }
.rtab__count { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.rtab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-on); box-shadow: inset 0 -3px 0 rgba(60, 35, 0, 0.28); }
.rtab[aria-selected="true"] .rtab__count { color: rgba(29, 20, 5, 0.75); }

.rpanel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  overflow: clip;
}

.stbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.stbl th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.th__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--text-2);
  font: 700 13px/1.2 var(--font-ui);
  text-align: inherit;
  cursor: pointer;
}
.th__btn:hover { color: var(--text); }
.th__btn:focus-visible { outline-offset: -2px; }
.th__arrow { color: var(--text-3); font-size: 10px; }
th.num .th__btn { justify-content: flex-end; }
.stbl td { padding: 8px 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.stbl tbody tr:last-child td { border-bottom: 0; }
.stbl tbody tr:hover { background: var(--surface-2); }
.stbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stbl__empty { color: var(--text-3); text-align: center; }
.stbl__total { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--text-2); text-align: right; font-size: 14px; }

/* advancements */
.advgroup + .advgroup { margin-top: 20px; }
.advgroup__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.advgroup__count {
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.advgroup__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.adv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
}
.adv::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.22);
}

.notfound { text-align: center; padding: 40px 0 8px; }
.notfound__title { margin: 0 0 10px; font-size: 28px; }
.notfound__title:focus { outline: none; }

/* ------------------------------------------------------------------ voet */

.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 44px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 13.5px;
}
.foot p { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .wm__glint { display: none; }
}
