:root {
  color-scheme: dark;
  --bg: #12161d;
  --surface: #1a2029;
  --raise: #232b37;
  --line: #2f3744;
  --text: #e9e5db;
  --muted: #9aa3b2;
  --heart: #3b82f6;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --island: #e0a23a;
  --out: #5d6673;
  --good: #6ec48b;
  --focus: #9cc4ff;
  --display: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(59, 130, 246, 0.14), transparent 70%),
    radial-gradient(800px 500px at 100% 0%, rgba(99, 102, 241, 0.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 17px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-block: 40px 72px; }
.wrap { width: 100%; max-width: 980px; margin-inline: auto; padding-inline: 16px; }
a { color: inherit; text-decoration-color: var(--out); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- header ---- */
.top { border-bottom: 1px solid var(--line); background: rgba(26, 32, 41, 0.92); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 1.3rem/1 var(--display); letter-spacing: 0.01em; }
.brand-heart { width: 26px; height: 23px; }
.brand-logo { height: 40px; width: auto; max-width: 160px; display: block; object-fit: contain; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { text-decoration: none; padding: 8px 12px; border-radius: 6px; color: var(--muted); }
.top nav a:hover { color: var(--text); background: var(--raise); }
.top nav a[aria-current="page"] { color: var(--text); background: var(--raise); box-shadow: inset 0 -2px 0 var(--heart); }

.foot { border-top: 1px solid var(--line); background: rgba(21, 24, 30, 0.7); color: var(--muted); font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 36px; align-items: start; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 700 1.1rem var(--display); }
.foot-brand img { height: 30px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.foot-heart { width: 18px; height: 16px; }
.foot-text { margin: 10px 0 0; max-width: 34ch; }
.foot nav { display: grid; gap: 6px; justify-items: start; }
.foot nav a, .foot-side a { text-decoration: none; color: var(--muted); }
.foot nav a:hover, .foot-side a:hover { color: var(--text); }
.foot nav a[aria-current="page"] { color: var(--text); }
.foot-side { display: grid; gap: 8px; justify-items: start; }
.foot-side code { font: 600 0.95rem var(--mono); color: var(--text); background: var(--surface); border: 1px solid var(--line); padding: 4px 10px; border-radius: 6px; }

/* ---- typografie ---- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.2rem, 6.2vw, 3.9rem); letter-spacing: -0.015em; max-width: 24ch; text-wrap: balance; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.page-title { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 28px; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lede { color: var(--muted); max-width: 56ch; font-size: 1.05rem; margin-top: 18px; }

/* ---- hartenmuur ---- */
.hero {
  margin-bottom: 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(36, 42, 52, 0.55), rgba(28, 33, 41, 0.9)),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(255, 255, 255, 0.025) 15px 16px),
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(255, 255, 255, 0.025) 15px 16px),
    var(--surface);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}
.hero-in { padding: 40px clamp(20px, 4vw, 44px) 36px; }
.banner { position: relative; line-height: 0; border-bottom: 1px solid var(--line); }
.banner img { width: 100%; height: clamp(160px, 26vw, 300px); object-fit: cover; display: block; }
.banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, transparent, rgba(28, 33, 41, 0.95)); }
.has-banner .hero-in { padding-top: 24px; }
.wall { list-style: none; margin: 36px 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; }
.wall a { display: block; line-height: 0; padding: 4px; border-radius: 6px; transition: transform 0.12s ease, background 0.12s ease; }
.wall a:hover { background: var(--raise); transform: translateY(-3px); }
.wall .heart { width: 38px; height: 34px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35)); }
.legend { list-style: none; padding: 16px 0 0; margin: 18px 0 0; border-top: 1px solid var(--line); display: flex; gap: 8px 24px; flex-wrap: wrap; color: var(--muted); font-size: 0.92rem; }
.legend b { color: var(--text); font-weight: 700; }
.legend-deaths { margin-left: auto; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend .heart { width: 16px; height: 14px; }

.heart { display: block; }
.heart .hb { fill: var(--heart); }
.heart .hs { fill: rgba(255, 255, 255, 0.55); }
.h-island .hb { fill: var(--island); }
.h-out .hb { fill: #2d3440; stroke: none; }
.h-out .hc { fill: var(--bg); }

@media (prefers-reduced-motion: no-preference) {
  .wall li { animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; animation-delay: calc(min(var(--i, 0), 48) * 28ms); }
  @keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
}

.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.ip { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.ip code { font: 600 1rem var(--mono); color: var(--text); background: var(--surface); border: 1px solid var(--line); padding: 5px 10px; border-radius: 6px; }

.btn {
  font: inherit; color: var(--text); background: var(--raise); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn:hover { border-color: var(--out); }
.btn.small { padding: 5px 12px; font-size: 0.92rem; }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #ff9b9d; }

/* ---- secties ---- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--line); position: relative; }
.sec-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--heart); }
.sec-head a { color: var(--muted); font-size: 0.92rem; }

.post { padding-block: 4px 22px; }
.post + .post { border-top: 1px solid var(--line); padding-top: 22px; }
.cols .post { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-bottom: 14px; }
.cols .post + .post { border-top: 1px solid var(--line); padding-top: 20px; }
.cols .post.pinned { border-color: rgba(224, 162, 58, 0.45); }
.post.pinned h3::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--island); margin-right: 10px; vertical-align: 1px; }
.post .meta { color: var(--muted); font-size: 0.9rem; margin: 6px 0 12px; }
.prose { max-width: 64ch; }
.prose p:last-child { margin-bottom: 0; }
.posts { max-width: 700px; }
.posts .post { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; margin-bottom: 16px; }
.posts .post + .post { border-top: 1px solid var(--line); }

/* ---- badges ---- */
.badge { display: inline-block; font-size: 0.85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; line-height: 1.5; }
.b-alive { color: #7db2ff; }
.b-island { color: var(--island); }
.b-out { color: #aab2bf; }

/* ---- hoofden (skins) ---- */
.head { box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); position: relative; display: inline-block; flex: none; background: var(--raise); border: 1px solid var(--line); overflow: hidden; }
.head img { position: relative; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.head-fallback { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.1rem var(--display); color: var(--muted); }
.head-md { width: 48px; height: 48px; border-radius: 4px; }
.head-lg { width: 64px; height: 64px; border-radius: 4px; }

/* ---- deaths ---- */
.deaths { list-style: none; margin: 0; padding: 0; }
.deaths { display: grid; gap: 12px; }
.death {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--out); border-radius: 10px;
}
.death.is-island { border-left-color: var(--island); }
.death.is-final { border-left-color: #cbd5e1; }
.death.is-revived { border-left-color: var(--good); }
.death .who { font-size: 1.25rem; }
.death .who a { text-decoration: none; }
.death .who a:hover { text-decoration: underline; }
.reason { margin: 4px 0 0; font-weight: 500; }
.vanilla { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; font-style: italic; }
.revived { margin: 8px 0 0; color: var(--good); font-size: 0.92rem; }
.is-revived .who, .is-revived .reason { text-decoration: line-through; text-decoration-color: var(--out); text-decoration-thickness: 1px; }
.is-revived .head { opacity: 0.6; }
.death-side { text-align: right; font-size: 0.92rem; display: grid; gap: 8px; justify-items: end; }
.compact .death { grid-template-columns: auto 1fr; padding: 12px 14px; }
.compact .head-md { width: 40px; height: 40px; }
.compact .death-side { grid-column: 2; text-align: left; justify-items: start; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.compact .death-side br { display: none; }
.compact .vanilla { display: none; }
.compact time .muted { margin-left: 0.6ch; }

.filter { margin-bottom: 20px; max-width: 420px; display: grid; gap: 6px; }
.filter label { color: var(--muted); font-size: 0.92rem; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 12px; width: 100%;
}
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
textarea { min-height: 140px; resize: vertical; }

/* ---- deelnemers ---- */
.grp { margin-bottom: 40px; }
.grp h2 { margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px; }
.count { color: var(--muted); font: 600 1rem var(--sans); }
.players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.player { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; transition: border-color 0.12s ease, transform 0.12s ease; }
.player:hover { border-color: var(--out); transform: translateY(-2px); }
.player:target { border-color: var(--heart); }
.player h3 { margin-bottom: 4px; word-break: break-all; }
.note { margin: 6px 0 0; font-size: 0.9rem; }

/* ---- leeg ---- */
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 22px 24px; color: var(--muted); max-width: 560px; }
.empty p { margin: 0 0 6px; }
.empty p:last-child { margin: 0; }

/* ---- responsive ---- */
@media (max-width: 820px) {
  .cols { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  main { padding-block: 28px 56px; }
  .death { grid-template-columns: auto 1fr; }
  .death-side { grid-column: 2; text-align: left; justify-items: start; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .death-side br { display: none; }
  .death-side time .muted { margin-left: 0.6ch; }
  .wall .heart { width: 30px; height: 27px; }
  .legend-deaths { margin-left: 0; }
  .death { padding: 14px; }
}

/* ---- zo werkt het ---- */
.how { margin-bottom: 56px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 52px 18px 18px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; top: 14px; left: 18px; width: 28px; height: 28px; display: grid; place-items: center;
  font: 700 0.95rem var(--sans); color: #fff; background: var(--island); border-radius: 6px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.steps li:last-child::before { background: var(--accent-strong); }
.steps h3 { font-size: 1.05rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.5; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: 56px; right: -16px; height: 2px; background: repeating-linear-gradient(90deg, var(--out) 0 6px, transparent 6px 12px); opacity: 0.7; }

/* ---- verfijning ---- */
.page-title { padding-bottom: 14px; margin-bottom: 28px; border-bottom: 2px solid var(--line); position: relative; }
.page-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 2px; background: var(--heart); }
.badge { letter-spacing: 0.01em; background: rgba(255, 255, 255, 0.03); }
.b-alive { background: rgba(59, 130, 246, 0.10); }
.b-island { background: rgba(224, 162, 58, 0.08); }
.btn { transition: border-color 0.12s ease, background 0.12s ease; }
.btn:hover { background: #2b323d; }
::selection { background: rgba(59, 130, 246, 0.45); }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
}
@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---- merk zonder logo ---- */
.brand-mono { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #fff; font: 700 1.1rem var(--display); background: linear-gradient(145deg, var(--accent), var(--accent-strong)); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.foot-brand .brand-mono { width: 28px; height: 28px; font-size: 0.95rem; }

/* ---- discord ---- */
.top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-discord { display: inline-flex; align-items: center; gap: 8px; background: #5865f2; color: #fff; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 14px; border-radius: 8px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); transition: filter 0.12s ease, transform 0.12s ease; }
.btn-discord:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-discord.big { padding: 11px 18px; font-size: 1rem; }
.btn-discord svg { flex: none; }
@media (max-width: 560px) { .top-right { width: 100%; justify-content: space-between; } }

/* ---- v2: hero, status, grafieken, filters ---- */
.hero { margin-bottom: 28px; background: radial-gradient(700px 300px at 85% -20%, rgba(59,130,246,.28), transparent 70%), linear-gradient(180deg, #1d2431, #171c25); }
.hero-in { padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); letter-spacing: -0.035em; max-width: 16ch; background: linear-gradient(120deg, #fff 30%, #9cc4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.12rem; max-width: 58ch; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--muted); }
.pill[hidden] { display: none; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--out); }
.pill.is-online { color: var(--text); border-color: rgba(110,196,139,.4); }
.pill.is-online .dot { background: var(--good); box-shadow: 0 0 0 4px rgba(110,196,139,.2); }
.pill-time { font-variant-numeric: tabular-nums; color: var(--text); }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(18px, 3vw, 28px); margin-bottom: 28px; }
.panel-card .wall { margin-top: 18px; max-width: none; }
.surv { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--raise); gap: 2px; }
.surv i { display: block; min-width: 0; transition: width .6s ease; }
.s-alive { background: var(--accent); } .s-island { background: var(--island); } .s-out { background: var(--out); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(110px, 220px) 1fr 36px; gap: 14px; align-items: center; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; background: var(--raise); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); border-radius: 999px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; margin-bottom: 20px; }
.toolbar .filter { margin-bottom: 0; flex: 1 1 280px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .12s ease; }
.chip:hover { color: var(--text); border-color: var(--out); }
.chip.is-on { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-discord.big { padding: 12px 20px; border-radius: 10px; }
@media (max-width: 600px) { .bars li { grid-template-columns: 1fr 36px; } .bars .bar { grid-column: 1 / -1; grid-row: 2; } }
.cols { margin-bottom: 40px; }
.hero h1 { background: linear-gradient(120deg, #fff 45%, #bcd7ff); -webkit-background-clip: text; background-clip: text; }

/* ---- spelersprofiel ---- */
.player[data-ign] { cursor: pointer; transition: border-color .12s ease, transform .12s ease; }
.player[data-ign]:hover { border-color: var(--accent); transform: translateY(-2px); }
dialog.profile { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 28px; position: relative; }
dialog.profile::backdrop { background: rgba(5, 8, 14, .75); backdrop-filter: blur(3px); }
.eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--island); margin: 18px 0 10px; }
.phead { display: flex; gap: 20px; align-items: center; }
.phead img { width: 96px; height: 96px; border-radius: 12px; border: 2px solid var(--line); image-rendering: pixelated; }
.phead h2 { font-size: 2rem; margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat b { font-size: 1.4rem; font-weight: 800; }
.pclose { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1.4rem; cursor: pointer; }
