/* Resa Routes op het web — volgens het ontwerpcanvas "Resa Routes web" (ROUTES-WEB-PLAN.md, W6),
   met de kleuren van ResaTheme.swift in de app. Wijkt een kleur af van de app, dan is dat een fout. */
:root {
  --bg: #EEF2F7; --card: #FFFFFF; --sunken: #F6F8FB; --soft: #EDF1F7; --soft2: #E2E8F0;
  --ink: #0F141B; --ink2: #3F4856; --muted: #5A6373; --faint: #8A93A3; --line: rgba(15, 20, 27, .08); --line2: rgba(15, 20, 27, .12);
  --shadow: 0 1px 3px rgba(30, 20, 70, .07);
  --float: 0 8px 28px rgba(30, 20, 70, .16), 0 1px 3px rgba(30, 20, 70, .08);
  --accent: #15803D; --accent-ink: #15803D; --accent-hover: #0F5F2D; --accent-soft: rgba(21, 128, 61, .10); --accent-tint: #E7F3EB;
  --route: #F97316; --red: #EF4444; --red-ink: #DC2626; --red-soft: #FDECEC; --amber: #D97706; --amber-soft: #FEF3C7; --blue: #2563EB;
  --map: #E9EEE6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F141B; --card: #171D26; --sunken: #1D242F; --soft: #232B36; --soft2: #2A3340;
    --ink: #F2F5F9; --ink2: #C6CEDA; --muted: #9AA4B2; --faint: #6E7887; --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4); --float: 0 10px 30px rgba(0, 0, 0, .5);
    --accent: #169A4A; --accent-ink: #4ADE80; --accent-hover: #4ADE80; --accent-soft: rgba(74, 222, 128, .14); --accent-tint: rgba(74, 222, 128, .12);
    --red-soft: rgba(239, 68, 68, .16); --amber-soft: rgba(217, 119, 6, .2); --map: #1B222B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F141B; --card: #171D26; --sunken: #1D242F; --soft: #232B36; --soft2: #2A3340;
  --ink: #F2F5F9; --ink2: #C6CEDA; --muted: #9AA4B2; --faint: #6E7887; --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4); --float: 0 10px 30px rgba(0, 0, 0, .5);
  --accent: #169A4A; --accent-ink: #4ADE80; --accent-hover: #4ADE80; --accent-soft: rgba(74, 222, 128, .14); --accent-tint: rgba(74, 222, 128, .12);
  --red-soft: rgba(239, 68, 68, .16); --amber-soft: rgba(217, 119, 6, .2); --map: #1B222B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); min-height: 100vh;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body:has(#mapview:not([hidden])) { overflow: hidden; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
input, textarea, select { font: inherit; color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; fill: currentColor; stroke: none; flex: none; }
/* Hart: leeg, en vol bij geliked/bewaard */
.ic .f { display: none; }
.act.liked .ic .o, .btn.on .ic .o, .ic.filled .o { display: none; }
.act.liked .ic .f, .btn.on .ic .f, .ic.filled .f { display: inline; }
.ic.muted, .muted { color: var(--faint); }
.ic.green, .green { color: var(--accent-ink); }
.ic.red, .red { color: var(--red-ink); }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.num small { font-size: .62em; font-weight: 600; }
.strong { font-weight: 600; }
.big { font-size: 18px; }
.sub { font-size: 13px; color: var(--muted); }
.sub.small, .small { font-size: 12px; }
.sub.error, .error { color: var(--red-ink); }
.center { text-align: center; }
.left { text-align: left; }
.underline { text-decoration: underline; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.row.top { align-items: flex-start; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 8px; }
.row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; } .gap24 { gap: 24px; }
.col.gap6 { gap: 6px; } .col.gap8 { gap: 8px; } .col.gap10 { gap: 10px; } .col.gap12 { gap: 12px; } .col.gap16 { gap: 16px; }
.mt6 { margin-top: 6px; } .mt12 { margin-top: 12px; }
.pad { padding: 20px; }
.pad-x { padding: 0 4px; }
.card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.card.flush { overflow: hidden; }
.card.block { display: block; color: var(--ink); }
.card.dashed { border: 1.5px dashed var(--line2); box-shadow: none; background: transparent; }
.float { box-shadow: var(--float); }
.empty { color: var(--muted); padding: 20px 4px; margin: 0; }
.empty.wide { grid-column: 1 / -1; }
.center-self { align-self: center; }

/* ---------- Knoppen ---------- */
.btn { height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.soft:hover:not(:disabled) { background: var(--soft2); }
.btn.soft.on .ic { color: var(--red); fill: var(--red); }
.btn.white { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.dark { background: var(--ink); color: var(--card); }
.btn.ghost { color: var(--ink); }
.btn.red { background: var(--red); color: #fff; }
.btn.redsoft, .btn.soft.danger { background: var(--red-soft); color: var(--red-ink); }
.btn.small { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.apple { background: #000; color: #fff; height: 52px; border-radius: 12px; font-size: 17px; padding: 0 28px; align-self: flex-start; }
:root[data-theme="dark"] .btn.apple { background: #fff; color: #000; }
.applelogo { width: 17px; height: 20px; margin-top: -3px; }
.iconbtn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: var(--ink); flex: none; position: relative; }
.iconbtn:hover { background: var(--sunken); }
.iconbtn.soft { background: var(--soft); }
.iconbtn.small { width: 34px; height: 34px; }
.iconbtn.small .ic { width: 17px; height: 17px; }
.iconbtn.danger { color: var(--red-ink); }
.iconbtn.dot::after { content: ""; position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 999px; background: var(--red); border: 2px solid var(--card); }
.roundbtn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; flex: none; }
.roundbtn.green { background: var(--accent); color: #fff; }
.roundic { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--soft); color: var(--ink2); flex: none; }
.roundic.small { width: 32px; height: 32px; border-radius: 10px; }
.roundic.big { width: 64px; height: 64px; }
.roundic.green { background: var(--accent-tint); color: var(--accent-ink); }
.roundic.amber { background: var(--amber-soft); color: var(--amber); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--soft); color: var(--ink2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tag .ic { width: 15px; height: 15px; }
.tag.green { background: var(--accent-tint); color: var(--accent-ink); }
.tag.orange { background: #FFEDD5; color: #C2410C; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.chip .ic { width: 16px; height: 16px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chiprow.sticky { position: sticky; top: 76px; z-index: 3; background: var(--bg); padding: 8px 0; margin: -8px 0; }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--soft); width: fit-content; max-width: 100%; }
.seg button { height: 36px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); padding: 0 16px; white-space: nowrap; flex: 1; }
.seg button.on { background: var(--card); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(30, 20, 70, .12); }
.seg.tight { width: 100%; }
.seg.tight button { padding: 0 6px; font-size: 13px; }
.seg.small button { height: 30px; font-size: 13px; padding: 0 12px; }
.seg.dark button.on { background: var(--ink); color: var(--card); }
.sw { width: 46px; height: 28px; border-radius: 999px; background: #C2C9D6; position: relative; flex: none; }
.sw span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: left .15s; }
.sw.on { background: var(--accent); }
.sw.on span { left: 21px; }
.field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); }
.field.search { border: 0; background: var(--soft); border-radius: 999px; color: var(--muted); }
.field input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; height: 42px; }
.input, textarea, select { min-height: 44px; border-radius: 12px; border: 1px solid var(--line2); padding: 0 14px; background: var(--card); width: 100%; }
textarea { padding: 10px 14px; resize: vertical; min-height: 64px; }
select { width: auto; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- Balk ---------- */
.topbar { position: sticky; top: 0; z-index: 30; min-height: 64px; display: flex; align-items: center; gap: 20px; padding: 0 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink); }
.nav a:hover { background: var(--sunken); color: var(--ink); }
.nav a.on { background: var(--soft); color: var(--accent-ink); }
.topsearch { flex: 1; max-width: 360px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.topsearch .ic { width: 18px; height: 18px; }
.topsearch input { border: 0; background: none; outline: none; font-size: 14px; flex: 1; min-width: 0; color: var(--ink); }
.topright { display: flex; align-items: center; gap: 4px; }
.meav { border-radius: 999px; }
.avatar { border-radius: 999px; background: var(--soft2); color: var(--faint); display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pop { position: fixed; z-index: 60; box-shadow: var(--float); }
.results { top: 58px; right: 120px; width: 420px; max-height: 60vh; overflow-y: auto; padding: 6px; }
.resrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-size: 14px; }
.resrow:hover { background: var(--sunken); color: var(--ink); }

/* ---------- Kaartscherm ---------- */
.mapview { position: fixed; top: 64px; left: 0; right: 0; bottom: 0; display: flex; }
.mapside { position: relative; flex: 1; min-width: 0; background: var(--map); overflow: hidden; }
#mapHost > #map { position: absolute; inset: 0; }
.exside { width: 440px; flex: none; background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
body:not([data-view="explore"]) .exside, body:not([data-view="explore"]) .searcharea, body:not([data-view="explore"]) .excard { display: none !important; }
body:not([data-view="plan"]) .panel, body:not([data-view="plan"]) .maphint, body:not([data-view="plan"]) .profcard { display: none !important; }
.exhead { padding: 20px 20px 10px; display: flex; flex-direction: column; gap: 14px; }
.exhead .seg { width: 100%; }
.listmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.exlist { flex: 1; overflow-y: auto; padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 4px 2px; }
.rc { display: flex; gap: 14px; padding: 12px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; cursor: pointer; color: var(--ink); text-align: left; align-items: flex-start; }
.rc.sel { border-color: var(--route); }
.rc .thumb { width: 92px; height: 92px; border-radius: 12px; background: var(--map); flex: none; overflow: hidden; position: relative; }
.rc .rtitle { font-weight: 700; font-size: 16px; line-height: 1.25; }
.rc .facts { display: flex; gap: 12px; font-size: 14px; margin-top: 6px; flex-wrap: wrap; }
.rc .col { gap: 6px; }
.rc.longhead { align-items: center; }
.btn.wide + .btn.wide { margin-top: 0; }
.mapctl { position: absolute; right: 16px; top: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 4; }
.ctlgroup { display: flex; flex-direction: column; background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--float); }
.ctlgroup .iconbtn { border-radius: 0; }
.ctlgroup .iconbtn + .iconbtn { border-top: 1px solid var(--line); }
.ctlgroup .iconbtn.on { background: var(--soft); color: var(--accent-ink); }
.iconbtn.txt { font-weight: 700; font-size: 13px; }
.maptype { position: absolute; right: 76px; top: 16px; z-index: 4; background: var(--card); }
body[data-view="explore"] .maptype { display: none; }
.maptype button.on { background: var(--soft); box-shadow: none; }
.maphint { position: absolute; left: calc(50% + 200px); top: 16px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(15, 20, 27, .82); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.maphint .ic { width: 16px; height: 16px; }
.searcharea { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 4; background: var(--card); color: var(--ink); height: 40px; font-size: 14px; }
.excard { position: absolute; left: 24px; right: 24px; bottom: 24px; max-width: 680px; margin: 0 auto; padding: 18px 20px; z-index: 4; display: flex; flex-direction: column; gap: 14px; }
.excard .row.figs { gap: 20px; align-items: flex-end; }
.excard .row.btns { gap: 8px; flex-wrap: wrap; }
.sheettitle { font-size: 20px; font-weight: 700; line-height: 1.25; margin-top: 4px; }
.spark { flex: 1; min-width: 140px; height: 48px; }
.sparkfill { fill: var(--accent-soft); }
.sparkline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.poplist { display: flex; flex-direction: column; gap: 2px; }
.poplist button { text-align: left; padding: 8px; border-radius: 8px; }
.poplist button:hover { background: var(--sunken); }

/* Planner */
.panel { position: absolute; left: 16px; top: 16px; bottom: 16px; width: 384px; padding: 20px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 18px; z-index: 5; }
.panel h1 { font-size: 22px; }
#planTools { gap: 2px; }
.wpbox { background: var(--sunken); border-radius: 16px; padding: 4px; display: flex; flex-direction: column; }
.wprow { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 10px; border-radius: 14px; }
.wprow:hover { background: var(--card); }
.wprow .strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wphint { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.wphint .ic { width: 16px; height: 16px; }
#points:empty + .wphint { border-top: 0; }
.wpdot { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; background: #5A6373; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .25); cursor: grab; }
.wpdot.start { background: var(--accent); }
.wpdot.end { background: var(--red); }
.status { margin: 0; font-size: 13px; color: var(--red-ink); }
.status.quiet { color: var(--muted); }
.figs4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .num { font-size: 20px; }
.stat .up, .stat .down { font-size: 12px; font-weight: 700; margin-top: 4px; }
.stat .up { color: var(--accent-ink); }
.stat .down { color: #B45309; }
.breakdown { display: flex; flex-direction: column; gap: 10px; }
.bars-h .bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.lg.cur { background: var(--accent); }
.legend i.lg.ghost { background: var(--soft2); }
.planfoot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.grid3b { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid3b .btn { padding: 0 8px; }
.foot { font-size: 11px; color: var(--faint); margin: 2px 0 0; }
.profcard { position: absolute; left: 416px; right: 76px; bottom: 16px; padding: 14px 20px 10px; z-index: 4; }
.profcard .seg { margin-left: auto; }
#profSum { font-size: 14px; }
.profsvg { width: 100%; height: 120px; display: block; margin-top: 6px; font-size: 11px; }
.profsvg text { fill: var(--muted); font-variant-numeric: tabular-nums; }
.gridl { stroke: var(--line); }
.curl { stroke: var(--ink); stroke-width: 1; }
.curc { fill: var(--card); stroke: var(--ink); stroke-width: 3; }
.maptip { padding: 5px 10px; border-radius: 999px; background: #0F141B; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }
#drop { display: none; position: absolute; inset: 0; z-index: 20; background: rgba(21, 128, 61, .14); border: 3px dashed var(--accent); place-items: center; font-size: 20px; font-weight: 700; color: var(--accent-ink); }
body.dragging #drop { display: grid; }
.maplibregl-ctrl-bottom-left { left: 0; }
body[data-view="plan"] .maplibregl-ctrl-bottom-left { left: 400px; }
body[data-view="plan"].has-profile .maplibregl-ctrl-bottom-left, body[data-view="plan"].has-profile .maplibregl-ctrl-bottom-right { bottom: 190px; }

/* Lagen */
.layerpop { width: 392px; padding: 18px 20px 10px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 90px); overflow-y: auto; }
.pophead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); text-align: center; }
.tile .pv { display: block; height: 70px; border-radius: 12px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tile.on { color: var(--accent-ink); }
.tile.on .pv { border-color: var(--accent); }
.pv-std { background: linear-gradient(160deg, #D8EBD0 0 30%, #EEF0EA 30% 70%, #B9DAEE 70%); }
.pv-topo { background: repeating-radial-gradient(circle at 30% 30%, #F4F1E4 0 7px, #E2D2B0 7px 8px), #F4F1E4; }
.note { font-size: 13px; color: var(--ink2); line-height: 1.45; }
.src { font-size: 12px; color: var(--muted); }
.chips4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.chips4 .chip { padding: 0 6px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.trowic { width: 32px; height: 32px; border-radius: 10px; background: var(--soft); color: var(--ink2); display: grid; place-items: center; flex: none; }
.trowic.amber { background: var(--amber-soft); color: var(--amber); }
.hlstar { width: 30px; height: 30px; border-radius: 999px; background: #F59E0B; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); display: grid; place-items: center; color: #fff; }
.hlstar .ic { fill: #fff; }
.peakmark { width: 26px; height: 26px; border-radius: 999px; background: #3F4856; border: 2px solid #fff; color: #fff; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.peakmark.ski { background: var(--card); color: var(--ink); border-color: #3F4856; }
.peakmark.on { background: var(--accent); transform: scale(1.25); }
.photomark { width: 36px; height: 36px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); object-fit: cover; cursor: zoom-in; }
.replaydot { width: 18px; height: 18px; border-radius: 999px; background: var(--route); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .4); }

/* ---------- Pagina's ---------- */
.page { padding-bottom: 64px; }
.pagewrap { max-width: 1280px; margin: 0 auto; padding: 24px 24px 0; }
.view { display: flex; flex-direction: column; gap: 20px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; width: fit-content; }
.backlink .ic { width: 16px; height: 16px; }
.pagehead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pagehead h1, .pagetitle { font-size: 34px; line-height: 1.1; }
.pagetitle { margin: 8px 0 12px; }
.pagetitle.tight { margin: 0; font-size: 30px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }
.cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cardhead.pad { margin: 0; padding-bottom: 12px; }
.figrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-top: 14px; }
.figrow .stat .num { font-size: 26px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 8px; }
.grid2 .stat .num { font-size: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bignum { font-size: 22px; font-weight: 700; }
.hugenum { font-size: 22px; }
.hugenum b { font-size: 38px; }
.listrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); }
.listrow:first-child, .eyebrow + .listrow, .cardhead + .listrow, .divider + .listrow { border-top: 0; }
.listrow:hover { color: var(--ink); }
.listrow:hover .strong { color: var(--accent-ink); }
a.card.listrow { padding: 18px 20px; border-top: 0; }
.vline { width: 1px; align-self: stretch; background: var(--line); }

/* Kaart in een pagina */
.mapcard { position: relative; height: 440px; background: var(--map); overflow: hidden; }
.mapcard > #map { position: absolute; inset: 0; }
.mapcard.worldmap { height: 340px; }
.mapcard.peakmap { height: 420px; }
.mapcard.hlmap { height: 300px; }
.mapcard.full { position: fixed; inset: 64px 0 0 0; height: auto; z-index: 40; border-radius: 0; }
.mapbtns { position: absolute; right: 14px; top: 14px; z-index: 3; display: flex; gap: 8px; }
.mapbtn { width: 40px; height: 40px; border-radius: 999px; background: var(--card); box-shadow: var(--float); display: grid; place-items: center; color: var(--ink); }
.mappill { position: absolute; right: 112px; top: 14px; z-index: 3; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card); box-shadow: var(--float); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.mappill .ic { width: 16px; height: 16px; }

/* Feed */
.feedgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.fc { display: flex; flex-direction: column; overflow: hidden; }
.fchead { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; }
.fchead.pad { padding: 16px 20px; }
.fchead .strong { color: var(--ink); }
.fctitle { color: var(--ink); padding: 0 16px 12px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.fctitle:hover { color: var(--accent-ink); }
.media { position: relative; aspect-ratio: 4 / 3; background: var(--map); overflow: hidden; cursor: pointer; }
.media .fill, .fillbox .fill, .thumb .fill, .bigthumb .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fillbox { position: absolute; inset: 0; }
.trace { position: absolute; inset: 0; width: 100%; height: 100%; }
.trace path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.media .mini { position: absolute; left: 12px; bottom: 12px; width: 84px; height: 84px; border-radius: 14px; background: var(--map); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); overflow: hidden; }
.media .mini .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pager { position: absolute; right: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(15, 20, 27, .6); color: #fff; font-size: 12px; font-weight: 600; }
.fc .figs4 { padding: 14px 16px 6px; }
.fc .figs4 .num { font-size: 18px; }
.fcacts { display: flex; align-items: center; gap: 2px; padding: 4px 8px 10px; margin-top: auto; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.act:hover { background: var(--sunken); color: var(--ink2); }
.act .ic { width: 18px; height: 18px; }
.act.liked { color: var(--red); }
.act.liked .ic { fill: var(--red); }
.sub.right { margin-left: auto; padding-right: 8px; }

/* Tocht */
.withrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.withu { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.personrow { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.comments { display: flex; flex-direction: column; }
.comment { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.comment:first-child { border-top: 0; }
.comment .strong { color: var(--ink); }
.ctext { margin-top: 2px; overflow-wrap: anywhere; }
.writerow { display: flex; gap: 10px; align-items: center; }
.writerow textarea { flex: 1; }
.chart svg { width: 100%; height: auto; display: block; font-size: 12px; }
.chart text { fill: var(--muted); font-variant-numeric: tabular-nums; }
.mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 150px 150px; gap: 8px; }
.mosaic .ph.big { grid-row: span 2; }
.mosaic.n1 { grid-template-columns: 1fr; grid-template-rows: 340px; }
.mosaic.n2 { grid-template-columns: 2fr 1fr; }
.mosaic.n2 .ph:not(.big) { grid-row: span 2; }
.mosaic.n3 { grid-template-columns: 2fr 1fr; }
.ph { position: relative; border-radius: 14px; overflow: hidden; background: var(--map); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phbadge { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; }
.phmore { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 22px; font-weight: 700; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumbs .ph { aspect-ratio: 1; }
.numgroups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.numgroup .eyebrow { margin-bottom: 8px; }
.numline { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.numline span { color: var(--ink2); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-top: 1px solid var(--line); }
th.r, td.r { text-align: right; }
.splits td:first-child { font-weight: 700; width: 48px; }
.splits td.barcell { width: 58%; }
.splits td.barcell i { display: block; height: 8px; border-radius: 999px; background: var(--soft2); }
.splits tr.best td { color: var(--accent-ink); }
.splits tr.best td.barcell i { background: var(--accent); }
.splits td.num, .splits th:nth-child(n+3) { text-align: right; }
.sporttable td, .sporttable th { padding: 9px 4px; }
.sporttable td:not(:first-child), .sporttable th:not(:first-child) { text-align: right; }
.sporttable tr.on td { color: var(--accent-ink); font-weight: 700; }
.peaktable tr { cursor: pointer; }
.peaktable tr:hover td, .peaktable tr.on td { background: var(--accent-tint); }
.skimark { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 8px; border-radius: 999px; background: var(--soft); vertical-align: middle; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 12px; font-size: 14px; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.info .ic { margin-top: 2px; color: var(--muted); }

/* Profiel */
.profhead { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.profhead h1 { font-size: 26px; margin-bottom: 4px; }
.counts { display: flex; gap: 24px; }
.countcell { display: flex; flex-direction: column; align-items: center; color: var(--ink); }
.countcell b { font-size: 24px; }
.countcell span { font-size: 13px; color: var(--muted); }
a.countcell:hover b { color: var(--accent-ink); }
.histrow { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: calc(var(--h) + 26px); margin: 12px 0 6px; }
.barcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.barbox { position: relative; width: 100%; height: var(--h); display: flex; align-items: flex-end; justify-content: center; }
.barbox i { position: absolute; bottom: 0; border-radius: 8px 8px 3px 3px; }
.barbox i.ghost { width: 100%; background: var(--soft2); }
.barbox i.val { width: 64%; background: #7BC095; }
.barcol.on .barbox i.val, .barcol:hover .barbox i.val { background: var(--accent); }
.barcol.future .barbox i.ghost { opacity: .6; }
.barlbl { font-size: 12px; color: var(--muted); }
.barcol.on .barlbl { color: var(--accent-ink); font-weight: 700; }
.bars:not(:has(.ghost)) .barbox i.val { width: 72%; }
.bartip { display: inline-block; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: var(--card); font-size: 13px; }
.minibars { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.minibars i { width: 10px; border-radius: 3px; background: var(--soft2); }
.minibars i:last-child { background: var(--accent); }
.minibars.months i { width: 9px; background: #B9DCC5; }
.minibars.months i:last-child { background: #B9DCC5; }
.yearrow { display: flex; align-items: center; gap: 20px; padding: 14px 4px; border-top: 1px solid var(--line); color: var(--ink); }
.yearrow:hover { background: var(--sunken); color: var(--ink); }
.yearcell { width: 74px; }
.yearcell b { font-size: 20px; }
.num.ink, b.ink { color: var(--ink); }
.yearnav { display: flex; align-items: center; gap: 18px; padding: 8px 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 15px; }
.yearnav a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink2); font-weight: 600; }
.yearnav .ic { width: 16px; height: 16px; }
.monthbox { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; background: var(--sunken); margin: 6px 0; flex-wrap: wrap; }
.tourgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.owncard { display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.owncard:hover { color: var(--ink); box-shadow: var(--float); }
.owncard .media.wide { aspect-ratio: 2 / 1; border-radius: 14px; }
.owncard .figs4 .num { font-size: 16px; }
.noroute { position: absolute; inset: 0; display: grid; place-items: center; }
.vis { color: var(--faint); }
.sporticon { width: 44px; height: 44px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.sporticon.small { width: 32px; height: 32px; }
.sporticon.small .ic { width: 17px; height: 17px; }
.badgerow { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badgetile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 16px; background: var(--sunken); border: 2px solid transparent; color: var(--ink); }
.badgetile.on { border-color: var(--accent); background: var(--accent-tint); }
/* Zoals BadgeMedal in de app: schijf in de kaartkleur, rand en icoon in de kleur van het niveau */
.medal { width: 72px; height: 72px; border-radius: 999px; background: var(--card); color: var(--tier); border: 4px solid var(--tier);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; position: relative; flex: none; }
.medal::after { content: ""; position: absolute; inset: 5px; border-radius: 999px; border: 1px solid var(--tier); opacity: .35; }
.medaltier { font-size: 8px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medal.big { width: 104px; height: 104px; margin: 0 auto; border-width: 6px; }
.medal.big .medaltier { font-size: 11px; }
.tierdot { width: 12px; height: 12px; border-radius: 999px; background: var(--tier); display: inline-block; }
.progress { padding: 14px 16px; border-radius: 14px; background: var(--sunken); text-align: left; }
.progress .track { height: 8px; border-radius: 999px; background: var(--soft2); margin-top: 10px; overflow: hidden; }
.progress .track i { display: block; height: 100%; border-radius: 999px; }
.tiles3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stattile { padding: 16px; border-radius: 16px; background: var(--sunken); }
.stattile .lbl { font-size: 13px; color: var(--muted); }
.stattile .num { font-size: 28px; }
.private .roundic { margin: 0 auto; }
.personline { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.personline:first-of-type { border-top: 0; }
.cardhead + .personline { border-top: 1px solid var(--line); }
.btn.follow { min-width: 140px; }
.weekgrid { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.weekmonths, .weekcells { display: grid; grid-template-columns: repeat(var(--n), minmax(14px, 1fr)); gap: 6px; min-width: 700px; }
.weekmonths span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.weekcells i, .wk { height: 32px; border-radius: 6px; background: var(--soft); display: block; }
.weekcells i.yes, .wk.yes { background: var(--accent); }
.weekcells i.now, .wk.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.weekcells i.future, .wk.future { background: transparent; border: 1.5px dashed var(--line2); }
.legend .wk { width: 12px; height: 16px; border-radius: 4px; }

/* Anmelden */
.hero { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; min-height: 460px; }
.heroleft { padding: 40px; justify-content: center; }
.heroicon { width: 72px; height: 72px; border-radius: 18px; }
.herotitle { font-size: 40px; }
.lead { font-size: 19px; color: var(--ink2); margin: 0; line-height: 1.5; }
.heroright { position: relative; background: var(--map); }
.art { position: absolute; inset: 0; }
.art svg { width: 100%; height: 100%; display: block; }
.art-bg { fill: var(--map); } .art-green { fill: #D3E4CC; } .art-contour { fill: none; stroke: #C7B994; stroke-opacity: .55; }
.art-water { fill: none; stroke: #A9CDE3; stroke-width: 8; } .art-road { fill: none; stroke: #fff; stroke-width: 6; }
.art-casing { fill: none; stroke: #fff; stroke-width: 11; } .art-route { fill: none; stroke: var(--route); stroke-width: 6; }
.art-start { fill: var(--accent); stroke: #fff; stroke-width: 3; } .art-via { fill: #fff; stroke: var(--route); stroke-width: 3; }
:root[data-theme="dark"] .art-green { fill: #22301F; }
.artcard { position: absolute; left: 20px; bottom: 20px; padding: 14px 16px; }

/* Einstellungen */
.setrow { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
h2 + .setrow { border-top: 0; margin-top: 4px; }
.setrow.col { align-items: stretch; gap: 8px; }
.row.wide { width: 100%; }
.dangerbox { border: 1.5px solid #F5B5B5; background: var(--red-soft); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* Vensters en menu's */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(15, 20, 27, .45); display: grid; place-items: center; padding: 24px; }
.dialog { width: 520px; max-width: 100%; max-height: calc(100vh - 48px); overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog.narrow { width: 500px; }
.dialog.wide { width: 1000px; padding: 0; }
.dialog p { margin: 0; }
.target { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--sunken); font-size: 14px; }
.reasons { display: flex; flex-direction: column; gap: 8px; }
.reason { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sunken); border: 2px solid transparent; text-align: left; }
.reason.on { border-color: var(--accent); background: var(--accent-tint); }
.radio { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--faint); flex: none; }
.reason.on .radio { border: 6px solid var(--accent); }
.rules { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--sunken); }
.rule { display: flex; gap: 12px; align-items: flex-start; }
.menupop { min-width: 220px; padding: 6px; }
.mi { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 10px; font-weight: 600; text-align: left; }
.mi:hover { background: var(--sunken); }
.mi.danger { color: var(--red-ink); }
.notepop { top: 70px; right: 60px; width: 440px; max-height: calc(100vh - 90px); overflow-y: auto; padding: 0 0 0; }
.notepop .pophead { padding: 18px 20px 6px; }
.eyebrow.grp { padding: 14px 20px 6px; }
.noterow { display: flex; gap: 12px; padding: 12px 20px; color: var(--ink); align-items: flex-start; font-size: 14px; }
.noterow:hover { background: var(--sunken); color: var(--ink); }
.noterow.new { background: var(--accent-tint); }
.avwrap { position: relative; flex: none; }
.avbadge { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; color: #fff; border: 2px solid var(--card); }
.avbadge.red { background: var(--red); } .avbadge.blue { background: var(--blue); } .avbadge.orange { background: var(--route); }
.avbadge.green { background: var(--accent); } .avbadge.amber { background: var(--amber); }
.quote { margin: 6px 0; padding: 8px 12px; border-radius: 10px; background: var(--sunken); font-size: 13px; color: var(--ink2); }
.popfoot { padding: 14px 20px; border-top: 1px solid var(--line); text-align: center; }
.popfoot a { display: inline-flex; align-items: center; gap: 4px; }
.qr { width: 220px; height: 220px; border-radius: 16px; background: #fff; padding: 8px; }
.qrbox { padding: 20px; border-radius: 16px; background: var(--sunken); align-items: center; }
.sharegrid { display: grid; grid-template-columns: 1fr 1fr; }
.sharegrid > .col { padding: 26px; }
.sharepreview { background: var(--sunken); display: grid; place-items: center; padding: 28px; }
.sharecanvas { width: 100%; max-width: 320px; max-height: 70vh; object-fit: contain; border-radius: 20px; box-shadow: var(--float); height: auto; }
.shareopts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shareopt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 14px; background: var(--sunken); border: 2px solid transparent; font-size: 13px; font-weight: 600; }
.shareopt.on { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-ink); }
.shareopt span { width: 56px; height: 100px; border-radius: 10px; background: #1B4D33; display: block; }
.shareopt .sw-route { background: linear-gradient(135deg, transparent 47%, #F97316 47% 53%, transparent 53%), #1B4D33; }
.shareopt .sw-number { background: radial-gradient(circle at 50% 50%, #fff 0 10px, transparent 11px), #1B4D33; }
.shareopt .sw-profile { background: linear-gradient(to top, #86EFAC 0 30%, transparent 30%), #1B4D33; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5, 8, 12, .92); display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.lbbtn { position: absolute; width: 48px; height: 48px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lbclose { top: 20px; right: 20px; } .lbprev { left: 20px; top: 50%; } .lbnext { right: 20px; top: 50%; }
.lbcount { position: absolute; bottom: 20px; color: #fff; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--card); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--float); max-width: calc(100vw - 32px); }
.hlform { width: 280px; }
.hlform input[type=text], .hlform textarea { width: 100%; }
.maplibregl-popup-content { border-radius: 14px; padding: 12px 14px; background: var(--card); color: var(--ink); }

/* ---------- Smal (telefoon, kleine vensters) ---------- */
@media (max-width: 1100px) {
  .maphint { display: none; }
  .topsearch { max-width: 260px; }
}
@media (max-width: 900px) {
  .topsearch { display: none; }
  .nav a span { display: none; }
  .maptype { display: none !important; }
  .panel { left: 8px; right: 8px; width: auto; top: auto; max-height: 62%; }
  body[data-view="plan"] .maplibregl-ctrl-bottom-left { left: 0; }
  .mapview { flex-direction: column-reverse; }
  .exside { width: auto; border-right: 0; max-height: 52%; }
  .excard { left: 8px; right: 8px; bottom: 8px; }
  .cols, .cols.even, .hero, .sharegrid, .grid3 { grid-template-columns: 1fr; }
  .numgroups { grid-template-columns: 1fr; gap: 12px; }
  .heroright { min-height: 260px; }
  .heroleft { padding: 24px; }
  .pagewrap { padding: 16px 12px 0; }
  .pagehead h1, .pagetitle { font-size: 28px; }
  .notepop, .results { right: 8px; left: 8px; width: auto; }
  .feedgrid, .tourgrid { grid-template-columns: 1fr; }
  .mapcard { height: 320px; }
}
@media (max-width: 600px) {
  .brand span { display: none; }
  .topbar { gap: 6px; padding: 0 10px; }
  .nav { gap: 0; }
  .nav a { padding: 10px; }
  .figs4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counts { gap: 14px; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 160px 110px 110px; }
  .mosaic .ph.big { grid-column: span 2; grid-row: auto; }
  .tiles3 { grid-template-columns: 1fr; }
}
.personline a.strong, .comment a.strong, .fchead a.strong { color: var(--ink); }
.personline a.strong:hover, .comment a.strong:hover, .fchead a.strong:hover { color: var(--accent-ink); }
.divider + .row.between { margin-top: 8px; }

/* ---------- Na de UI-test van 08-10-2026 ---------- */
.dialog, .dialog.narrow { width: min(500px, calc(100vw - 24px)); }
.dialog.wide { width: min(1000px, calc(100vw - 24px)); }
.cols > *, .feedgrid > *, .tourgrid > * { min-width: 0; }
.seg { overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; }
.tablewrap { overflow-x: auto; }
.minw { min-width: 220px; }
.profhead h1, .personline .grow, .fchead .grow { min-width: 0; overflow-wrap: anywhere; }
.personline a.strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setrow { flex-wrap: wrap; }
.setrow > .grow { min-width: 220px; }
.panel .profcard { position: static; box-shadow: none; padding: 0; background: none; }
.panel .profcard .seg { margin-left: 0; }
.excard .btn { flex-shrink: 0; }
.excard .row.figs { flex-wrap: wrap; }
.excard .stat .num { white-space: nowrap; }
.wpdot { user-select: none; -webkit-user-select: none; }
.narrowonly { display: none; }
/* De uitleg boven de kaart tussen het paneel en de kaartknoppen, en weg als er geen plek is */
.maphint { left: 416px; right: 300px; transform: none; width: fit-content; max-width: calc(100% - 716px); margin: 0 auto; white-space: normal; text-align: center; }
@media (max-width: 1300px) { .maphint { display: none; } }
@media (max-width: 900px) {
  .narrowonly { display: grid; }
  body.searchopen .topsearch { display: flex; position: fixed; top: 70px; left: 8px; right: 8px; max-width: none; margin: 0; z-index: 61; background: var(--card); box-shadow: var(--float); height: 48px; }
  body.searchopen .results { top: 124px; }
  .modal { padding: 12px; }
  .excard { padding: 14px; }
  .excard .spark { display: none; }
  .excard .row.btns .btn { padding: 0 14px; }
  .profhead { gap: 14px; }
  .profhead .avatar { width: 64px !important; height: 64px !important; }
  .counts { flex-wrap: wrap; }
  .numgroups { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .wideonly { display: none; } .topright .iconbtn { width: 40px; } .topbar { gap: 4px; } }
.seg.tight button { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .personline { flex-wrap: wrap; row-gap: 8px; }
  .personline > .grow { flex-basis: calc(100% - 60px); }
  .personline > .btn, .personline > a.sub { margin-left: 56px; }
  .personline > a.sub + .btn { margin-left: auto; }
}
.panel > *, .layerpop > *, .exhead > * { flex-shrink: 0; }
.seg.tight button { flex: 1 1 auto; padding: 0 7px; text-overflow: clip; }
.seg.tight { flex-wrap: wrap; border-radius: 20px; overflow: visible; } .seg.tight button { white-space: nowrap; overflow: visible; }
/* Profil Überblick (ontwerp 08-10-2026) */
.ovrow1 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.ovrow2 { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; }
.ovrow3 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: stretch; }
.ovrow3 .mapcard.worldmap { height: 100%; min-height: 340px; }
.tilecard { color: var(--ink); min-height: 190px; }
.tilecard:hover, .yearlink:hover, a.ink:hover { color: var(--ink); }
.hugevalue { font-size: 34px; font-weight: 800; letter-spacing: -.01em; }
.grid2.big .stat .num { font-size: 30px; }
.yearh { font-size: 30px; }
.yearlink { color: var(--ink); }
a.ink, .ink { color: var(--ink); }
.badgerow.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .ovrow1, .ovrow2, .ovrow3 { grid-template-columns: 1fr; } .badgerow.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Benutzername */
.namefield.good { border-color: #5FB37C; }
.namefield.bad { border-color: #F08B8B; }
.namefield.neutral { background: var(--sunken); }
.fieldmark { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; }
.namefield.good .fieldmark { background: var(--accent); color: #fff; }
/* Admin */
#adminFlag { position: relative; }
#adminFlag .count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--card); }
.tag.redtag { background: var(--red-soft); color: var(--red-ink); }
.quote.big { font-size: 16px; color: var(--ink); padding: 12px 14px; margin: 0; }
/* Noch mal erleben */
.mappill.green { background: var(--accent); color: #fff; }
.replaypanel { position: absolute; left: 14px; bottom: 14px; z-index: 4; width: 300px; max-width: calc(100% - 28px); padding: 12px; border-radius: 16px; background: rgba(23, 29, 38, .92); color: #fff; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--float); }
.replaypanel input[type=range] { width: 100%; accent-color: #22C55E; min-height: 0; padding: 0; border: 0; background: none; }
.rpchip { display: inline-flex; gap: 8px; align-items: center; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; }
.rpsep { opacity: .4; }
.rptimes { font-size: 11px; opacity: .7; margin-top: -6px; }
.rpclose { width: 30px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.rpclose .ic { width: 15px; height: 15px; }
.rpbtn { height: 38px; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rpbtn.primary { background: #15803D; color: #fff; }
.rpbtn.soft { background: rgba(255,255,255,.88); color: #0F141B; min-width: 48px; }
.rpbtn.dark { background: rgba(255,255,255,.14); color: #fff; }
.rpbtn .ic { width: 15px; height: 15px; }
.errbox { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--red-soft); color: var(--red-ink); font-size: 13px; font-weight: 600; }
.hldialog { width: min(580px, calc(100vw - 24px)) !important; background: var(--bg); }
.hlmini { height: 280px; border-radius: 18px; overflow: hidden; position: relative; }
.addph { display: flex; align-items: center; gap: 12px; font-weight: 600; text-align: left; }
.phbox { width: 56px; height: 56px; border-radius: 12px; background: var(--card); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.grid2b { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iconbtn.white { background: var(--card); }
.hlphotos { display: flex; gap: 10px; overflow-x: auto; }
.hlphotos .ph { width: 120px; height: 120px; flex: none; }
.pad-hl { padding: 0 20px 16px; }
.dialog.small { width: min(360px, calc(100vw - 24px)); }
.reqbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; max-width: 460px; color: var(--ink); }
.reqbar:hover { color: var(--ink); }
.emptycard { grid-column: 1 / -1; max-width: 460px; margin: 0 auto; align-items: center; }
/* Routen volgens het ontwerp van 08-10-2026 */
.chip.small { height: 30px; font-size: 12px; padding: 0 11px; }
.bigrc { padding: 12px; display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--route); cursor: pointer; color: var(--ink); }
.bigrc .bigthumb { height: 160px; border-radius: 12px; overflow: hidden; position: relative; background: var(--map); margin-bottom: 6px; }
.rtitle.big { font-size: 18px; font-weight: 700; }
.tag.small { height: 22px; font-size: 11px; padding: 0 8px; }
.listcard { overflow: hidden; }
.rcrow { display: flex; gap: 12px; padding: 12px; border-top: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.rcrow:first-child { border-top: 0; }
.rcrow:hover, .rcrow.sel { background: var(--sunken); }
.thumb.small { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; position: relative; background: var(--map); flex: none; }
.rcrow .facts, .bigrc .facts { font-size: 14px; margin-top: 2px; }
.showall { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); font-weight: 700; color: var(--accent-ink); font-size: 15px; }
.longrow { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); }
.longrow:hover { background: var(--sunken); color: var(--ink); }
.ic.filled { fill: currentColor; }
.minegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.minecard { padding: 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; border: 2px solid transparent; color: var(--ink); min-width: 0; }
.minecard.sel { border-color: var(--route); }
.minethumb { height: 110px; border-radius: 10px; overflow: hidden; position: relative; background: var(--map); margin-bottom: 4px; }
.thumbbtn { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border-radius: 999px; background: rgba(15,20,27,.6); color: #fff; display: grid; place-items: center; z-index: 2; }
.thumbbtn .ic { width: 15px; height: 15px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newtile { border: 1.5px dashed var(--line2); border-radius: 20px; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--accent-ink); font-weight: 600; }
.tools4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.toolbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: var(--sunken); font-size: 12px; font-weight: 600; color: var(--ink); }
.toolbtn:hover { background: var(--soft); }
.toolbtn.danger { color: var(--red-ink); }
.toolbtn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.grip { color: var(--faint); cursor: grab; font-size: 13px; letter-spacing: -2px; padding: 0 4px; user-select: none; }
.wprow.dragging { opacity: .4; }
.wprow.over { box-shadow: inset 0 2px 0 var(--accent); }
.pointpop { width: 220px; }
.pointpop .btn { width: 100%; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile .pv { position: relative; }
.tile .pv.sm { height: 52px; }
.tile .tick { position: absolute; right: 5px; top: 5px; width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.pv-none, .pv-hike, .pv-bike, .pv-mtb { background: linear-gradient(160deg, #D8EBD0 0 28%, #EEF0EA 28%); }
.pv-hike { background: linear-gradient(120deg, transparent 46%, #C026D3 46% 50%, transparent 50%), linear-gradient(160deg, #D8EBD0 0 28%, #EEF0EA 28%); }
.pv-bike { background: linear-gradient(100deg, transparent 46%, #2563EB 46% 50%, transparent 50%), linear-gradient(160deg, #D8EBD0 0 28%, #EEF0EA 28%); }
.pv-mtb { background: linear-gradient(135deg, transparent 46%, #EA580C 46% 50%, transparent 50%), linear-gradient(160deg, #D8EBD0 0 28%, #EEF0EA 28%); }
.blockrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--sunken); }
.appicon { width: 40px; height: 40px; border-radius: 10px; }
a.setrow { color: var(--ink); }
.shareopts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shareopt.off { opacity: .55; cursor: default; }
.shareopt small { font-size: 11px; color: var(--muted); font-weight: 600; }
.shareopt .sw-photo { background: linear-gradient(170deg, #CFE0EE 0 40%, #9FB3C4 40% 65%, #6E8F62 65%); }
.shareopt .sw-onphoto { background: linear-gradient(135deg, transparent 47%, #fff 47% 53%, transparent 53%), linear-gradient(170deg, #CFE0EE 0 40%, #9FB3C4 40%); }
.shareopt .sw-collage { background: linear-gradient(90deg, #CFE0EE 0 49%, transparent 49% 51%, #D8E6D0 51%); }
.infobox { padding: 16px; border-radius: 16px; background: var(--sunken); display: flex; flex-direction: column; gap: 6px; }
.exlist > * { flex-shrink: 0; }
.minecard .rtitle { font-weight: 700; font-size: 15px; }
.card > .setrow:first-child { border-top: 0; padding-top: 4px; }

/* Eigen tochten als lijst: één regel per tocht, cijfers in vaste kolommen */
.iconseg button { padding: 0 10px; display: grid; place-items: center; }
.tourlist { padding: 4px 20px; }
.ownrow { display: grid; grid-template-columns: 84px minmax(0, 1fr) 76px 84px 96px 76px 44px; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); }
.ownrow:hover { color: var(--ink); }
.ownrow:hover .strong { color: var(--accent-ink); }
.ownrow.head { border-top: 0; padding: 12px 0 4px; font-size: 12px; }
.ownrow.head + .ownrow { border-top: 0; }
.ownrow .thumb { position: relative; width: 84px; height: 58px; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.ownrow.head .thumb { height: 0; background: none; }
.ownrow .thumb .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ownrow .thumb .trace { width: 100%; height: 100%; }
.ownrow .what { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ownrow .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ownrow .c { text-align: right; white-space: nowrap; }
.ownrow .c .num { font-size: 16px; }
.ownrow .end { justify-content: flex-end; color: var(--muted); }
.sporticon.tiny { width: 22px; height: 22px; flex-shrink: 0; }
.sporticon.tiny .ic { width: 13px; height: 13px; }
@media (max-width: 900px) {
  .ownrow { grid-template-columns: 72px minmax(0, 1fr) 64px 76px 36px; gap: 12px; }
  .ownrow .thumb { width: 72px; height: 50px; }
  .ownrow .c.avg, .ownrow .c.up { display: none; }
}
@media (max-width: 600px) {
  .tourlist { padding: 4px 14px; }
  .ownrow { grid-template-columns: 56px minmax(0, 1fr) 70px 18px; }
  .ownrow .thumb { width: 56px; height: 42px; }
  .ownrow .c.dur, .ownrow .end > .ic { display: none; }
}

/* Feed als lijst: één kolom brede berichten, cijfers boven een kaart van 2:1 */
.feedgrid.aslist { grid-template-columns: 1fr; max-width: 820px; width: 100%; margin: 0 auto; }
.feedgrid.aslist .fc .fchead { padding: 20px 24px 12px; }
.feedgrid.aslist .fc .fctitle { padding: 0 24px 4px; font-size: 22px; }
.feedgrid.aslist .fc .figs4 { padding: 12px 24px 16px; }
.feedgrid.aslist .fc .figs4 .num { font-size: 22px; }
.feedgrid.aslist .fc > .media { margin: 0 24px; border-radius: 16px; aspect-ratio: 2 / 1; }
.feedgrid.aslist .fc .fcacts { padding: 8px 16px 12px; }
@media (max-width: 600px) {
  .feedgrid.aslist .fc .fchead { padding: 16px 16px 10px; }
  .feedgrid.aslist .fc .fctitle { padding: 0 16px 4px; font-size: 18px; }
  .feedgrid.aslist .fc .figs4 { padding: 10px 16px 14px; }
  .feedgrid.aslist .fc .figs4 .num { font-size: 18px; }
  .feedgrid.aslist .fc > .media { margin: 0; border-radius: 0; aspect-ratio: 2 / 1; }
  .ownrow .ell { white-space: normal; overflow: visible; }
}
/* Profielkop smal: naam naast de foto over de hele rest van de regel, de tellers eronder */
@media (max-width: 600px) {
  .profhead > .grow { flex: 1 1 160px; min-width: 160px; }
  .profhead > .counts { flex: 1 1 100%; justify-content: space-between; }
}
/* Naamkolom van de profielkop houdt ruimte; de tellers schuiven anders naar de volgende regel (820 px) */
.profhead > .grow { flex: 1 1 260px; min-width: 0; }
/* Uitleg naast een pil: de uitleg krijgt de regel, de pil schuift eronder als het niet past */
.introtext { flex: 1 1 260px; }
@media (max-width: 600px) {
  .profhead > .grow { flex: 1 1 160px; min-width: 160px; }
  /* Vier tellers altijd op één rij; een lang woord (Grieks) krimpt en breekt binnen zijn kolom */
  .profhead > .counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .profhead > .counts .countcell span { font-size: 12px; text-align: center; hyphens: auto; overflow-wrap: anywhere; }
}
/* Planner als blad onderin (tablet/telefoon): Openen/GPX/Link blijven zichtbaar, de rest scrolt erboven */
@media (max-width: 900px) {
  .panel .planfoot { position: sticky; bottom: -20px; margin-bottom: -20px; padding: 10px 0 20px; background: var(--card); z-index: 1; box-shadow: 0 -10px 12px -10px rgba(0, 0, 0, .12); }
}

/* Menu onder je foto rechtsboven */
button.meav { padding: 0; border-radius: 999px; display: grid; place-items: center; }
button.meav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menuhead { display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.menuhead:hover .strong { color: var(--accent-ink); }

/* Verversen op een pagina: meteen de pagina, niet eerst de planner (js/boot.js) */
html[data-boot="page"] #mapview { display: none; }
html[data-boot="page"] #page[hidden] { display: block; }

/* Naar het badgepaneel scrollen (smal): niet onder de vaste balk */
aside.side { scroll-margin-top: 80px; }

/* Straal bij Routen: een knopje rechts naast de sporten, zoals in de app */
.radiuschip { margin-left: auto; gap: 4px; padding: 0 10px 0 14px; }
.radiuschip .ic { width: 16px; height: 16px; color: var(--muted); }
/* Routen: sport en straal bovenaan, de afstandsfilters eronder rustiger en met lucht ertussen */
#exTools { display: flex; flex-direction: column; gap: 12px; }
#exTools .chip.small { background: transparent; border-color: var(--line2); color: var(--ink2); }
#exTools .chip.small:hover { background: var(--card); }
#exTools .chip.small.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
/* Een schakelaar (Mijn | In de buurt, Volgend | In de buurt, Overzicht | Tochten) op de grijze pagina:
   --soft was daar bijna even grijs als de pagina, waardoor de niet-gekozen helft los leek te zweven */
.exhead .seg, .pagehead .seg, .page .seg:not(.iconseg) { background: var(--soft2); }
