:root {
  --white: #ffffff;
  --sbg: #f8f7ff;
  --sborder: #e4e0f8;
  --ink: #0d0b1a;
  --smuted: #6b6688;
  --mapbase: #eeedf6;
  --pink: #ff2d6e;
  --pink-ink: #d6195a;
  --purple: #7b2fff;
  --teal: #00d4c8;
  --teal-ink: #00807a;
  --blue-deep: #1560e6;
  --coral: #ff5533;
  --grad: linear-gradient(90deg, #ff2d6e 0%, #7b2fff 40%, #00d4c8 75%, #1a6fff 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button, input { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--ink); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

/* header */
.top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  min-height: 56px; padding: 0 20px; background: var(--white);
  border-bottom: 3px solid transparent;
  border-image: var(--grad) 1;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.word { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.beta { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; background: var(--pink-ink); color: #fff; padding: 2px 6px; border-radius: 4px; }
.spacer { flex: 1 1 0; }
.loc-pill {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--sborder); background: var(--sbg); border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.loc-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.25); }

/* periodes */
.periods { display: flex; gap: 4px; padding: 0 20px; background: var(--white); border-bottom: 1px solid var(--sborder); overflow-x: auto; scrollbar-width: none; }
.periods::-webkit-scrollbar { display: none; }
.periods button {
  flex: none; height: 46px; padding: 0 14px; background: transparent; border: none;
  border-bottom: 2px solid transparent; font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
  color: rgba(13, 11, 26, 0.6);
}
.periods button:hover { color: rgba(13, 11, 26, 0.85); }
.periods button[aria-current='true'] { color: var(--ink); font-weight: 700; border-bottom-color: var(--teal); }

/* advertenties */
.ad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ad-label { font-size: 10px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--smuted); }
.ad-box {
  max-width: 100%; border: 1.5px dashed #c8c4e0; background: var(--white); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--smuted);
}
.ad-frame { border: 0; display: block; background: #fff; max-width: 100%; }
.ad-leader { background: var(--sbg); border-bottom: 1px solid var(--sborder); padding: 10px 20px 12px; }
.ad-inline { padding: 6px 0; }
.rail { flex: 0 0 332px; background: var(--sbg); border-left: 1px solid var(--sborder); }
.rail .ad { position: sticky; top: 16px; padding: 16px; }

/* layout */
.layout { display: flex; flex-wrap: wrap; flex: 1 1 auto; min-height: 640px; }
.side { flex: 1 1 360px; max-width: 360px; background: var(--sbg); border-right: 1px solid var(--sborder); display: flex; flex-direction: column; }
.mapcol { flex: 999 1 560px; min-width: 0; min-height: 560px; background: var(--mapbase); }
.mapbox { position: sticky; top: 0; height: min(760px, calc(100vh - 60px)); min-height: 560px; overflow: hidden; }
#map { position: absolute; inset: 0; }
.maplibregl-ctrl-group button { width: 44px; height: 44px; }
.maplibregl-ctrl-attrib { font-size: 11px; }

.stats {
  position: absolute; left: 16px; bottom: 28px; z-index: 2; display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.95); border: 1px solid var(--sborder); border-radius: 12px;
  box-shadow: 0 2px 8px rgba(13, 11, 26, 0.08); padding: 10px 16px;
}
.stats .n { font-size: 26px; font-weight: 800; color: var(--teal-ink); line-height: 1; }
.stats .t { font-size: 12px; font-weight: 600; line-height: 1.3; }
.map-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-size: 14px; color: var(--smuted); background: var(--mapbase); }

