/* ==========================================================================
   P2000 app - stijl. Tokens 1-op-1 uit p2000amsterdam/assets/css/style.css
   (APP-BOUWPLAN §5.4). App-eigen chrome (topbar/filterbalk/drawer); web-chrome
   van de sites bewust weggelaten.
   ========================================================================== */

/* ---- Fonts (lokaal meegeleverd, zie app/public/assets/fonts/) ---- */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/ibm-plex-sans-var.woff2') format('woff2-variations');
  font-weight: 100 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---- Design-tokens ---- */
:root {
  --c-page: #F1F3F6;
  --c-card: #FFFFFF;
  --c-card-hover: #FFFFFF;
  --c-border: #E2E5EA;
  --c-border-strong: #CBD0D8;
  --c-ink: #0E1116;
  --c-ink-2: #2C3137;
  --c-ink-3: #515660;
  --c-ink-4: #7A7F87;
  --c-hl: #C7261D;
  --c-hl-soft: #FDECEA;
  --c-live: #1D8A4E;

  --svc-amb: #94B12A;
  --svc-bra: #D6261B;
  --svc-pol: #2C5F7A;
  --svc-knrm: #E1701B;

  --radius: 10px;
  --radius-sm: 8px;
  --gap: 14px;
  --topbar-h: 54px;
  --navbar-h: 56px; /* bottom navigation */
  --maxw: 720px;

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --c-page: #0B0E12; --c-card: #14181E; --c-card-hover: #1C2028;
    --c-border: #232830; --c-border-strong: #303640;
    --c-ink: #ECEEF1; --c-ink-2: #D4D7DC; --c-ink-3: #A8ACB3; --c-ink-4: #777C84;
    --c-hl: #C7261D; --c-hl-soft: #2A1614;
  }
}
:root[data-theme="dark"] {
  --c-page: #0B0E12; --c-card: #14181E; --c-card-hover: #1C2028;
  --c-border: #232830; --c-border-strong: #303640;
  --c-ink: #ECEEF1; --c-ink-2: #D4D7DC; --c-ink-3: #A8ACB3; --c-ink-4: #777C84;
  --c-hl: #C7261D; --c-hl-soft: #2A1614;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--c-page);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- Mobiel-optimalisatie ----
   Geen grijze tap-flash, geen 300ms tap-delay, geen tekst-herschaling bij
   roteren, en tekstselectie uit op interactieve chrome (voelt native). */
* { -webkit-tap-highlight-color: transparent; }
a, button, .chip, .tabbar-item, .drawer-item, .drawer-regio, .filter-toggle,
.subtab, .seg button, .melding, .meer-item, .feed-tab, .regio-item, select, input {
  touch-action: manipulation;
}
.topbar, .tabbar, .filterbar, .filter-toggle, .subtabs, .crumbs, .drawer, .feed-tabs,
.melding-meta, .melding-stamp, .badge, .chip, .tabbar-item, .drawer-item {
  -webkit-user-select: none; user-select: none;
}
/* Tekst in melding/verhaal/detail blijft wél selecteerbaar. */
.melding-text, .melding-sublist-text, .detail-title, .detail-verhaal, .detail-dl,
.modal-body, .feed-status { -webkit-user-select: text; user-select: text; }

/* ---- Boot ---- */
.app-boot {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; color: var(--c-ink-3);
}
.app-boot-mark { font-weight: 700; font-size: 1.6rem; letter-spacing: .5px; color: var(--c-hl); }
.app-boot-sub { font-size: .85rem; }

/* ---- App-shell ---- */
.app {
  max-width: var(--maxw); margin: 0 auto;
  min-height: 100vh; display: flex; flex-direction: column;
}

/* ---- Topbar (enige balk bovenin) ---- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 12px 0;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
}
/* Wordmark 1-op-1 met de sites: rood "P2000"-blok. Klikbaar → feed. */
.wordmark { display: inline-flex; align-items: baseline; line-height: 1; letter-spacing: -0.04em; flex: 0 0 auto; }
.wm-block { background: var(--c-hl); color: #fff; font-weight: 800; font-size: 20px; padding: 3px 7px 4px; border-radius: 3px; flex: 0 0 auto; }
/* Regionaam = tapbaar (→ regiokeuze), met klein chevron als affordance. */
.topbar-regio {
  display: inline-flex; align-items: center; gap: 3px; min-width: 0; flex: 0 1 auto;
  background: none; border: none; padding: 8px 2px; color: var(--c-ink);
  font-weight: 700; font-size: 17px; letter-spacing: -.02em;
}
.topbar-regio:active { opacity: .7; }
.topbar-regio-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar-regio-chev { width: 15px; height: 15px; color: var(--c-ink-4); flex: 0 0 auto; margin-top: 2px; }
.topbar-spacer { flex: 1; }
.topbar-title { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn {
  position: relative;
  border: 1px solid var(--c-border); background: var(--c-page);
  color: var(--c-ink-2); width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
  flex: 0 0 auto;
}
.iconbtn:active { background: var(--c-card-hover); }
.iconbtn > svg { width: 19px; height: 19px; }
.iconbtn-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--c-hl); color: #fff; font-size: .66rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--c-card);
}

/* ---- Content ---- */
.screen { flex: 1; padding: 12px 12px calc(20px + var(--safe-bottom)); }
/* Met bottom-nav: ruimte onderaan zodat content niet achter de balk valt. */
.app--tabs .screen { padding-bottom: calc(var(--navbar-h) + var(--safe-bottom) + 20px); }

/* ---- Filter-rijen (in de filter-sheet) ---- */
.filter-row { display: flex; gap: 8px; align-items: center; }
.filter-row + .filter-row { margin-top: 8px; }
.filter-cap { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-4); font-weight: 700; margin: 16px 2px 8px; }
.chips { display: flex; gap: 7px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; scrollbar-width: none; }
.chips--wrap { flex-wrap: wrap; overflow-x: visible; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--c-border-strong); background: var(--c-card);
  color: var(--c-ink-2); border-radius: 999px; padding: 7px 13px; font-size: .85rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--c-ink); color: var(--c-page); border-color: var(--c-ink); }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--chip-color, var(--c-ink-3)); flex: 0 0 auto; }
