/* KlimaatPrikker: "veldgids"-stijl. Papier, inkt en mos, met aardse themakleuren. */


:root {
  --paper: #f4f0e5;
  --paper-2: #ebe5d5;
  --paper-3: #ddd5c1;
  --card: #fbf9f3;
  --ink: #1c2a21;
  --ink-2: #4a5a4e;
  --ink-3: #5f6b62;
  --line: #d9d0bb;
  --moss: #4e7b39;
  --moss-d: #375a28;
  --moss-dd: #2c4a20;
  --moss-l: #dfe8d2;
  --clay: #bf5f38;
  --clay-d: #a14c2a;
  --sand: #d3a43c;
  --water: #2c6e86;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --panel-w: 400px;
  --shadow: 0 18px 40px -14px rgba(18, 28, 21, 0.45), 0 2px 6px rgba(18, 28, 21, 0.14);
  --shadow-s: 0 6px 18px -8px rgba(18, 28, 21, 0.4), 0 1px 3px rgba(18, 28, 21, 0.12);
  font-family: var(--sans);
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #16211a; font-size: 15px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--moss-d); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--clay-d); }
::selection { background: var(--moss-l); color: var(--moss-dd); }
input, select { caret-color: var(--moss-d); }
* { scrollbar-width: thin; scrollbar-color: var(--paper-3) transparent; }
h1, h2, h3, .daily-title { text-wrap: balance; }
.lead, .screen-note, .res-desc, .pop p { text-wrap: pretty; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
.muted { color: var(--ink-3); font-size: 13px; }
.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }

.q { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; }

#map { position: fixed; inset: 0; background: #16211a; cursor: crosshair; }
#map.explore-mode { cursor: grab; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: fixed; top: 14px; left: 14px; right: 14px; z-index: 1000;
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 8px; padding: 7px 16px 7px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-s);
}
.brand-mark { width: 24px; height: 24px; color: var(--moss); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand-name em, h1 em { font-style: italic; font-weight: 500; color: var(--moss); }
.hud {
  display: flex; align-items: stretch; gap: 0; padding: 4px 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-s);
}
.hud-mode {
  display: flex; align-items: center; padding: 0 12px; font-weight: 600; font-size: 13px; color: var(--paper);
  background: var(--moss); border-radius: 999px; margin-right: 4px;
}
.hud-item { display: flex; flex-direction: column; justify-content: center; padding: 2px 14px; border-left: 1px solid var(--line); line-height: 1.1; }
.hud-item:nth-child(2) { border-left: none; }
.hud-item small { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.hud-item b { font-family: var(--serif); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums lining-nums; }
.map-toggles { margin-left: auto; display: flex; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); box-shadow: var(--shadow-s);
}
.chip[aria-pressed="true"] { background: var(--moss-l); color: var(--moss-d); border-color: color-mix(in srgb, var(--moss) 45%, var(--line)); }

