/* Meld het web-app. Kleuren en letter uit de Home Apps-huisstijl (android/.../ui/theme/Theme.kt), maar rustiger:
   effen vlakken (geen verloop), geen gloed, geen verende beweging. Kaarten 12 px, knoppen 10 px.
   Standaard donker; licht via data-theme="light" op <html> (zelfde sleutel "theme" als de website). */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/fonts/bricolage.woff2) format("woff2");
  font-weight: 300 800; font-stretch: 75% 100%; font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #0B1A12;
  --surface-high: #10251A;
  --text: #F1FFF6;
  --soft: #9DB5A7;
  --faint: #6F877A;
  --edge: rgba(170, 255, 200, .14);
  --edge-strong: rgba(170, 255, 200, .28);
  --green: #14B87A;
  --green-press: #10A36C;
  --on-green: #03140A;
  --tint: rgba(20, 184, 122, .16);
  --danger: #E2725B;
  --s-planned: #7FB3FF; --s-working: #E9C46A; --s-contact: #C9A7FF; --s-done: #14B87A; --s-soft: #9DB5A7;
  --r-card: 12px; --r-btn: 10px;
  --bar-h: 64px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F6F9F7;
  --surface: #FFFFFF;
  --surface-high: #EEF4F0;
  --text: #0B1A12;
  --soft: #4E6B5C;
  --faint: #6E8577;
  --edge: rgba(11, 26, 18, .12);
  --edge-strong: rgba(11, 26, 18, .24);
  --green: #0E9F6A;
  --green-press: #0B8A5C;
  --on-green: #03140A;
  --tint: rgba(14, 159, 106, .10);
  --danger: #C2573F;
  --s-planned: #2F5FD0; --s-working: #9A6B00; --s-contact: #6B45B0; --s-done: #0B8A5C; --s-soft: #4E6B5C;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  font-variation-settings: "opsz" 16; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 650; font-variation-settings: "opsz" 40; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 600; }
a { color: var(--green); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.inline { width: 16px; height: 16px; vertical-align: -3px; }
.grow { flex: 1; min-width: 0; }
.soft { color: var(--soft); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.center-text { text-align: center; }
.error { color: var(--danger); font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.row.wrap { flex-wrap: wrap; margin-top: 0; }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: var(--r-btn); border: 1px solid transparent;
  background: none; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--text);
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:not(:disabled):active { background: var(--green-press); }
.btn-line { border-color: var(--edge-strong); background: var(--surface); }
.btn-line:active { background: var(--surface-high); }
.btn-quiet { color: var(--soft); padding: 8px 10px; }
.btn-quiet:active { background: var(--surface-high); }
.btn.small { min-height: 36px; font-size: 14px; padding: 6px 10px; }
.btn-block { width: 100%; }
.btn-google { background: #fff; color: #1f1f1f; border-color: rgba(0, 0, 0, .14); }
.btn-google svg { width: 20px; height: 20px; }
.icon-btn { width: 44px; padding: 0; }
.link { background: none; border: 0; color: var(--green); font-weight: 600; font-size: 15px; padding: 6px 0; }

/* ---------- vaste schermen (inloggen, welkom) ---------- */
.center { min-height: 100dvh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--edge-strong); border-top-color: var(--green); animation: spin .8s linear infinite; }
.spinner.small { width: 22px; height: 22px; border-width: 2px; margin: 16px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.gate {
  max-width: 440px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 16px;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
}
.gate h1 { font-size: 30px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: var(--green); display: grid; place-items: center; }
.mark svg { width: 20px; height: 20px; fill: var(--on-green); }


.ob { justify-content: flex-start; padding-top: calc(16px + env(safe-area-inset-top)); }
.ob > .btn-primary { margin-top: auto; }
.ob-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; }
.dots { display: flex; gap: 6px; margin-bottom: 12px; }
.dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--edge-strong); }
.dots span.on { background: var(--green); }
.ob-done { width: 64px; height: 64px; border-radius: 12px; background: var(--tint); color: var(--green); display: grid; place-items: center; }
.i.big { width: 32px; height: 32px; stroke-width: 2.2; }
.label { display: block; font-size: 14px; font-weight: 600; color: var(--soft); margin-bottom: 8px; }
.label .i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }

.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px; text-align: left;
  border-radius: var(--r-btn); border: 1px solid var(--edge); background: var(--surface);
}
.choice span { flex: 1; font-weight: 500; }
.choice[aria-checked="true"] { border-color: var(--green); background: var(--tint); }
.choice .check { color: var(--green); }