.chip--svc[aria-pressed="true"] { background: var(--chip-color); border-color: var(--chip-color); color: #fff; }
.chip--svc[aria-pressed="true"] .chip-dot { background: #fff; }

.select, .filter-spoed {
  border: 1px solid var(--c-border-strong); background: var(--c-card); color: var(--c-ink);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: .9rem; font-weight: 500;
}
.select { flex: 1; min-width: 0; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.filter-spoed { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.filter-spoed[aria-pressed="true"] { background: var(--c-hl); border-color: var(--c-hl); color: #fff; }
.filter-reset { margin-left: auto; background: none; border: none; color: var(--c-ink-3); font-size: .82rem; text-decoration: underline; padding: 6px 2px; }

/* ---- Bottom navigation (Feed · Kaart · Nieuws) - vaste app-balk onderin ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 36;
  max-width: var(--maxw); margin: 0 auto;
  display: flex; background: var(--c-card); border-top: 1px solid var(--c-border);
  padding-bottom: var(--safe-bottom);
}
.tabbar-item {
  flex: 1; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: var(--navbar-h); font-size: .68rem; font-weight: 600; color: var(--c-ink-3);
}
.tabbar-item:active { background: var(--c-card-hover); }
.tabbar-item.is-active { color: var(--c-hl); }
.tabbar-ico { display: inline-flex; }
.tabbar-ico svg { width: 22px; height: 22px; display: block; }

.feed-intro { font-size: .85rem; color: var(--c-ink-3); margin: 0 0 10px; line-height: 1.45; }

/* ---- Sub-tabs (Nieuws | Opvallend) — alleen op tabs-regio's ---- */
.subtabs { display: flex; gap: 6px; margin: 0 0 10px; }
.subtab { flex: 1; text-align: center; border: 1px solid var(--c-border-strong); background: var(--c-card); color: var(--c-ink-2); border-radius: 999px; padding: 8px 10px; font-size: .82rem; font-weight: 600; }
.subtab.is-active { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-page); }

/* ---- Bijgewerkt-regeltje + pull-to-refresh-indicator ---- */
.feed-updated { text-align: center; font-size: .72rem; color: var(--c-ink-4); margin: 0 0 8px; }
.ptr {
  position: fixed; top: calc(var(--topbar-h) + var(--safe-top) + 12px); left: 50%;
  transform: translateX(-50%); z-index: 28;
  background: var(--c-card); border: 1px solid var(--c-border-strong); border-radius: 999px;
  padding: 8px 15px; font-size: .78rem; font-weight: 600; color: var(--c-ink-3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16); white-space: nowrap;
}
.ptr.is-ready { color: #fff; background: var(--c-hl); border-color: var(--c-hl); }

/* ---- Feed ---- */
.feed { display: flex; flex-direction: column; gap: var(--gap); }
.feed-status { text-align: center; color: var(--c-ink-3); padding: 22px 0; font-size: .9rem; }
.feed-error { color: var(--c-hl); }

/* ---- Melding-card ---- */
.melding {
  display: grid; grid-template-columns: 58px 1fr 18px; align-items: stretch;
  background: var(--c-card); border: 1px solid var(--c-border);
  border-left: 4px solid var(--svc-color, var(--c-border-strong));
  border-radius: var(--radius); overflow: hidden;
}
.melding:active { background: var(--c-card-hover); }
.melding.is-spoed { box-shadow: inset 0 0 0 1px var(--c-hl-soft); }
.melding.is-ingetrokken { opacity: .72; }
.melding-stamp {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 4px; border-right: 1px solid var(--c-border); background: color-mix(in srgb, var(--svc-color, #888) 7%, var(--c-card));
  text-align: center;
}
.melding-stamp-time { font-family: var(--mono); font-weight: 600; font-size: .92rem; color: var(--c-ink); }
.melding-stamp-sub { font-size: .66rem; color: var(--c-ink-3); margin-top: 2px; }
.melding-body { padding: 11px 4px 11px 12px; min-width: 0; }
.melding-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 5px; font-size: .76rem; }
.melding-dienst { font-weight: 600; color: var(--c-ink-2); }
.melding-bundle-label { font-weight: 600; color: var(--c-ink-2); }
.melding-meta-plus { color: var(--c-ink-4); }
.melding-code { font-family: var(--mono); font-size: .72rem; color: var(--c-ink-3); background: var(--c-page); border: 1px solid var(--c-border); border-radius: 4px; padding: 1px 5px; }
.melding-sep { color: var(--c-ink-4); }
.melding-place { color: var(--c-ink-3); }
.badge { font-size: .64rem; font-weight: 700; letter-spacing: .4px; border-radius: 4px; padding: 2px 6px; }
.melding-spoed { color: #fff; background: var(--c-hl); }
.melding-ingetrokken { color: var(--c-ink-3); background: var(--c-page); border: 1px solid var(--c-border); }
/* Kleuren 1-op-1 met de sites: NIEUWS = paars #5b3aa8, SPOED = rood, BUNDEL = transparant.
   OPVALLEND heeft op de sites geen eigen card-kleur (alleen een aparte tab); amber
   maakt 'm onderscheidend van het paarse NIEUWS en rode SPOED. */
.melding-nieuws-badge { color: #fff; background: #5b3aa8; }
.melding-opvallend-badge { color: #fff; background: #C77E12; }
.melding-bundel-badge { color: var(--c-ink-2); background: transparent; border: 1px solid var(--c-border-strong); }
.melding-text { margin: 0; font-size: .96rem; font-weight: 500; line-height: 1.35; color: var(--c-ink); }
.melding-sublist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.melding-sublist-item { display: flex; gap: 7px; align-items: baseline; font-size: .82rem; color: var(--c-ink-2); }
.melding-sublist-tag { font-family: var(--mono); font-size: .64rem; font-weight: 600; color: #fff; border-radius: 4px; padding: 1px 5px; flex: 0 0 auto; background: var(--c-ink-4); }
.melding-sublist-tag--amb { background: var(--svc-amb); } .melding-sublist-tag--bra { background: var(--svc-bra); }
.melding-sublist-tag--pol { background: var(--svc-pol); } .melding-sublist-tag--knrm { background: var(--svc-knrm); }
.melding-footer { margin-top: 7px; display: flex; gap: 12px; }
.melding-unit { font-family: var(--mono); font-size: .72rem; color: var(--c-ink-3); }
.melding-action { display: flex; align-items: center; justify-content: center; color: var(--c-ink-4); font-size: 1.4rem; }

/* ---- Advertentie-blok (gereserveerd; v1 = placeholder, geen echte ad - §8) ----
   VERPLICHT "Advertentie"-label boven de creative (NL: reclame moet herkenbaar
   zijn). Label blijft staan, of de slot nu leeg is of straks gevuld door de ad-koppeling. */
.ad-wrap { margin: 0; }
.ad-label { display: block; text-align: center; font-size: .56rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-ink-4); margin: 4px 0 0; }
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 90px; border: 1px dashed var(--c-border-strong); border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, transparent, transparent 9px, color-mix(in srgb, var(--c-ink) 3%, transparent) 9px, color-mix(in srgb, var(--c-ink) 3%, transparent) 18px);
  color: var(--c-ink-4); font-size: .68rem; letter-spacing: .04em;
}
.ad-slot:empty::before { content: 'Gereserveerde advertentieruimte'; }
/* Gevulde ad: geen placeholder-rand/streep meer, de creative vult het blok. */
.ad-slot--filled { display: block; border: none; background: none; padding: 0; min-height: 0; }
.ad-link { display: block; text-decoration: none; color: inherit; }
.ad-img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.ad-text { display: block; padding: 12px 14px; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-ink-2); font-size: .9rem; line-height: 1.45; }
.ad-html { width: 100%; }
.sticky-ad .ad-text { padding: 9px 12px; font-size: .85rem; border: none; border-radius: 0; }
.ad-wrap--detail { margin: 18px 0; }
.ad-wrap--detail .ad-slot { min-height: 110px; }
.ad-wrap--kaart { flex: 0 0 auto; margin: 8px 12px; }

/* ---- Sticky anchor-advertentie (boven de bottom-nav, sluitbaar per sessie) ---- */
.sticky-ad {
  position: fixed; left: 0; right: 0; bottom: calc(var(--navbar-h) + var(--safe-bottom)); z-index: 34;
  max-width: var(--maxw); margin: 0 auto;
  background: var(--c-card); border-top: 1px solid var(--c-border);
  padding: 7px 12px 6px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .14);
}
.sticky-ad .ad-slot { min-height: 56px; }
.sticky-ad .ad-label { margin-top: 3px; }
.sticky-ad-close {
  position: absolute; top: -12px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--c-border-strong); background: var(--c-card); color: var(--c-ink-3);
  font-size: .72rem; display: inline-flex; align-items: center; justify-content: center;
}
.sticky-ad-close:active { background: var(--c-card-hover); }
/* Ruimte onderaan zodat de laatste content niet achter nav + sticky ad valt. */
.app--anchor .screen { padding-bottom: calc(var(--navbar-h) + var(--safe-bottom) + 118px); }

/* ---- Regiokeuze ---- */
.regio-intro { text-align: center; padding: 10px 6px 16px; }
.regio-intro h1 { font-size: 1.3rem; margin: 0 0 6px; }
.regio-intro p { color: var(--c-ink-3); margin: 0; font-size: .92rem; }
.regio-search { width: 100%; border: 1px solid var(--c-border-strong); background: var(--c-card); color: var(--c-ink);
  border-radius: var(--radius); padding: 12px 14px; font-size: 1rem; margin-bottom: 12px; }
.regio-list { display: flex; flex-direction: column; gap: 8px; }
.regio-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 14px 16px; font-size: 1rem; font-weight: 500; color: var(--c-ink); width: 100%; text-align: left;
}
.regio-item:active { background: var(--c-card-hover); }
.regio-item.is-current { border-color: var(--c-hl); }
.regio-item small { color: var(--c-ink-3); font-weight: 400; font-size: .8rem; }
.regio-item-chev { color: var(--c-ink-4); }

/* ---- Detail ---- */
.detail-hero {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--c-border); background: var(--c-card); display: block; margin-bottom: 14px;
}
.detail-hero--empty { display: flex; align-items: center; justify-content: center; color: var(--c-ink-4); font-size: .85rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; font-size: .8rem; }
.detail-title { font-size: 1.3rem; line-height: 1.3; margin: 0 0 6px; }
.detail-byline { color: var(--c-ink-3); font-size: .85rem; margin: 0 0 18px; }
.detail-section-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: var(--c-ink-3); margin: 20px 0 8px; font-weight: 600; }
.detail-dl { display: grid; grid-template-columns: minmax(90px, 32%) 1fr; gap: 7px 14px; margin: 0; }
.detail-dl dt { color: var(--c-ink-3); font-size: .86rem; }
.detail-dl dd { margin: 0; color: var(--c-ink); font-size: .9rem; font-weight: 500; }
.detail-bundle { display: flex; flex-direction: column; gap: 8px; }
.detail-bundle-item { display: flex; gap: 9px; align-items: baseline; background: var(--c-card); border: 1px solid var(--c-border); border-left: 3px solid var(--svc-color, var(--c-border-strong)); border-radius: var(--radius-sm); padding: 9px 11px; }
.detail-bundle-tag { font-family: var(--mono); font-size: .64rem; font-weight: 600; color: #fff; border-radius: 4px; padding: 1px 5px; flex: 0 0 auto; }
.detail-bundle-text { font-size: .88rem; color: var(--c-ink-2); }
.detail-bundle-sub { display: block; font-size: .72rem; color: var(--c-ink-4); margin-top: 2px; }
.detail-share { margin-top: 22px; width: 100%; border: 1px solid var(--c-border-strong); background: var(--c-card); color: var(--c-ink-2); border-radius: var(--radius); padding: 13px; font-size: .95rem; font-weight: 600; }
.detail-share:active { background: var(--c-card-hover); }

/* ---- Drawer / menu ---- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 380px); z-index: 41;
  background: var(--c-page); border-left: 1px solid var(--c-border);
  padding: calc(14px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 0; overflow-y: auto;
  box-shadow: -8px 0 30px rgba(0,0,0,.28);
}
/* Sectiekop met ruimte erboven voor duidelijke scheiding tussen blokken. */
.drawer-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--c-ink-4); font-weight: 700; margin: 22px 4px 7px; }

