/* Kerst — kerst.phantrium.com. Warm en rustig: dennengroen, goud, crème. Mobiel eerst.
   Geen inline stijlen (strikte CSP); dynamische waarden gaan via CSSOM in app.js. */

/* ── lettertypen (zelf gehost) ───────────────────────────────────────── */
@font-face { font-family: 'Fraunces'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/fraunces-latin-opsz-normal.woff2) format('woff2-variations'), url(/fonts/fraunces-latin-opsz-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/fraunces-latin-ext-opsz-normal.woff2) format('woff2-variations'), url(/fonts/fraunces-latin-ext-opsz-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-display: swap; font-weight: 100 900;
  src: url(/fonts/fraunces-latin-opsz-italic.woff2) format('woff2-variations'), url(/fonts/fraunces-latin-opsz-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2-variations'), url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2-variations'), url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ── tokens ──────────────────────────────────────────────────────────── */
:root {
  --den-950: #0d231a; --den-900: #133024; --den-850: #173a2b; --den-800: #1c4332; --den-700: #25533f; --den-600: #2f6550;
  --den-300: #9fbcab; --den-200: #cbdbd0; --den-100: #e3ece5; --den-50: #f0f5f1;
  --goud-800: #6b5012; --goud-700: #7d5f16; --goud-600: #9a7623; --goud-500: #b8902f; --goud-400: #d0aa4e; --goud-300: #e2c57d; --goud-200: #efdcab; --goud-100: #f7ecd0;
  --creme-0: #fffdf8; --creme-50: #fbf7ee; --creme-100: #f6efdf; --creme-200: #ebe0c6; --creme-300: #ddcda7;
  --inkt: #1a2620; --inkt-2: #46534b; --inkt-3: #66716a;
  --bes: #9e2f2a; --bes-100: #f6e3df;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r-s: 8px; --r: 12px; --r-l: 18px;
  --schaduw: 0 1px 0 rgba(26, 38, 32, .04), 0 10px 28px -16px rgba(26, 38, 32, .28);
  --schaduw-klein: 0 1px 0 rgba(26, 38, 32, .05), 0 4px 12px -8px rgba(26, 38, 32, .25);
  --breed: 1120px; --smal: 760px;
  --veilig-onder: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

/* ── basis ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--sans); font-size: 1rem; line-height: 1.6; color: var(--inkt); background: var(--creme-50);
  font-feature-settings: 'kern'; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--den-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--den-900); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.012em; color: var(--den-900); font-optical-sizing: auto; }
h1 { font-size: clamp(2.1rem, 6.4vw, 3.9rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--goud-400); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--goud-200); color: var(--den-950); }
[hidden] { display: none !important; }
.verborgen { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.zacht { color: var(--inkt-2); }
.klein { font-size: .875rem; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.ico--klein { width: 1em; height: 1em; }
.springnaar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--goud-400); color: var(--den-950); padding: 10px 14px; border-radius: var(--r-s); font-weight: 600; text-decoration: none; }
.springnaar:focus { top: 12px; }

/* ── merk ────────────────────────────────────────────────────────────── */
.merk { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--creme-50); font-family: var(--serif); font-weight: 600; font-size: 1.5rem; letter-spacing: .005em; line-height: 1; }
.merk:hover { color: #fff; }
.merk-ster { width: 26px; height: 26px; color: var(--goud-400); }
.merk--donker { color: var(--den-900); }
.merk--donker:hover { color: var(--den-950); }
.merk--donker .merk-ster { color: var(--goud-500); }

/* ── knoppen ─────────────────────────────────────────────────────────── */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  background: var(--creme-0); color: var(--den-900); border-color: var(--creme-300); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; text-align: center;
}
.knop:hover { border-color: var(--den-300); background: #fff; }
.knop:disabled, .knop[aria-disabled='true'] { opacity: .55; cursor: not-allowed; }
.knop--primair { background: var(--den-800); color: var(--creme-50); border-color: var(--den-800); }
.knop--primair:hover { background: var(--den-700); border-color: var(--den-700); color: #fff; }
.knop--goud { background: var(--goud-400); color: var(--den-950); border-color: var(--goud-500); box-shadow: inset 0 -2px 0 rgba(107, 80, 18, .25); }
.knop--goud:hover { background: var(--goud-300); border-color: var(--goud-500); }
.knop--stil { background: transparent; border-color: transparent; color: var(--den-700); padding-left: 10px; padding-right: 10px; }
.knop--stil:hover { background: var(--den-50); border-color: transparent; }
.knop--gevaar { background: transparent; color: var(--bes); border-color: #dcb5ae; }
.knop--gevaar:hover { background: var(--bes-100); border-color: var(--bes); color: var(--bes); }
.knop--vol { width: 100%; }
.knop--groot { min-height: 54px; font-size: 1.06rem; padding: 12px 24px; border-radius: 12px; }
.knop--klein { min-height: 38px; padding: 6px 12px; font-size: .925rem; border-radius: 9px; }
.knop--ico { width: 44px; min-width: 44px; padding: 0; }
.knop--ico.knop--klein { width: 38px; min-width: 38px; }
.knop .ico { width: 20px; height: 20px; }
.knop[aria-busy='true'] { position: relative; color: transparent !important; }
.knop[aria-busy='true']::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--goud-300) transparent var(--goud-300) transparent; animation: draai .8s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }
.knoppen { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── formulieren ─────────────────────────────────────────────────────── */
.veld { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.veld > span, .veld-label { font-weight: 600; font-size: .925rem; color: var(--den-900); }
.veld small { color: var(--inkt-2); font-size: .85rem; }
.invoer, .keuze, textarea.invoer {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--creme-300); background: var(--creme-0);
  color: var(--inkt); font-size: 1rem; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
textarea.invoer { min-height: 92px; resize: vertical; line-height: 1.5; }
.invoer::placeholder { color: #8b958e; }
.invoer:focus, .keuze:focus { outline: none; border-color: var(--den-600); box-shadow: 0 0 0 3px var(--goud-200); }
.invoer[aria-invalid='true'] { border-color: var(--bes); }
.keuze { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--den-700) 50%), linear-gradient(135deg, var(--den-700) 50%, transparent 50%); background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.code-invoer { font-family: var(--serif); font-size: 2rem; letter-spacing: .42em; text-align: center; padding-left: calc(14px + .42em); font-variant-numeric: tabular-nums lining-nums; min-height: 62px; }
.vinkje { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--inkt-2); cursor: pointer; margin: 2px 0 14px; }
.vinkje input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--den-800); flex: none; }
.rij { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .rij--2 { grid-template-columns: 1fr 1fr; } .rij--3 { grid-template-columns: 2fr 1fr; } .rij--keuze { grid-template-columns: minmax(0, 1fr) max-content; } }
.formfout { display: flex; gap: 8px; align-items: flex-start; color: var(--bes); font-size: .925rem; font-weight: 500; margin: -4px 0 12px; }
.formfout .ico { margin-top: 2px; }

/* ── meldingen ───────────────────────────────────────────────────────── */
.melding { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--den-50); border: 1px solid var(--den-200); color: var(--den-900); margin-bottom: 16px; font-size: .95rem; }
.melding .ico { margin-top: 2px; color: var(--den-700); }
.melding p { margin: 0; }
.melding--let-op { background: #fbf3e2; border-color: var(--goud-300); color: #4d3a0d; }
.melding--let-op .ico { color: var(--goud-700); }
.melding--fout { background: var(--bes-100); border-color: #e2b8b1; color: #5f1c18; }
.melding--fout .ico { color: var(--bes); }

/* ── toast ───────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(16px + var(--veilig-onder)); display: grid; justify-items: center; gap: 8px; z-index: 60; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: min(520px, 100%); background: var(--den-900); color: var(--creme-50); padding: 12px 18px; border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(13, 35, 26, .55); font-size: .95rem; display: flex; gap: 10px; align-items: center; animation: toastIn .25s ease-out; }
.toast .ico { color: var(--goud-300); }
.toast--fout { background: #5f1c18; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── sneeuw ──────────────────────────────────────────────────────────── */
.sneeuw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sneeuw { display: none; } .toast { animation: none; } }

/* ── landing: held ───────────────────────────────────────────────────── */
.held { position: relative; overflow: hidden; background: var(--den-900); color: var(--creme-100); isolation: isolate; }
.held::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(226, 197, 125, .35); }
.held-kop { position: relative; z-index: 2; max-width: var(--breed); margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.held-binnen { position: relative; z-index: 2; max-width: var(--breed); margin: 0 auto; padding: 22px 20px 56px; display: grid; gap: 34px; }
.held-tekst h1 { color: var(--creme-50); margin: 14px 0 18px; }
.held-tekst h1 em { font-style: italic; font-weight: 500; color: var(--goud-300); }
.held-lead { font-size: 1.12rem; line-height: 1.6; color: #d3ded6; max-width: 34em; }
.held-tak { position: absolute; z-index: 1; right: -20px; top: 48px; width: 320px; height: auto; opacity: .92; pointer-events: none; }
@media (min-width: 560px) { .held-tak { width: 400px; right: -24px; top: 42px; } }
.held-kop .balk-knop { background: var(--den-900); }
.held-kop .balk-knop:hover { background: var(--den-800); }
.aftel-regel { display: inline-flex; align-items: center; gap: 8px; color: var(--goud-300); font-weight: 600; font-size: .95rem; letter-spacing: .01em; }
.aftel-regel .ico { color: var(--goud-400); }
.held-punten { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; color: #d3ded6; font-size: .98rem; }
.held-punten li { display: flex; gap: 10px; align-items: flex-start; }
.held-punten .ico { color: var(--goud-400); margin-top: 3px; }
@media (min-width: 900px) {
  .held-binnen { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 56px; padding: 96px 20px 88px; }
  .held-tak { width: 520px; right: -20px; top: 30px; }
}

/* ── kaarten ─────────────────────────────────────────────────────────── */
.kaart { background: var(--creme-0); border: 1px solid var(--creme-200); border-radius: var(--r-l); box-shadow: var(--schaduw); padding: 22px; min-width: 0; }
.kaart--plat { box-shadow: none; }
.kaart h2, .kaart h3 { margin-bottom: 8px; }
.kaart-kop { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.kaart-kop > * { min-width: 0; }
@media (min-width: 560px) { .kaart { padding: 28px; } }

.inlog-kaart { color: var(--inkt); position: relative; }
.inlog-kaart h2 { font-size: 1.6rem; }
.inlog-kaart .ondertitel { color: var(--inkt-2); margin-bottom: 18px; }
.inlog-voet { margin: 14px 0 0; font-size: .875rem; color: var(--inkt-3); }
.terugknop { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 6px 0; color: var(--den-700); font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.terugknop:hover { color: var(--den-900); }
.terugknop .ico { width: 18px; height: 18px; }

/* ── landing: secties ────────────────────────────────────────────────── */
.sectie { max-width: var(--breed); margin: 0 auto; padding: 64px 20px; }
.sectie-kop { max-width: 640px; margin-bottom: 34px; }
.sectie-kop p { color: var(--inkt-2); font-size: 1.06rem; margin-top: 10px; }
.kenmerken { display: grid; gap: 18px; }
.kenmerk { padding: 26px; border-radius: var(--r-l); background: var(--creme-0); border: 1px solid var(--creme-200); }
.kenmerk h3 { margin: 16px 0 8px; }
.kenmerk p { color: var(--inkt-2); margin: 0; }
.kenmerk-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--den-850); color: var(--goud-300); box-shadow: 0 0 0 4px var(--creme-0), 0 0 0 5px var(--goud-300); }
.kenmerk-ico .ico { width: 24px; height: 24px; }
@media (min-width: 820px) { .kenmerken { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.stappen { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; counter-reset: stap; }
.stappen li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; }
.stap-nr { font-family: var(--serif); font-size: 2.6rem; line-height: .9; color: var(--goud-500); font-weight: 500; }
.stappen h3 { margin-bottom: 4px; }
.stappen p { margin: 0; color: var(--inkt-2); }
@media (min-width: 820px) { .stappen { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; } }

.band { background: var(--creme-100); border-top: 1px solid var(--creme-200); border-bottom: 1px solid var(--creme-200); }
.veilig { display: grid; gap: 24px; align-items: center; }
.veilig-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--den-850); color: var(--goud-300); }
.veilig-ico .ico { width: 30px; height: 30px; }
.veilig p { color: var(--inkt-2); margin: 8px 0 0; max-width: 60ch; }
@media (min-width: 820px) { .veilig { grid-template-columns: auto minmax(0, 1fr); gap: 28px; } }

/* ── voet ────────────────────────────────────────────────────────────── */
.voet { margin-top: auto; border-top: 1px solid var(--creme-200); background: var(--creme-50); }
.voet-binnen { max-width: var(--breed); margin: 0 auto; padding: 22px 20px calc(22px + var(--veilig-onder)); display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between; color: var(--inkt-2); font-size: .9rem; }
.voet a { color: var(--den-800); }
.voet-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.voet--los { text-align: center; padding: 22px 20px; font-size: .9rem; color: var(--inkt-2); }

/* ── app: bovenbalk ──────────────────────────────────────────────────── */
.bovenbalk { position: sticky; top: 0; z-index: 30; background: var(--den-900); color: var(--creme-100); border-bottom: 1px solid rgba(226, 197, 125, .28); }
.bovenbalk-binnen { max-width: var(--breed); margin: 0 auto; padding: 10px 16px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bovenbalk .merk { font-size: 1.35rem; }
.bovenbalk .merk-ster { width: 22px; height: 22px; }
.bovenbalk-acties { display: flex; align-items: center; gap: 6px; }
.balk-knop { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(226, 197, 125, .28); color: var(--creme-50); font-weight: 600; font-size: .95rem; text-decoration: none; max-width: 52vw; }
.balk-knop:hover { background: rgba(255, 255, 255, .11); color: #fff; }
.balk-knop span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balk-knop--ico { padding: 0; width: 42px; justify-content: center; }
.balk-knop--ico .ico { width: 20px; height: 20px; color: var(--goud-300); }

.avatar { --tint: 150; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem; letter-spacing: .02em;
  background: hsl(var(--tint) 32% 86%); color: hsl(var(--tint) 45% 20%); border: 1px solid hsl(var(--tint) 25% 74%); }
.avatar--groot { width: 44px; height: 44px; font-size: 1rem; }
.bovenbalk .avatar { background: var(--goud-300); color: var(--den-950); border-color: var(--goud-400); }

/* ── app: pagina's ───────────────────────────────────────────────────── */
.app-hoofd { flex: 1 0 auto; width: 100%; }
.pagina { max-width: var(--breed); margin: 0 auto; padding: 22px 16px 56px; }
.pagina--smal { max-width: var(--smal); }
.pagina-kop { margin-bottom: 20px; }
.pagina-kop h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); }
.pagina-kop p { color: var(--inkt-2); margin: 8px 0 0; }
.laden { display: grid; place-items: center; min-height: 40vh; color: var(--inkt-3); }
.laden-ster { width: 34px; height: 34px; color: var(--goud-400); animation: draai 2.4s linear infinite; }
@media (prefers-reduced-motion: reduce) { .laden-ster { animation: none; } }

/* welkomstband met aftelklok */
.welkom { position: relative; overflow: hidden; isolation: isolate; background: var(--den-900); color: var(--creme-100); border-radius: var(--r-l); padding: 24px 20px; margin-bottom: 26px; border: 1px solid var(--den-800); }
.welkom > :not(canvas) { position: relative; z-index: 1; }
.welkom h1 { color: var(--creme-50); font-size: clamp(1.8rem, 5vw, 2.6rem); }
.welkom p { color: #cbd8cf; margin: 6px 0 0; }
.welkom-rij { display: grid; gap: 20px; align-items: end; }
@media (min-width: 760px) { .welkom { padding: 30px 32px; } .welkom-rij { grid-template-columns: minmax(0, 1fr) auto; } }

.aftel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 420px; }
.aftel-vak { background: rgba(255, 255, 255, .05); border: 1px solid rgba(226, 197, 125, .3); border-radius: 12px; padding: 10px 6px 8px; text-align: center; min-width: 0; }
.aftel-getal { display: block; font-family: var(--serif); font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.05; color: var(--goud-300); font-variant-numeric: tabular-nums lining-nums; font-weight: 500; }
.aftel-label { display: block; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: #b9c9be; margin-top: 4px; white-space: nowrap; }
.aftel-kort { display: none; }
@media (max-width: 439px) { .aftel-lang { display: none; } .aftel-kort { display: inline; } }
.aftel-feest { font-family: var(--serif); font-size: 1.5rem; color: var(--goud-300); }
.aftel--licht .aftel-vak { background: var(--creme-0); border-color: var(--creme-200); }
.aftel--licht .aftel-getal { color: var(--den-850); }
.aftel--licht .aftel-label { color: var(--inkt-3); }

/* groepen */
.sectie-titel { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 14px; }
.sectie-titel h2 { font-size: 1.5rem; }
.groepen { display: grid; gap: 14px; }
@media (min-width: 700px) { .groepen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .groepen { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.groep-kaart { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; padding: 20px; border-radius: var(--r-l); background: var(--creme-0); border: 1px solid var(--creme-200); box-shadow: var(--schaduw-klein); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.groep-kaart:hover { border-color: var(--goud-300); color: inherit; box-shadow: var(--schaduw); }
.groep-kaart h3 { font-size: 1.3rem; overflow-wrap: anywhere; }
.groep-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--inkt-2); font-size: .9rem; }
.groep-meta span { display: inline-flex; align-items: center; gap: 6px; }
.groep-meta .ico { width: 16px; height: 16px; color: var(--goud-600); }
.groep-kaart-voet { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--creme-300); font-size: .9rem; color: var(--den-700); font-weight: 600; }
.groep-kaart-voet .ico { width: 18px; height: 18px; }
.nieuw-kaart { display: grid; place-items: center; gap: 8px; text-align: center; min-height: 150px; padding: 20px; border-radius: var(--r-l); border: 1.5px dashed var(--creme-300); background: transparent; color: var(--den-800); font-weight: 600; width: 100%; }
.nieuw-kaart:hover { border-color: var(--goud-500); background: var(--creme-0); }
.nieuw-kaart .ico { width: 28px; height: 28px; color: var(--goud-600); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--den-100); color: var(--den-800); white-space: nowrap; }
.badge .ico { width: 13px; height: 13px; }
.badge--goud { background: var(--goud-100); color: var(--goud-800); }
.badge--zacht { background: var(--creme-100); color: var(--inkt-2); }

.leeg { text-align: center; padding: 34px 18px; border-radius: var(--r-l); border: 1px dashed var(--creme-300); background: var(--creme-0); }
.leeg .ico { width: 38px; height: 38px; margin: 0 auto 10px; color: var(--goud-500); }
.leeg h3 { margin-bottom: 6px; }
.leeg p { color: var(--inkt-2); margin: 0 auto 14px; max-width: 42ch; }

/* groep-kop + tabs */
.groep-kop { margin-bottom: 14px; }
.groep-kop h1 { font-size: clamp(1.8rem, 5.4vw, 2.6rem); overflow-wrap: anywhere; }
.groep-kop .groep-meta { margin-top: 8px; }
.tabs { position: sticky; top: 61px; z-index: 20; background: var(--creme-50); margin: 0 -16px 22px; padding: 0 16px; border-bottom: 1px solid var(--creme-200); display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 14px 12px 13px; color: var(--inkt-2); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; border: 0; background: none; }
.tab .ico { width: 18px; height: 18px; }
.tab:hover { color: var(--den-900); }
.tab[aria-current='page'] { color: var(--den-900); }
.tab[aria-current='page']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--goud-500); }
.tab[aria-current='page'] .ico { color: var(--goud-600); }
.tab-kort { display: none; }
@media (max-width: 559px) {
  .tabs { gap: 0; }
  .tab { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 2px 9px; font-size: .8rem; letter-spacing: .01em; }
  .tab .ico { width: 20px; height: 20px; }
  .tab-lang { display: none; }
  .tab-kort { display: inline; }
  .tab[aria-current='page']::after { left: 22%; right: 22%; }
}

