:root {
  --bg: #f4f1ea;
  --kaart: #ffffff;
  --tekst: #1d1b18;
  --zacht: #5c564c;
  --accent: #2f5d50;
  --accent-tekst: #ffffff;
  --rand: #d9d3c7;
  --fout: #a3261b;
  --goed: #1f6b3a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181715;
    --kaart: #23211e;
    --tekst: #f1ede4;
    --zacht: #b7afa1;
    --accent: #7fc2ab;
    --accent-tekst: #10201b;
    --rand: #3a3631;
    --fout: #ff8f84;
    --goed: #8fd8a8;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--tekst);
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}
.kaart {
  width: 100%;
  max-width: 480px;
  background: var(--kaart);
  border: 1px solid var(--rand);
  border-radius: 16px;
  padding: 24px 20px 28px;
}
h1 { font-size: 1.6rem; margin: 0 0 8px; }
.intro { color: var(--zacht); margin: 0 0 20px; }

.visueel-verborgen {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.kies {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 120px;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  font-size: 1.2rem; font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.kies-icoon { font-size: 2rem; }
#bestanden:focus-visible + .kies { outline: 3px solid var(--accent); outline-offset: 3px; }

.voorbeeld {
  list-style: none; padding: 0; margin: 16px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px;
}
.voorbeeld li { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--rand); }
.voorbeeld img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voorbeeld li.klaar::after,
.voorbeeld li.mislukt::after {
  position: absolute; inset: auto 4px 4px auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
}
.voorbeeld li.klaar::after { content: "✓"; background: var(--goed); color: #fff; }
.voorbeeld li.mislukt::after { content: "!"; background: var(--fout); color: #fff; }
.voorbeeld li.bezig img { opacity: .5; }

.label { display: block; font-weight: 600; margin: 8px 0 6px; }
.optioneel { font-weight: 400; color: var(--zacht); }
input[type="text"] {
  width: 100%; font: inherit; color: inherit; background: transparent;
  padding: 12px 14px; border: 1px solid var(--rand); border-radius: 10px;
}
input[type="text"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

.knop {
  width: 100%; min-height: 56px; margin-top: 20px;
  font: inherit; font-size: 1.15rem; font-weight: 700;
  background: var(--accent); color: var(--accent-tekst);
  border: 0; border-radius: 12px; cursor: pointer;
}
.knop:disabled { opacity: .45; cursor: not-allowed; }
.knop:focus-visible { outline: 3px solid var(--tekst); outline-offset: 3px; }

.status { margin: 16px 0 0; min-height: 1.5em; }
.status.fout { color: var(--fout); font-weight: 600; }
.status.goed { color: var(--goed); font-weight: 600; }

/* ---------- briefje ---------- */
.briefje { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rand); }
.briefje h2 { font-size: 1.25rem; margin: 0 0 6px; }
textarea {
  width: 100%; font: inherit; color: inherit; background: transparent; resize: vertical;
  padding: 12px 14px; border: 1px solid var(--rand); border-radius: 10px;
}
textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.teller { text-align: right; font-size: .85rem; color: var(--zacht); margin-top: 4px; }
.briefje-huidig {
  background: var(--bg); border: 1px solid var(--rand); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 16px;
}
.briefje-huidig-kop { font-weight: 600; margin-bottom: 4px; }
.briefje-lijst { list-style: none; margin: 0; padding: 0; }
.briefje-lijst li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--rand); }
.briefje-lijst li:first-child { border-top: 0; }
.briefje-lijst p { margin: 0; white-space: pre-line; flex: 1; }
.knop-licht {
  font: inherit; font-weight: 600; min-height: 44px; padding: 0 16px;
  background: transparent; color: var(--fout); border: 1px solid currentColor; border-radius: 10px; cursor: pointer;
}
.knop-licht:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

select, input[type="datetime-local"] {
  width: 100%; font: inherit; color: inherit; background: var(--kaart);
  padding: 12px 14px; border: 1px solid var(--rand); border-radius: 10px; margin-top: 2px;
}
select:focus-visible, input[type="datetime-local"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
input[type="datetime-local"] { margin-top: 8px; }
.briefje-lijst small { color: var(--zacht); }