/* zijbalk */
.block { background: var(--white); padding: 14px 16px; border-bottom: 1px solid var(--sborder); }
.label { font-size: 11px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--smuted); }
.loc-input {
  width: 100%; height: 44px; border: 1.5px solid #d4d0ee; border-radius: 10px; padding: 0 12px;
  font-size: 16px; color: var(--ink); background: var(--white); margin-top: 8px;
}
.suggest { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--sborder); border-radius: 10px; background: var(--white); box-shadow: 0 6px 18px rgba(13, 11, 26, 0.12); }
.suggest button { width: 100%; text-align: left; min-height: 40px; padding: 0 10px; border: none; background: transparent; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.suggest button:hover, .suggest button:focus-visible { background: #edecfa; }
.suggest small { color: var(--smuted); font-weight: 500; margin-left: 6px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; background: transparent; border: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--teal-ink); }
.radius { display: flex; align-items: center; gap: 12px; }
.radius label { font-size: 12px; font-weight: 600; }
.radius input { flex: 1 1 auto; accent-color: var(--purple); height: 44px; }
.radius output { font-size: 13px; font-weight: 800; color: var(--purple); min-width: 52px; text-align: right; }

.chips-block { background: var(--white); border-bottom: 1px solid var(--sborder); }
.chips-row { padding: 10px 16px 12px; }
.chips-row + .chips-row { border-top: 1px solid var(--sborder); }
.chips {
  display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 20px; border: 1.5px solid #d4d0ee;
  background: transparent; color: #5a5680; font-size: 13px; font-weight: 600;
}
.chip:hover { background: #edecfa; border-color: #b0acdc; color: #3a3660; }
.chip[aria-pressed='true'] { color: #fff; font-weight: 700; }
.chips.disc .chip[aria-pressed='true'] { background: var(--purple); border-color: var(--purple); }
.chips.cat .chip[aria-pressed='true'] { background: var(--pink-ink); border-color: var(--pink-ink); }
.chip:disabled { border-color: #eceafa; color: #8a86a6; cursor: not-allowed; background: transparent; }

.results { padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; }
.results-head .count { font-size: 12px; font-weight: 500; color: var(--smuted); }

.card {
  display: flex; flex-direction: column; gap: 7px; width: 100%; text-align: left;
  background: var(--white); border: 1.5px solid var(--sborder); border-radius: 12px; padding: 12px 13px; color: var(--ink); text-decoration: none;
}
.card:hover { border-color: #c0bae8; box-shadow: 0 4px 14px rgba(13, 11, 26, 0.08); }
.card.selected { border: 2px solid var(--pink); box-shadow: 0 0 0 3px rgba(255, 45, 110, 0.1); padding: 11.5px 12.5px; }
.card-top { display: flex; align-items: center; gap: 8px; }
.num { flex: none; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.card-title { flex: 1 1 auto; font-size: 14px; font-weight: 700; }
.km { font-size: 15px; font-weight: 800; color: var(--pink-ink); white-space: nowrap; }
.card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-date { margin-left: auto; font-size: 12px; font-weight: 600; }
.card-meta { font-size: 12px; font-weight: 500; color: var(--smuted); }
.badge { font-size: 10px; font-weight: 700; letter-spacing: 0.4px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.badge.outline { background: var(--white); color: #5a5680; border: 1.5px solid #d4d0ee; padding: 1.5px 7px; }

.more { height: 48px; border: 1.5px solid var(--sborder); background: var(--white); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--ink); }
.more:hover { border-color: #c0bae8; }

.empty { text-align: center; padding: 28px 12px; color: var(--smuted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty strong { color: var(--ink); font-size: 15px; }
.empty span { font-size: 13px; line-height: 1.4; max-width: 260px; }
.note { font-size: 12px; color: var(--smuted); }

/* detail */
.back { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px; width: 100%; background: var(--white); border: none; border-bottom: 1px solid var(--sborder); font-size: 13px; font-weight: 700; color: var(--ink); text-align: left; }
.hero { background: var(--white); padding: 16px 16px 18px; border-bottom: 1px solid var(--sborder); display: flex; flex-direction: column; gap: 10px; }
.hero h1 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -0.3px; }
.hero .when { font-size: 15px; font-weight: 600; }
.hero .dist { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--pink-ink); }
.actions { background: var(--white); padding: 14px 16px; border-bottom: 1px solid var(--sborder); display: flex; flex-direction: column; gap: 8px; }
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 24px; background: var(--pink-ink); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; border: none; }
.btn-row { display: flex; gap: 8px; }
.btn-ghost { flex: 1 1 0; height: 44px; border: 1.5px solid #d4d0ee; background: var(--white); border-radius: 22px; font-size: 13px; font-weight: 700; color: var(--ink); }
.btn-ghost:hover { background: #edecfa; }
.facts { background: var(--white); padding: 14px 16px 16px; border-bottom: 1px solid var(--sborder); }
.fact { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sborder); font-size: 13px; }
.fact:first-of-type { margin-top: 6px; }
.fact span:first-child { color: var(--smuted); font-weight: 500; }
.fact span:last-child { font-weight: 700; text-align: right; }
.meter { height: 6px; border-radius: 3px; background: var(--sborder); margin-top: 2px; }
.meter div { height: 6px; border-radius: 3px; background: var(--teal); }
.who { background: var(--white); padding: 14px 16px 16px; border-bottom: 1px solid var(--sborder); display: flex; flex-direction: column; gap: 8px; }
.who li { font-size: 14px; font-weight: 600; }
.who ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.route { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.route .box { background: var(--white); border: 1.5px dashed #c8c4e0; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.route .box strong { font-size: 14px; }
.route .box p { margin: 0; font-size: 13px; color: var(--smuted); line-height: 1.4; }
.source { padding: 4px 16px 20px; font-size: 12px; color: var(--smuted); line-height: 1.5; display: flex; flex-direction: column; gap: 6px; }
.source a { color: var(--teal-ink); font-weight: 700; }

.welcome { background: var(--white); border-bottom: 1px solid var(--sborder); padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.welcome h2 { margin: 0; font-size: 16px; font-weight: 800; }
.welcome p { margin: 0; font-size: 13px; color: var(--smuted); line-height: 1.4; }
.btn-pink { height: 44px; border: none; border-radius: 22px; background: var(--pink-ink); color: #fff; font-size: 14px; font-weight: 700; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; font-size: 12px; color: var(--smuted); border-top: 1px solid var(--sborder); background: var(--white); }

/* pinnen op de kaart */
.pin { position: relative; cursor: pointer; width: 34px; height: 44px; transition: opacity 0.15s; }
.pin svg { display: block; overflow: visible; }
.pin .tag { position: absolute; left: 36px; top: 2px; height: 26px; padding: 0 10px; display: flex; align-items: center; background: #fff; border: 1px solid var(--sborder); border-radius: 13px; font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--ink); }
.dotpin { width: 14px; height: 14px; border-radius: 50%; background: #5a5680; border: 2px solid #fff; cursor: pointer; transition: opacity 0.15s; }
.dotpin.on { background: var(--purple); width: 18px; height: 18px; }
.dim { opacity: 0.3; }
.me { pointer-events: none; width: 60px; height: 60px; border-radius: 50%; background: rgba(0, 212, 200, 0.15); border: 1.5px solid rgba(0, 212, 200, 0.4); display: flex; align-items: center; justify-content: center; }
.me i { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--teal); display: block; position: relative; }
.me i::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--teal); }

/* smalle schermen */
@media (max-width: 1359px) {
  .rail { display: none; }
}
@media (max-width: 760px) {
  .top { padding: 0 16px; }
  .periods { padding: 0 8px; }
  .ad-leader { padding: 6px 0 8px; }
  .layout { flex-direction: column; flex-wrap: nowrap; }
  .mapcol { order: -1; flex: none; min-height: 0; }
  .mapbox { position: relative; height: 300px; min-height: 300px; }
  .side { max-width: none; flex: none; border-right: none; }
  .stats { left: 10px; bottom: 26px; padding: 8px 12px; }
  .stats .n { font-size: 22px; }
}

button.pin, button.dotpin { background: none; border: none; padding: 0; }
button.dotpin { background: #5a5680; border: 2px solid #fff; }
button.dotpin.on { background: var(--purple); }
.pin .tag { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1360px) { .ad-side { display: none; } }

/* footer-links */
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; width: 100%; }
.foot-links a { color: var(--smuted); }

/* toestemmingsbalk */
.consent {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: 380px;
  padding: 16px 18px; background: var(--white); color: var(--ink);
  border: 1px solid var(--sborder); border-radius: 12px; box-shadow: 0 8px 30px rgba(13, 11, 26, 0.18);
  font-size: 14px; line-height: 1.45;
}
.consent p { margin: 6px 0 12px; color: var(--smuted); }
.consent-row { display: flex; gap: 10px; }
.consent-btn {
  flex: 1; min-height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; font-weight: 700;
  background: var(--ink); color: var(--white); border: 2px solid var(--ink);
}
.consent-btn:hover { background: var(--purple); border-color: var(--purple); }
@media (max-width: 520px) { .consent { left: 8px; right: 8px; bottom: 8px; max-width: none; } }

/* tekstpagina's (privacy, voorwaarden) */
.doc { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 20px 48px; line-height: 1.6; flex: 1; }
.doc h1 { font-size: 30px; line-height: 1.2; margin: 8px 0 6px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc .meta { color: var(--smuted); font-size: 14px; margin: 0 0 20px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--sborder); }
.doc th { background: var(--sbg); }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }

/* taalschakelaar */
.lang-switch {
  min-width: 40px; min-height: 32px; padding: 0 10px; border: 1px solid var(--sborder); border-radius: 999px;
  background: var(--white); color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: 0.04em;
}
.lang-switch:hover { border-color: var(--purple); color: var(--purple); }