.raster { display: grid; gap: 18px; }
@media (min-width: 980px) { .raster--2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }

/* lootje */
.lootje { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-l); background: var(--den-900); color: var(--creme-100); padding: 26px 22px; border: 1px solid var(--den-800); text-align: center; }
.lootje > :not(canvas) { position: relative; z-index: 1; }
.lootje-label { color: #c4d3c9; font-size: .95rem; }
.lootje-naam { font-family: var(--serif); font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.05; color: var(--goud-300); margin: 10px 0 8px; overflow-wrap: anywhere; font-weight: 500; }
.lootje-naam--dicht { filter: blur(14px); user-select: none; }
.lootje-budget { display: inline-flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(226, 197, 125, .3); border-radius: 999px; padding: 6px 14px; font-size: .92rem; color: var(--creme-100); margin-bottom: 16px; }
.lootje .knop { margin-top: 4px; }
.lootje .knop--rand-licht { background: transparent; color: var(--creme-50); border-color: rgba(226, 197, 125, .45); }
.lootje .knop--rand-licht:hover { background: rgba(255, 255, 255, .08); }
.lootje-geheim { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: .85rem; color: #aebfb3; }
.lootje-geheim .ico { width: 16px; height: 16px; color: var(--goud-400); }

.status-blok { display: flex; gap: 14px; align-items: flex-start; }
.status-ico { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--den-100); color: var(--den-800); }
.status-ico--goud { background: var(--goud-100); color: var(--goud-700); }
.status-ico .ico { width: 22px; height: 22px; }
.status-blok h3 { margin-bottom: 4px; }
.status-blok p { color: var(--inkt-2); margin: 0; }

/* lijsten */
.lijst { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--creme-0); border: 1px solid var(--creme-200); min-width: 0; }
.item-hoofd { flex: 1 1 auto; min-width: 0; }
.item-titel { font-weight: 600; color: var(--inkt); overflow-wrap: anywhere; }
.item-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: .9rem; color: var(--inkt-2); min-width: 0; }
.item-sub a { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.item-sub a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.item-sub .ico { width: 15px; height: 15px; }
.item-notitie { margin: 6px 0 0; font-size: .92rem; color: var(--inkt-2); white-space: pre-line; overflow-wrap: anywhere; }
.item-acties { display: flex; gap: 6px; flex: none; align-items: center; }
@media (max-width: 479px) {
  .item:has(.koop-knop, .koop-status) { flex-wrap: wrap; }
  .item:has(.koop-knop, .koop-status) > .item-acties { flex: 1 1 100%; }
}
.item--gekocht { background: var(--creme-100); }
.item--gekocht .item-titel { color: var(--inkt-3); text-decoration: line-through; text-decoration-color: var(--creme-300); }
.item--mijn-koop { border-color: var(--den-300); background: var(--den-50); }
.prijs { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--den-800); }