/* Item-kaart: groepeert de items met afgeronde hoeken + hairline-dividers. */
.drawer-card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.drawer-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--c-card); border: none; color: var(--c-ink); font-size: .98rem; font-weight: 500;
  padding: 14px 14px; width: 100%; text-align: left;
}
.drawer-card .drawer-item + .drawer-item { border-top: 1px solid var(--c-border); }
.drawer-item:active { background: var(--c-card-hover); }
.drawer-item-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.drawer-item-l > svg { width: 19px; height: 19px; color: var(--c-ink-3); flex: 0 0 auto; }
.drawer-item-l > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-chev { color: var(--c-ink-4); font-size: 1.2rem; }
.drawer-ext-ico { color: var(--c-ink-4); font-size: 1rem; }

.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.drawer-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--c-border); color: var(--c-ink-4); font-size: .76rem; line-height: 1.5; }
.drawer-foot a { color: var(--c-ink-3); text-decoration: underline; }

/* Regio-wisselen: prominente kaart bovenaan met accent-icoon. */
.drawer-regio { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 13px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.drawer-regio:active { background: var(--c-card-hover); }
.drawer-regio-icon { flex: 0 0 auto; display: inline-flex; width: 38px; height: 38px; border-radius: 10px;
  align-items: center; justify-content: center; background: var(--c-hl-soft); color: var(--c-hl); }
.drawer-regio-icon svg { width: 21px; height: 21px; }
.drawer-regio-l { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.drawer-regio-label { font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; color: var(--c-ink-4); font-weight: 700; }
.drawer-regio-naam { font-size: 1.08rem; font-weight: 700; color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-regio-cta { flex: 0 0 auto; color: var(--c-hl); font-weight: 700; font-size: .85rem; }

/* ---- Theme-segment ---- */
.seg { display: inline-flex; border: 1px solid var(--c-border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: none; background: var(--c-card); color: var(--c-ink-2); padding: 8px 12px; font-size: .85rem; }
.seg button[aria-pressed="true"] { background: var(--c-ink); color: var(--c-page); }
.seg--full { display: flex; width: 100%; margin: 0 0 4px; }
.seg--full button { flex: 1; padding: 11px 8px; font-weight: 600; }
.seg--full button + button { border-left: 1px solid var(--c-border-strong); }

/* ---- Detail: verhaal (genereer_verhaal-port) ---- */
.detail-verhaal { margin: 2px 0 6px; }
.detail-verhaal p { margin: 0 0 12px; font-size: .97rem; line-height: 1.6; color: var(--c-ink-2); }
.detail-verhaal p.lede { font-size: 1.06rem; color: var(--c-ink); font-weight: 500; }
.detail-verhaal strong { color: var(--c-ink); font-weight: 600; }
.detail-verhaal code { font-family: var(--mono); font-size: .85em; background: var(--c-page); border: 1px solid var(--c-border); border-radius: 4px; padding: 1px 5px; }

/* ---- Detail: ingetrokken-banner ---- */
.ingetrokken-banner { background: var(--c-hl-soft); border: 1px solid var(--c-hl); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .88rem; color: var(--c-ink-2); margin: 0 0 14px; }
.ingetrokken-banner strong { color: var(--c-hl); }

/* ---- Detail: klikbare bundel ---- */
a.detail-bundle-item { text-decoration: none; }
a.detail-bundle-item:active { background: var(--c-card-hover); }
.detail-bundle-chev { margin-left: auto; color: var(--c-ink-4); align-self: center; font-size: 1.2rem; }

/* ---- Deel-blok (share) ---- */
.deel-card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.share-cap { display: block; font-size: .9rem; color: var(--c-ink-2); margin-bottom: 11px; font-weight: 600; }
.share-knoppen { display: flex; flex-wrap: wrap; gap: 8px; }
.share-knop {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--c-border-strong); background: var(--c-card); color: var(--c-ink-2);
  border-radius: var(--radius-sm); padding: 9px 13px; font-size: .85rem; font-weight: 600;
}
.share-knop:active { background: var(--c-card-hover); }
.share-knop svg { width: 16px; height: 16px; flex: 0 0 auto; }
.share-wa svg { color: #25D366; }
.share-x svg { color: var(--c-ink); }
.share-fb svg { color: #1877F2; }
.share-copy svg { color: var(--c-ink-3); }
.share-native svg { color: var(--c-hl); }

/* ---- "Meer meldingen"-blok ---- */
.meer-lijst { display: flex; flex-direction: column; gap: 8px; }
.meer-item {
  display: grid; grid-template-columns: 48px 1fr 14px; gap: 10px; align-items: center;
  background: var(--c-card); border: 1px solid var(--c-border);
  border-left: 3px solid var(--svc-color, var(--c-border-strong)); border-radius: var(--radius-sm); padding: 9px 11px;
}
.meer-item:active { background: var(--c-card-hover); }
.meer-item-time { font-family: var(--mono); font-size: .76rem; color: var(--c-ink-3); text-align: center; line-height: 1.25; }
.meer-item-body { min-width: 0; }
.meer-item-meta { font-size: .68rem; color: var(--c-ink-4); margin-bottom: 1px; }
.meer-item-text { font-size: .86rem; color: var(--c-ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meer-item-chev { color: var(--c-ink-4); }

/* ---- Meld-fout ---- */
.meld-fout-link { margin-top: 18px; font-size: .85rem; color: var(--c-ink-3); }
.meld-fout-link a { color: var(--c-hl); text-decoration: underline; }

/* ---- Live-kaart (map vult de ruimte tussen topbar en bottom-nav) ---- */
.kaart-screen {
  display: flex; flex-direction: column;
  height: calc(100vh - var(--topbar-h) - var(--safe-top) - var(--navbar-h) - var(--safe-bottom));
  height: calc(100dvh - var(--topbar-h) - var(--safe-top) - var(--navbar-h) - var(--safe-bottom));
}
.kaart-mapwrap { position: relative; flex: 1; min-height: 0; }
.kaart-holder { width: 100%; height: 100%; background: var(--c-page); }
.kaart-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 500; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 10px 16px; text-align: center; color: var(--c-ink-3); font-size: .9rem; }
.leaflet-popup-content .mp { font-family: var(--font); font-size: .86rem; line-height: 1.45; color: #0E1116; }
.leaflet-popup-content .mp strong { font-weight: 600; }
.leaflet-popup-content .mp .mp-when { display: block; font-size: .76rem; color: #6A6F77; margin: 2px 0 5px; }
.leaflet-popup-content .mp a { color: var(--c-hl); font-weight: 600; display: inline-block; margin-top: 4px; }

/* ---- Detail hero-link (naar live-kaart) ---- */
.detail-hero-link { position: relative; display: block; margin-bottom: 14px; }
.detail-hero-link .detail-hero { margin-bottom: 0; }
.detail-hero-cta { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.62); color: #fff; font-size: .72rem; font-weight: 600; padding: 5px 9px; border-radius: 6px; }

/* ---- Privacy/cookie-melding ---- */
.privacy-notice {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  max-width: var(--maxw); margin: 0 auto;
  background: var(--c-card); border-top: 1px solid var(--c-border);
  padding: 12px 14px calc(12px + var(--safe-bottom));
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .14);
}
.privacy-notice-tx { flex: 1; margin: 0; font-size: .78rem; line-height: 1.45; color: var(--c-ink-2); }
.privacy-notice-tx a { color: var(--c-hl); text-decoration: underline; }
.privacy-notice-btn { flex: 0 0 auto; background: var(--c-ink); color: var(--c-page); border: none; border-radius: var(--radius-sm); padding: 10px 16px; font-size: .85rem; font-weight: 600; }
.privacy-notice-btn:active { opacity: .85; }
/* Met bottom-nav: notice boven de navigatiebalk. */
.app--tabs .privacy-notice { bottom: calc(var(--navbar-h) + var(--safe-bottom)); padding-bottom: 12px; }
.privacy-link { background: none; border: none; padding: 0; margin: 0; color: var(--c-hl); text-decoration: underline; font: inherit; cursor: pointer; }

/* ---- Modal (privacybeleid-popup) ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--c-card); width: 100%; max-width: var(--maxw); max-height: 85vh; max-height: 85dvh; display: flex; flex-direction: column; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 14px 12px 18px; border-bottom: 1px solid var(--c-border); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 18px calc(22px + var(--safe-bottom)); }
.modal-body p { margin: 0 0 12px; font-size: .9rem; line-height: 1.55; color: var(--c-ink-2); }
.modal-body h3 { margin: 16px 0 5px; font-size: .92rem; color: var(--c-ink); }
.modal-body a { color: var(--c-hl); text-decoration: underline; }
@media (min-width: 560px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: 16px; max-height: 80vh; }
}

/* ---- Filter-sheet (bottom sheet) ---- */
.sheet-head-r { display: inline-flex; align-items: center; gap: 12px; }
.sheet-reset { background: none; border: none; padding: 4px 2px; color: var(--c-hl); font-size: .85rem; font-weight: 600; text-decoration: underline; }
.sheet-foot { padding: 12px 18px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--c-border); }
.sheet-apply { width: 100%; background: var(--c-hl); color: #fff; border: none; border-radius: var(--radius); padding: 14px; font-size: .95rem; font-weight: 700; }
.sheet-apply:active { opacity: .88; }
.filter-rows .filter-cap:first-child { margin-top: 2px; }

/* ---- Skeleton ---- */
.skel { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); height: 84px; position: relative; overflow: hidden; }
.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-ink) 6%, transparent), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