.seg { display: inline-flex; border: 1px solid var(--edge-strong); border-radius: var(--r-btn); padding: 3px; gap: 3px; background: var(--surface); }
.seg button { border: 0; background: none; border-radius: 7px; padding: 8px 14px; font-weight: 500; color: var(--soft); min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--surface-high); color: var(--text); font-weight: 600; }

.input {
  width: 100%; border: 1px solid var(--edge-strong); border-radius: var(--r-btn); background: var(--surface);
  padding: 12px 14px; font-size: 16px; min-height: 48px; transition: border-color .15s ease;
}
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.input::placeholder { color: var(--faint); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.area { min-height: 140px; resize: vertical; line-height: 1.5; }

/* ---------- app ---------- */
.shell { min-height: 100dvh; }
.shell.with-bar { padding-bottom: calc(var(--bar-h) + 32px + env(safe-area-inset-bottom)); }
.page {
  max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 24px;
}
.top { display: flex; align-items: center; gap: 4px; min-height: 52px; margin: 0 -8px; }
.top-title { font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello { font-size: 30px; margin-top: -4px; }
.lead { margin-top: -10px; font-size: 17px; }
.h { font-size: 24px; }
.h2 { display: block; font-size: 18px; font-weight: 600; margin-bottom: 4px; }

.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--surface-high); border-bottom: 1px solid var(--edge); font-size: 14px; color: var(--soft);
}
.banner + .page { padding-top: 8px; }

.card { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-card); padding: 16px; }

.big-cards { display: grid; gap: 12px; }
@media (min-width: 520px) { .big-cards { grid-template-columns: 1fr 1fr; } }
.big {
  display: flex; align-items: center; gap: 14px; text-align: left; min-height: 96px;
  padding: 16px; border-radius: var(--r-card); border: 1px solid var(--edge); background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.big:active { background: var(--surface-high); border-color: var(--edge-strong); }
.big-text { display: grid; gap: 2px; }
.big-i { width: 44px; height: 44px; padding: 10px; border-radius: 10px; background: var(--tint); color: var(--green); stroke-width: 2; }
.big.problem { background: var(--green); border-color: var(--green); color: var(--on-green); }
.big.problem:active { background: var(--green-press); }
.big.problem .big-i { background: rgba(3, 20, 10, .14); color: var(--on-green); }
.big.problem .big-hint { color: rgba(3, 20, 10, .74); }
.big-title { font-size: 20px; font-weight: 650; }
.big-hint { font-size: 15px; color: var(--soft); }

.install { display: flex; gap: 12px; align-items: flex-start; }
.install > .i { color: var(--green); margin-top: 2px; }
.install b { display: block; }
.steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 8px; }
.empty { padding: 8px 0; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: grid; gap: 8px; }
.item {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-card); color: var(--text);
}
button.item:active { background: var(--surface-high); }
.i.type { margin-top: 1px; color: var(--soft); }
.i.type.problem { color: var(--green); }
.item-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-meta { font-size: 14px; color: var(--faint); }
.item-msg { display: flex; gap: 6px; font-size: 14px; color: var(--soft); margin-top: 4px; }
.item-msg .i { width: 16px; height: 16px; margin-top: 2px; }
.retry { justify-self: start; }

.chip {
  justify-self: start; margin-top: 6px; font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  color: var(--soft); background: var(--surface-high); border: 1px solid var(--edge);
}
.chip.s-planned { color: var(--s-planned); }
.chip.s-working { color: var(--s-working); }
.chip.s-contact { color: var(--s-contact); }
.chip.s-done { color: var(--s-done); }
.chip.failed { color: var(--danger); }

.detail { display: grid; gap: 12px; }
.detail h1 { font-size: 24px; overflow-wrap: anywhere; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg { background: var(--tint); border-color: transparent; }
.msg .label { color: var(--green); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.shots img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; border: 1px solid var(--edge); display: block; }

.group { display: grid; gap: 6px; }
.group.card { gap: 4px; }
.group .row.wrap { margin-top: 8px; }

/* ---------- melden ---------- */
.stepbar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stepbar li { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--faint); padding-top: 8px; border-top: 3px solid var(--edge-strong); }
.stepbar li.now { color: var(--text); font-weight: 600; border-top-color: var(--green); }
.stepbar li.done { color: var(--soft); border-top-color: var(--green); }
.stepbar .num { display: none; }