.koop-knop { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--den-300); background: var(--creme-0); color: var(--den-800); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.koop-knop:hover { background: var(--den-50); }
.koop-knop[aria-pressed='true'] { background: var(--den-800); border-color: var(--den-800); color: var(--creme-50); }
.koop-knop .ico { width: 17px; height: 17px; }
.koop-status { font-size: .85rem; color: var(--inkt-3); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.koop-status .ico { width: 16px; height: 16px; }

.persoon { border-radius: var(--r-l); border: 1px solid var(--creme-200); background: var(--creme-0); overflow: hidden; }
.persoon + .persoon { margin-top: 10px; }
.persoon-kop { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: none; border: 0; text-align: left; min-height: 60px; }
.persoon-kop:hover { background: var(--creme-100); }
.persoon-naam { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.persoon-kop .ico { color: var(--inkt-3); transition: transform .2s; }
.persoon-kop[aria-expanded='true'] .ico { transform: rotate(180deg); }
.persoon-inhoud { padding: 0 14px 14px; }
@media (prefers-reduced-motion: reduce) { .persoon-kop .ico { transition: none; } }

.leden-lijst { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lid { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--creme-0); border: 1px solid var(--creme-200); min-width: 0; flex-wrap: wrap; }
.lid-naam { flex: 1 1 140px; min-width: 0; font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.lid-naam > span:first-child { overflow-wrap: anywhere; }
.lid-acties { display: flex; gap: 6px; align-items: center; margin-left: auto; }

.schakel { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--inkt-2); cursor: pointer; }
.schakel input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schakel-baan { width: 42px; height: 26px; border-radius: 999px; background: var(--creme-300); position: relative; transition: background-color .15s; flex: none; }
.schakel-baan::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.schakel input:checked + .schakel-baan { background: var(--den-700); }
.schakel input:checked + .schakel-baan::after { transform: translateX(16px); }
.schakel input:focus-visible + .schakel-baan { outline: 3px solid var(--goud-400); outline-offset: 2px; }

.paren { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; }
.paar { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--goud-100); border: 1px solid var(--goud-200); color: var(--goud-800); font-weight: 600; font-size: .9rem; max-width: 100%; }
.paar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.paar button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .6); color: var(--goud-800); display: grid; place-items: center; flex: none; }
.paar button:hover { background: #fff; }
.paar .ico { width: 15px; height: 15px; }

.link-vak { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.link-vak .invoer { font-size: .9rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--inkt-2); min-width: 0; }

.diner-groep { margin-top: 18px; }
.diner-groep h3 { font-size: .8rem; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--goud-700); margin-bottom: 10px; }
.wie { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--den-800); font-weight: 600; }
.wie .avatar { width: 24px; height: 24px; font-size: .7rem; }