/* ---------------------------------------------------------------- overlays & kaarten */
.overlay {
  position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 80px 16px 24px; overflow-y: auto;
  background: rgba(22, 33, 26, 0.62);
  backdrop-filter: saturate(0.7);
  animation: fade-in 0.35s ease both;
}
.overlay::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: 0.22;
  background: url("../img/contours.svg") center / cover no-repeat;
}
.card {
  position: relative; min-width: 0; width: min(760px, 100%); padding: 34px 36px 26px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  animation: rise 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
.start-head h1 {
  margin: 6px 0 0; font-family: var(--serif); font-weight: 700; font-size: clamp(44px, 7vw, 68px);
  line-height: 0.95; letter-spacing: -0.03em;
}
.lead { margin: 16px 0 24px; max-width: 60ch; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.lead b { color: var(--ink); font-weight: 600; }

.daily { display: flex; flex-direction: column; gap: 14px; }
.daily-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.daily-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.daily-title .ic { color: var(--moss); }
.daily-no { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.daily-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.daily-slots li {
  position: relative; overflow: hidden; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 6px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  animation: rise 0.4s cubic-bezier(.2, .8, .2, 1) both;
}
.daily-slots li:nth-child(2) { animation-delay: 50ms; }
.daily-slots li:nth-child(3) { animation-delay: 100ms; }
.daily-slots li:nth-child(4) { animation-delay: 150ms; }
.daily-slots li:nth-child(5) { animation-delay: 200ms; }
.s-n { position: absolute; top: 6px; left: 9px; font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--ink-3); }
.s-ic {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 20px;
  background: color-mix(in srgb, var(--c) 15%, var(--card)); color: var(--c);
}
.s-diff { display: flex; gap: 3px; }
.s-diff i { width: 10px; height: 4px; border-radius: 2px; background: var(--paper-3); }
.s-diff i.on { background: var(--ink-2); }
.s-word { margin-top: -3px; font-size: 12px; color: var(--ink-3); }
.daily-slots li.done { padding-bottom: 15px; }
.daily-slots li.done::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--s); }
.s-pts { margin-top: 8px; font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.s-name { max-width: 100%; padding: 0 4px; font-size: 11.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.daily-help { font-size: 14px; color: var(--ink-3); }
.primary.big .ic { transition: transform 0.25s cubic-bezier(.2, .8, .2, 1); }
.primary.big:hover .ic { transform: translateX(3px); }
.primary.big { width: 100%; padding: 15px 22px; font-size: 17px; gap: 10px; }
.daily-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dd-score { display: flex; align-items: baseline; gap: 10px; }
.dd-score b { font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: 1; color: var(--moss); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.dd-score span { color: var(--ink-2); font-size: 14px; }
.dd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dd-actions .secondary { padding: 10px 14px; font-size: 14px; }
.daily-next { margin: 0; font-size: 14px; color: var(--ink-2); }
.daily-next:empty { display: none; }

/* minder zichtbaar: opnieuw spelen, eigen spel, verkennen */
.more { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.more .linklike { color: var(--ink-2); font-weight: 500; font-size: 14px; }
.more .linklike:hover { color: var(--moss-d); text-decoration: underline; text-underline-offset: 3px; }

.screen-note { margin: 0 0 16px; max-width: 60ch; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.custom-actions { margin: 10px 0 0; align-items: center; }
.end-next { margin: -4px 0 14px; font-size: 14px; color: var(--ink-2); }

.set-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; margin-top: 12px; }
fieldset { border: none; margin: 0 0 12px; padding: 0; }
legend, .field span {
  display: block; margin-bottom: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.cat-filters label, .radio { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.cat-filters .n, .legend .n { margin-left: auto; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--moss); width: 16px; height: 16px; margin: 0; }
.field { display: block; margin-bottom: 12px; }
select, input[type="text"], input[type="search"] {
  width: 100%; padding: 9px 11px; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
select:focus, input:focus { outline: 2px solid var(--moss); outline-offset: 0; border-color: transparent; }
.start-foot { display: flex; justify-content: center; align-items: center; margin-top: 10px; text-align: center; text-wrap: balance; color: var(--ink-3); font-size: 13px; }
.linklike { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; color: var(--moss-d); font-weight: 600; text-decoration: none; }
.linklike:hover { color: var(--clay-d); }

/* ---------------------------------------------------------------- themachips */
.cat-chip {
  --c: var(--moss);
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 70%, var(--ink));
  background: color-mix(in srgb, var(--c) 15%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.cat-chip .ic { color: var(--c); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px color-mix(in srgb, currentColor 0%, var(--line)); }

/* ---------------------------------------------------------------- spelpaneel */
.panel {
  position: fixed; z-index: 1100; top: 76px; left: 14px; bottom: 14px; width: var(--panel-w);
  display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: slide-in 0.4s cubic-bezier(.2, .8, .2, 1) both;
  scrollbar-width: thin; scrollbar-color: var(--paper-3) transparent;
}
.panel-head { display: flex; flex-direction: column; }
.photo { margin: 0; }
.panel.is-result .q { display: none; }
.panel.is-result .photo-wrap { aspect-ratio: 16 / 9; }
.photo-wrap {
  position: relative; aspect-ratio: 4 / 3; padding: 6px; border-radius: 14px;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 20px -12px rgba(0, 0, 0, 0.5);
}
.photo-wrap img {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; background: var(--paper-2);
  cursor: zoom-in; transition: opacity 0.35s ease;
}
.photo-wrap img.loading { opacity: 0.15; }
.photo-badge {
  position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(244, 240, 229, 0.94); color: var(--ink); box-shadow: var(--shadow-s);
}
.photo-badge:empty { display: none; }
.photo-zoom {
  position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 32px; height: 32px;
  border: none; border-radius: 10px; background: rgba(244, 240, 229, 0.94); color: var(--ink); box-shadow: var(--shadow-s);
}
.photo-credit { margin-top: 7px; font-size: 11.5px; color: var(--ink-3); line-height: 1.4; font-style: italic; }
.photo-credit a { color: var(--ink-3); }
.round-note { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); }
#map.plain-map { background: #e9e7e1; }
.clue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.clue-type { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink-2); }

#guess-ui, #result-ui { display: flex; flex-direction: column; gap: 12px; }
.hints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hint {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13.5px; font-weight: 500;
  background: var(--card); border: 1px dashed var(--paper-3); border-radius: 12px; color: var(--ink-2);
  transition: border-color 0.15s, background 0.15s;
}
.hint:hover:not(:disabled) { border-style: solid; border-color: var(--clay); color: var(--ink); }
.hint { flex-wrap: wrap; gap: 2px 7px; padding: 9px 10px; }
.hint span { min-width: 0; }
.hint small { flex-basis: 100%; padding-left: calc(1.15em + 7px); font-weight: 600; color: var(--clay-d); font-variant-numeric: tabular-nums; }
.hint:disabled { opacity: 0.45; cursor: default; }
.hint-out:empty { display: none; }
.hint-out { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.hint-out img { width: 100%; border-radius: 12px; cursor: zoom-in; border: 6px solid #fff; box-shadow: var(--shadow-s); }
.hint-prov {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--clay) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--clay) 30%, transparent);
}
.hint-prov .ic { color: var(--clay); }
.hint-desc {
  display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--clay) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--clay) 30%, transparent);
}
.hint-desc .ic { flex-shrink: 0; margin-top: 0.2em; color: var(--clay); }
.hint-desc p { margin: 0; line-height: 1.5; text-wrap: pretty; }
.report { font-size: 13px; }
.report .report-toggle { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.report .report-toggle:hover { color: var(--clay-d); }
.report-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.report-opt { padding: 6px 11px; font-size: 13px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.report-opt:hover:not(:disabled) { border-color: var(--clay); }
.report-opt:disabled { opacity: 0.5; cursor: default; }
.report-done { margin: 0; font-weight: 600; color: var(--moss-d); }

.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; transition: background 0.15s, transform 0.1s;
}
.primary { border: none; background: var(--moss-d); color: var(--paper); box-shadow: 0 6px 16px -8px rgba(44, 74, 32, 0.85); }
.primary:hover:not(:disabled) { background: var(--moss-dd); }
.primary:active:not(:disabled) { transform: translateY(1px); }
.primary:disabled { background: var(--paper-2); color: var(--ink-3); box-shadow: none; cursor: default; }
.secondary { background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, var(--ink-3)); color: var(--ink); }
.secondary:hover { border-color: var(--ink-2); }
.secondary:active { transform: translateY(1px); }
.primary .ic, .secondary .ic { font-size: 1.05em; }
/* hoofdknop blijft zichtbaar onderin het paneel, ook als hints het paneel langer maken */
#btn-guess, #btn-next { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 0 0 10px var(--paper), 0 -14px 18px 2px var(--paper); }
.kbd-tip { margin: -4px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
kbd { padding: 1px 6px; font: 600 11px var(--sans); background: var(--card); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; }

.result-score { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-score > div { display: flex; flex-direction: column; padding: 10px 14px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.res-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.res-dist, .res-pts { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; }
.res-pts { color: var(--moss); }
.res-bar { height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.res-bar div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--clay), var(--sand) 50%, var(--moss)); transition: width 0.9s cubic-bezier(.2, .8, .2, 1); }
.res-note { margin: 0; font-size: 13px; font-weight: 600; color: var(--clay-d); }
.res-note:empty { display: none; }
.res-name { margin: 2px 0 0; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; }
.res-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-2); }
.res-desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.res-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; font-weight: 500; }
.res-links a, .pop .pm a { display: inline-flex; align-items: center; gap: 3px; }
.res-links .ic, .pop .pm a .ic { width: 0.95em; height: 0.95em; }