.pick { padding: 0; overflow: hidden; }
.pick-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; background: none; border: 0; text-align: left; }
.pick-head b { display: block; font-size: 17px; }
.pick-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.pick-list li + li { border-top: 1px solid var(--edge); }
.pick-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; background: none; border: 0; text-align: left; }
.pick-row:active { background: var(--surface-high); }
.pick-row .grow { display: grid; }
.pick-row > .i, .pick-head > .i { color: var(--faint); }

.pic-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pic-btns .btn { flex: 1 1 auto; }
.thumbs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.thumbs li { border: 1px solid var(--edge); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: var(--surface-high); }
.thumb-acts { display: flex; justify-content: space-between; padding: 4px; border-top: 1px solid var(--edge); }
.thumb-acts .btn { white-space: nowrap; padding: 6px 8px; gap: 6px; }
.tell { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.send-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--edge);
}
.send-bar .btn { max-width: 568px; margin: 0 auto; display: flex; min-height: 52px; font-size: 16px; }

.thanks { display: grid; gap: 14px; justify-items: start; margin-top: 24px; }

/* ---------- zwevende onderbalk ---------- */
.bar {
  position: fixed; z-index: 10; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 480px; margin: 0 auto; height: var(--bar-h);
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4px; padding: 6px;
  background: var(--surface); border: 1px solid var(--edge-strong); border-radius: var(--r-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.bar > button {
  height: 100%; border: 0; background: none; border-radius: 8px; color: var(--faint);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600;
  transition: background-color .15s ease, color .15s ease;
}
.bar > button:active { background: var(--surface-high); }
.bar > button[aria-current="page"] { color: var(--text); background: var(--surface-high); }
.bar > button[aria-current="page"] .i { color: var(--green); }
.bar.three { grid-template-columns: 1fr 1fr 1fr; }
.bar.three > button { flex-direction: column; gap: 2px; font-size: 13px; position: relative; }
.tab-badge {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--a-yellow, #E9C46A); color: #03140A; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---------- onderblad: wat wil je melden ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .5); animation: fade .15s ease; }
.sheet {
  position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-width: 600px; margin: 0 auto;
  display: grid; gap: 12px; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  background: var(--bg); border: 1px solid var(--edge-strong); border-bottom: 0; border-radius: var(--r-card) var(--r-card) 0 0;
  animation: fade .15s ease;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
@keyframes fade { from { opacity: 0; } }

/* ---------- tekenen ---------- */
.draw { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; }
.draw-bar { display: flex; align-items: center; gap: 4px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px; border-bottom: 1px solid var(--edge); }
.draw-stage { flex: 1; min-height: 0; position: relative; }
.draw-stage canvas { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 24px); max-height: calc(100% - 24px); border-radius: 8px; touch-action: none; background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.draw-colors { display: flex; justify-content: center; gap: 14px; padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); }
.swatch { width: 40px; height: 40px; border-radius: 50%; background: var(--c); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--edge-strong); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }

.toast {
  position: fixed; z-index: 40; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
}

/* ---------- vraag van ons, gesprek ---------- */
.ask { display: grid; gap: 8px; border-color: var(--a-yellow); }
.ask .label { color: var(--a-yellow-text); margin: 0; }
.small-area { min-height: 96px; }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.thread li { padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--edge); }
.thread li.us { border-left: 3px solid var(--a-yellow); }
.thread li.them { border-left: 3px solid var(--green); }
.thread p { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chip.s-question { color: var(--a-yellow-text); }

/* ---------- beheer ---------- */
:root { --a-green: #14B87A; --a-orange: #E8843A; --a-yellow: #E9C46A; --a-red: #E2725B;
  --a-green-text: #3FD39A; --a-orange-text: #F0A060; --a-yellow-text: #E9C46A; --a-red-text: #EE8C78; }
:root[data-theme="light"] { --a-green: #0E9F6A; --a-orange: #D9661F; --a-yellow: #E3B341; --a-red: #C2573F;
  --a-green-text: #0B7F55; --a-orange-text: #B4520F; --a-yellow-text: #8A6100; --a-red-text: #B04A33; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg.wide .i { width: 18px; height: 18px; }
.ilist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.irow { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-card); overflow: hidden; }
.irow.open { border-color: var(--edge-strong); }
.irow-head { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 12px; background: none; border: 0; text-align: left; color: var(--text); }
.irow-body { display: grid; gap: 12px; padding: 0 14px 14px; }
.note { padding: 10px 12px; border-radius: 8px; background: var(--surface-high); font-size: 15px; }
.note p { white-space: pre-wrap; margin-top: 2px; }
.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.acts.compact { padding: 0 10px 10px; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 4px;
  border-radius: 8px; border: 1px solid; background: none; font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background-color .15s ease;
}
.act .i { width: 16px; height: 16px; stroke-width: 2.2; }
.act-solid.a-approve { background: var(--a-green); }
.act-solid.a-direct { background: var(--a-orange); }
.act-solid.a-ask { background: var(--a-yellow); }
.act-solid.a-decline { background: var(--a-red); }
:root[data-theme="light"] .act-solid.a-direct, :root[data-theme="light"] .act-solid.a-decline { color: #fff; }
.acts.compact .a-approve { color: var(--a-green-text); border-color: var(--a-green); }
.acts.compact .a-direct { color: var(--a-orange-text); border-color: var(--a-orange); }
.acts.compact .a-ask { color: var(--a-yellow-text); border-color: var(--a-yellow); }
.acts.compact .a-decline { color: var(--a-red-text); border-color: var(--a-red); }
.act-solid { color: #03140A; }
.undo {
  position: fixed; z-index: 15; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  background: var(--text); color: var(--bg); border-radius: var(--r-card); font-weight: 600; font-size: 15px;
}
.undo span { display: inline-flex; align-items: center; gap: 8px; }
.undo .link { color: var(--bg); text-decoration: underline; }
.with-bar .undo { bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom)); }
.has-badge { position: relative; }
.badge {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--a-yellow); color: #03140A; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface-high); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--soft); }
.person { align-items: center; }
.tree { padding: 6px 12px; display: grid; gap: 0; }
.t-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.t-row input { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.t-sec { border-top: 1px solid var(--edge); }
.t-apps { padding-left: 32px; }
.switch { cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--green); }
.danger { color: var(--a-red-text); }
.admin .row.wrap { margin-top: 4px; }
/* smalle telefoons: icoon boven het woord, zodat vier knoppen altijd passen */
.irow-body { grid-template-columns: minmax(0, 1fr); }
.acts.compact .act { flex-direction: column; gap: 2px; min-height: 52px; font-size: 12.5px; min-width: 0; }
.acts.compact .act span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- inbox van de melder ---------- */
.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.imsg { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-card); overflow: hidden; }
.imsg.unread { border-color: var(--edge-strong); }
.imsg.unread .item-title { font-weight: 700; }
.msg-head { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 8px; background: none; border: 0; text-align: left; color: var(--text); }
.msg-head > .i:last-child { color: var(--faint); margin-top: 2px; }
.msg-kind { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--soft); }
.imsg .i.kind { margin-top: 2px; }
.k-question .i.kind, .k-question .msg-kind { color: var(--a-yellow-text); }
.k-done .i.kind, .k-done .msg-kind { color: var(--a-green-text); }
.k-declined .i.kind, .k-declined .msg-kind { color: var(--a-red-text); }
.k-message .i.kind { color: var(--soft); }
.chip.new { margin: 0; padding: 1px 6px; font-size: 12px; color: var(--text); }
.msg-body { padding: 0 14px 12px 46px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-answer { margin: 0 14px 12px 46px; padding: 8px 10px; border-left: 3px solid var(--green); background: var(--surface-high); border-radius: 6px; }
.msg-answer p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-reply { display: grid; gap: 6px; padding: 0 14px 14px 46px; }
@media (max-width: 380px) { .msg-body, .msg-reply { padding-left: 14px; } .msg-answer { margin-left: 14px; } }

/* ---------- venster voor richting of vraag ---------- */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal {
  position: fixed; z-index: 21; left: 12px; right: 12px; max-width: 480px; margin: 0 auto;
  top: calc(12px + env(safe-area-inset-top));
  max-height: calc(var(--vvh, 100dvh) - 24px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 10px; padding: 16px; background: var(--bg); border: 1px solid var(--edge-strong); border-top: 3px solid var(--edge-strong);
  border-radius: var(--r-card); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); animation: fade .15s ease;
}
.modal h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.modal.a-direct { border-top-color: var(--a-orange); }
.modal.a-direct h2 .i { color: var(--a-orange-text); }
.modal.a-ask { border-top-color: var(--a-yellow); }
.modal.a-ask h2 .i { color: var(--a-yellow-text); }
.modal textarea { min-height: 120px; }
.modal-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.modal-acts .btn { min-height: 48px; }

/* ---------- beginscherm: apps zoeken en kiezen ---------- */
.search { position: relative; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 44px; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.app-group { display: grid; gap: 8px; }
.sec-label { font-size: 14px; font-weight: 600; color: var(--soft); margin: 8px 0 0; }
.applist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-card); overflow: hidden; }
.applist li + li { border-top: 1px solid var(--edge); }
.app-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; background: none; border: 0; text-align: left; color: var(--text); transition: background-color .15s ease; }
.app-row:active { background: var(--surface-high); }
.app-row > .i:last-child { color: var(--faint); }
.tile {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
  --tc: #14B87A; background: color-mix(in srgb, var(--tc) 18%, var(--surface)); color: var(--tc);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.tile[data-c="0"] { --tc: #14B87A; } .tile[data-c="1"] { --tc: #5B8DEF; } .tile[data-c="2"] { --tc: #B07FE0; }
.tile[data-c="3"] { --tc: #D9A23A; } .tile[data-c="4"] { --tc: #2FB3B3; } .tile[data-c="5"] { --tc: #E07A5F; }
:root[data-theme="light"] .tile[data-c="0"] { --tc: #0B8A5C; } :root[data-theme="light"] .tile[data-c="1"] { --tc: #2F5FD0; }
:root[data-theme="light"] .tile[data-c="2"] { --tc: #7A4CB8; } :root[data-theme="light"] .tile[data-c="3"] { --tc: #9A6B00; }
:root[data-theme="light"] .tile[data-c="4"] { --tc: #13807F; } :root[data-theme="light"] .tile[data-c="5"] { --tc: #B5523A; }
.stepbar.two { grid-template-columns: repeat(2, 1fr); }

/* ---------- app-blad: openen, downloaden, melden ---------- */
.app-head { gap: 12px; align-items: center; justify-content: flex-start; }
.app-head .tile { width: 48px; height: 48px; border-radius: 12px; font-size: 20px; }
.app-head h2 { font-size: 20px; }
.app-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.app-links .btn { min-height: 48px; }
.report-label { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--edge); }

/* ---------- installeren (landingspagina, installeerscherm, balk) ---------- */
.inst { justify-content: flex-start; padding-top: calc(32px + env(safe-area-inset-top)); }
.inst h1 { font-size: 28px; }
.btn-big { min-height: 56px; font-size: 17px; }
.inst-card { display: grid; gap: 12px; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inst-steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.inst-num { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--green); font-weight: 700; }
.inst-num .i { width: 20px; height: 20px; }
.inst-qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.inst-qr img { width: 160px; height: 160px; border-radius: 8px; background: #fff; padding: 6px; flex: none; }
.inst-qr h2 { font-size: 18px; }
.inst-skip { justify-self: start; align-self: flex-start; text-align: left; }
.inst-foot { margin-top: 8px; }
/* Bovenste regel: merk links, taal rechts, op dezelfde randen als de inhoud. */
.inst-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.inst-top .brand { margin: 0; min-width: 0; }
.inst-top .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg.compact { flex: none; }
.seg.compact button { min-height: 36px; min-width: 44px; padding: 0 10px; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.seg.wide button { min-height: 40px; white-space: nowrap; }
.inst-banner {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--tint); border: 0; border-bottom: 1px solid var(--edge); color: var(--text); font-weight: 600; font-size: 15px; text-align: left;
}
.inst-banner span { flex: 1; }
.inst-banner .i:first-child { color: var(--green); }
.inst-banner + .page { padding-top: 8px; }
.inst-sheet { max-height: calc(var(--vvh, 100dvh) - 24px); overflow-y: auto; padding: 0; }
.inst-sheet .gate { min-height: 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.inst-close { justify-self: center; align-self: center; }

/* Tekening: adresbalk onderaan in Safari, deelknop linksonder */
.inst-fig { margin: 0; }
.inst-fig svg { display: block; width: 100%; max-width: 320px; height: auto; }
.inst-fig .f-bar { fill: var(--surface-high); stroke: var(--edge-strong); }
.inst-fig .f-field { fill: var(--surface); stroke: var(--edge); }
.inst-fig .f-hi { fill: var(--tint); stroke: var(--green); stroke-width: 2; }
.inst-fig .f-share { fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inst-fig .f-url { fill: var(--soft); font: 600 13px "Bricolage Grotesque", system-ui, sans-serif; }
.inst-fig .f-dots { fill: var(--faint); }
/* Smalle telefoons: merknaam en taalkeuze passen samen op één regel, zonder afkappen. */
.seg.compact { padding: 2px; gap: 2px; }
.seg.compact button { min-width: 40px; padding: 0 8px; }
@media (max-width: 370px) {
  .inst-top { gap: 8px; }
  .inst-top .brand { gap: 8px; font-size: 16px; }
  .inst-top .mark { width: 32px; height: 32px; }
}