.apparaat { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); border: 1px solid var(--creme-200); background: var(--creme-0); }
.apparaat .ico { color: var(--den-700); margin-top: 3px; }
.apparaat-hoofd { flex: 1 1 auto; min-width: 0; }
.apparaat-sub { font-size: .88rem; color: var(--inkt-2); overflow-wrap: anywhere; }

.gevaarzone { border-color: #e7c7c1; }
.gevaarzone h3 { color: var(--bes); }

/* dialoog */
dialog.dialoog { border: 0; padding: 0; border-radius: var(--r-l); background: var(--creme-0); color: var(--inkt); width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 24px 60px -20px rgba(13, 35, 26, .6); }
dialog.dialoog::backdrop { background: rgba(13, 35, 26, .55); }
.dialoog-binnen { padding: 22px; overflow: auto; }
.dialoog h2 { font-size: 1.45rem; margin-bottom: 8px; }
.dialoog p { color: var(--inkt-2); }
.dialoog .knoppen { justify-content: flex-end; margin-top: 8px; }

/* losse pagina's (afmelden, 404, privacy) */
body.los { background: var(--creme-50); }
.los-kaart { width: min(560px, calc(100% - 32px)); margin: 48px auto 24px; background: var(--creme-0); border: 1px solid var(--creme-200); border-radius: var(--r-l); padding: 28px; box-shadow: var(--schaduw); }
.los-kaart h1 { font-size: 1.8rem; margin: 18px 0 12px; }
.los-kaart form { margin: 18px 0; }
.tekstpagina { max-width: 760px; margin: 0 auto; padding: 34px 20px 64px; }
.tekstpagina h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: 22px 0 10px; }
.tekstpagina h2 { font-size: 1.4rem; margin: 30px 0 8px; }
.tekstpagina ul { padding-left: 1.2em; }
.tekstpagina li { margin-bottom: 6px; }