/* ---------------------------------------------------------------- eindscherm */
.end-title { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; }
.end-score-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.end-score { font-family: var(--serif); font-weight: 700; font-size: 64px; line-height: 1; color: var(--moss); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.03em; }
.end-sub { color: var(--ink-2); font-size: 14px; }
/* per ronde een streep, in de geest van de "warming stripes": klei = ver weg, mos = raak */
.stripes { display: flex; height: 46px; border-radius: 12px; overflow: hidden; margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.stripes span { flex: 1; transform-origin: bottom; animation: grow 0.5s cubic-bezier(.2, .8, .2, 1) both; }
.end-grid { display: grid; gap: 4px; max-height: 250px; overflow-y: auto; margin-bottom: 18px; }
.end-row {
  display: grid; grid-template-columns: 12px 1fr auto auto; gap: 12px; align-items: center;
  padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
}
.end-row .sw { width: 12px; height: 12px; border-radius: 3px; }
.end-row .e-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.end-row .e-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.end-row .e-dist { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.end-row .e-pts { font-family: var(--serif); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; min-width: 44px; text-align: right; }
.end-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.name-form {
  margin-bottom: 16px; padding: 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--moss) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--moss) 30%, transparent);
}
.name-form[hidden] { display: none; }
.name-form label { display: block; margin-bottom: 8px; font-family: var(--serif); font-weight: 600; font-size: 16px; }
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; min-width: 0; }
.name-row .primary { padding: 9px 18px; }
.board-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 19px; }
.board-title small { font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--ink-3); }
.board { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.board li {
  display: flex; align-items: baseline; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.board li .b-rank { width: 26px; flex-shrink: 0; font-family: var(--serif); font-style: italic; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.board li .b-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li.gap { margin-top: 8px; border-top: 1px dashed var(--line); }
.board-count { margin: -6px 0 8px; font-size: 13px; color: var(--ink-3); }
.board-count:empty { display: none; }
.name-help { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.name-error { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; color: var(--clay-d); }
.name-error:empty { display: none; }
.board li .b-score { margin-left: auto; font-family: var(--serif); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.board li.me { color: var(--moss-d); font-weight: 600; }
.board-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 8px; }
.board-day { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 19px; }
.board-head .board-count { margin: 0; }
.board-head .linklike { margin-left: auto; font-size: 14px; }
.hist-title { margin: 28px 0 6px; font-family: var(--serif); font-weight: 600; font-size: 17px; }
.history { list-style: none; margin: 0 0 20px; padding: 0; }
.history button {
  width: 100%; display: grid; grid-template-columns: 7em minmax(0, 1fr) auto 4.5em; align-items: baseline; gap: 12px;
  padding: 8px 6px; background: none; border: none; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px;
}
.history button:hover { background: var(--card); }
.history button[aria-pressed="true"] { background: var(--moss-l); }
.h-day { color: var(--ink-2); }
.h-win { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-score { font-family: var(--serif); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.h-me { font-size: 13px; font-weight: 600; color: var(--moss-d); text-align: right; }
.history .muted { padding: 6px 4px; }
.daily-yday {
  align-self: center; max-width: 100%; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px;
  background: none; border: none; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); transition: background 0.15s;
}
.daily-yday:hover { background: var(--card); }
.daily-yday .ic { align-self: center; color: var(--moss); }
.yd-name { min-width: 0; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.yd-score { font-family: var(--serif); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.yd-me { color: var(--moss-d); font-weight: 600; white-space: nowrap; }
.challenge, .end-vs { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.challenge .ic, .end-vs .ic { flex-shrink: 0; margin-top: 0.2em; color: var(--clay); }
.challenge > span, .end-vs > span { min-width: 0; text-wrap: pretty; }
.challenge b, .end-vs b { font-family: var(--serif); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.challenge .linklike { display: inline; font-size: 15px; margin-left: 4px; }
.end-vs { margin: -6px 0 16px; }

/* ---------------------------------------------------------------- verkennen */
.explore {
  position: fixed; z-index: 1100; top: 76px; left: 14px; width: 310px; max-height: calc(100% - 90px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: slide-in 0.4s cubic-bezier(.2, .8, .2, 1) both;
}
.search { position: relative; display: block; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 34px; }
.legend label { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.legend .ic, .cat-filters .ic { color: var(--c); }
.search-hits { display: flex; flex-direction: column; gap: 1px; margin-top: -4px; }
.search-hits button {
  display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 8px; font-size: 13.5px;
  background: none; border: none; border-radius: 8px;
}
.search-hits button:hover { background: var(--card); }
.search-hits .ic { color: var(--c); }

/* ---------------------------------------------------------------- over-pagina */
html.doc, html.doc body { height: auto; overflow: auto; }
html.doc body { min-height: 100vh; background: #16211a; }
html.doc body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: 0.22;
  background: url("../img/contours.svg") center / cover no-repeat;
}
a.primary, a.secondary { text-decoration: none; }
a.primary:hover { color: var(--paper); }
a.secondary:hover { color: var(--ink); }
.doc-top { position: relative; z-index: 1; display: flex; padding: 14px; }
.doc-top .brand { color: var(--ink); text-decoration: none; }
.doc-sheet {
  position: relative; z-index: 1; width: min(720px, calc(100% - 32px)); margin: 18px auto 64px; padding: 48px 56px 40px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  animation: rise 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
.doc-sheet h1 { margin: 0 0 16px; font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 6vw, 54px); line-height: 1; letter-spacing: -0.03em; }
.doc-sheet h2 { margin: 36px 0 8px; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.doc-sheet p { margin: 0 0 12px; max-width: 62ch; font-size: 16.5px; line-height: 1.65; text-wrap: pretty; }
.doc-sheet .doc-lead { font-size: 18.5px; line-height: 1.55; color: var(--ink-2); }
.doc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.doc-cta { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc-cta .primary.big { width: auto; }

/* ---------------------------------------------------------------- Leaflet */
.leaflet-container { font-family: var(--sans); }
.leaflet-control-attribution { background: rgba(244, 240, 229, 0.85) !important; color: var(--ink-2) !important; font-size: 10px; border-top-left-radius: 8px; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; border-radius: 12px !important; overflow: hidden; box-shadow: var(--shadow-s) !important; }
.leaflet-bar a { width: 36px !important; height: 36px !important; line-height: 36px !important; background: var(--paper) !important; color: var(--ink) !important; border-color: var(--line) !important; font-family: var(--serif); }
.leaflet-bar a:hover { background: var(--card) !important; }
.leaflet-popup-content-wrapper { background: var(--paper); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
.leaflet-popup-tip { background: var(--paper); }
.leaflet-popup-content { margin: 12px; width: 290px !important; }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-2); top: 6px; right: 6px; }
.leaflet-tooltip { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-s); font-weight: 500; }
.leaflet-tooltip-top::before { border-top-color: var(--paper); }
.pop img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 5px solid #fff; background: var(--paper-2); box-shadow: var(--shadow-s); }
.pop h4 { margin: 10px 0 2px; font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.2; }
.pop .pm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12px; margin-bottom: 6px; }
.pop p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.pop .credit { font-size: 10.5px; font-style: italic; color: var(--ink-3); }
.pop .credit a { color: var(--ink-3); }

/* markers */
.pin-guess, .pin-true, .dist-wrap { background: none; border: none; }
.pin-guess svg { width: 34px; height: 44px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45)); animation: drop 0.35s cubic-bezier(.3, 1.4, .5, 1) both; }
.pin-true span {
  display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 7px solid var(--moss);
  box-shadow: 0 0 0 0 rgba(244, 240, 229, 0.8), 0 3px 8px rgba(0, 0, 0, 0.5); animation: pulse 1.8s infinite;
}
.dist-label {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 4px 11px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 600 13px var(--sans); box-shadow: var(--shadow-s);
}

/* ---------------------------------------------------------------- lightbox & toast */
.lightbox { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: rgba(16, 24, 19, 0.92); cursor: zoom-out; animation: fade-in 0.2s ease both; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 6px; border: 8px solid #fff; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3000; padding: 11px 20px; border-radius: 999px;
  width: max-content; max-width: calc(100vw - 32px); text-align: center; text-wrap: balance;
  background: var(--ink); color: var(--paper); font-weight: 500; box-shadow: var(--shadow); animation: rise 0.3s ease both;
}

/* ---------------------------------------------------------------- beweging */
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-16px); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 240, 229, 0.8), 0 3px 8px rgba(0, 0, 0, 0.5); }
  70% { box-shadow: 0 0 0 22px rgba(244, 240, 229, 0), 0 3px 8px rgba(0, 0, 0, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(244, 240, 229, 0), 0 3px 8px rgba(0, 0, 0, 0.5); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- mobiel */
@media (max-width: 760px) {
  :root { --panel-w: auto; }
  .topbar { top: 10px; left: 10px; right: 10px; }
  .brand-name { font-size: 17px; }
  .map-toggles, .hud-mode, .hud-timer { display: none; }
  .hud-item { padding: 2px 10px; }
  .panel { top: auto; left: 8px; right: 8px; bottom: 8px; max-height: 50vh; padding: 14px; gap: 10px; animation-name: rise; }
  .panel-head .q { font-size: 20px; }
  .photo-wrap { aspect-ratio: 16 / 9; }
  .card { padding: 24px 20px 20px; }
  .set-grid { grid-template-columns: 1fr; }
  .daily-slots { gap: 6px; }
  .daily-slots li { padding: 12px 2px 10px; }
  .s-ic { width: 32px; height: 32px; font-size: 17px; }
  .s-name, .s-word { display: none; }
  .history button { grid-template-columns: 5.2em minmax(0, 1fr) auto 3.6em; gap: 8px; font-size: 13.5px; }
  .doc-sheet { padding: 30px 22px 26px; margin-top: 4px; }
  .doc-cta .primary.big { width: 100%; }
  .s-pts { font-size: 18px; }
  .dd-score b { font-size: 36px; }
  .daily-title { font-size: 18px; align-items: flex-start; }
  .s-n { display: none; }
  .dd-actions { width: 100%; }
  .dd-actions .secondary { flex: 1; padding: 10px 8px; white-space: nowrap; }
  .explore { width: auto; right: 10px; left: 10px; max-height: 42vh; }
}