/* installeren-hint */
.installeer { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--r); background: var(--goud-100); border: 1px solid var(--goud-200); margin-bottom: 18px; color: var(--goud-800); flex-wrap: wrap; }
.installeer p { margin: 0; font-weight: 600; font-size: .95rem; }

@media (min-width: 560px) { .pagina { padding: 30px 20px 64px; } .tabs { margin: 0 -20px 24px; padding: 0 20px; } }
@media (min-width: 1120px) { .tabs { margin: 0 0 26px; padding: 0; } }
@media print { .bovenbalk, .tabs, .voet, .sneeuw { display: none !important; } }

/* boot: bekende gebruiker meteen naar de app (zonder flits van de voorpagina) */
html.ingelogd #landing { display: none; }
#app { display: none; }
html.ingelogd #app, html.app-actief #app { display: flex; flex-direction: column; flex: 1 0 auto; }
html.app-actief #landing { display: none; }

/* ── aanvullingen ────────────────────────────────────────────────────── */
.h2-maat { font-size: clamp(1.5rem, 4vw, 1.9rem); margin-bottom: 8px; }
.h3-maat { font-size: 1.28rem; margin-bottom: 10px; }
.knoppen--boven { margin-top: 14px; }
.knoppen-ruimte { height: 14px; }
.scheiding { border: 0; border-top: 1px solid var(--creme-200); margin: 22px 0; }
.tussenkop { font-size: 1rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; margin: 22px 0 10px; color: var(--den-900); }
.wens-form h3 { margin-bottom: 12px; }
.uitslag { margin-top: 14px; }
.uitslag .item { padding: 10px 12px; align-items: center; }
.uitslag .item > .ico, .lijst .item > .ico { color: var(--den-700); margin-top: 2px; }
.held-punten--licht { color: var(--inkt-2); margin-top: 6px; }
.held-punten--licht .ico { color: var(--goud-600); }
.schakel--rij { display: flex; gap: 12px; color: var(--inkt); font-size: .98rem; margin: 6px 0 12px; }
.kaart--na { margin-top: 16px; }
.balk-knop--tekst { padding: 6px 16px; }
.item-titel .badge { margin-left: 8px; vertical-align: 2px; }
.bovenbalk { padding-top: env(safe-area-inset-top, 0px); }
.tabs { top: calc(61px + env(safe-area-inset-top, 0px)); }
.held-kop { padding-top: max(18px, env(safe-area-inset-top, 0px)); }
.inlog-kaart .status-blok { margin-bottom: 16px; }
.inlog-kaart .status-blok h2 { margin-bottom: 6px; }
