:root {
  --bg: #f4f6f5; --vlak: #ffffff; --tekst: #17201d; --zacht: #5d6b66;
  --lijn: #d8dfdc; --accent: #0f6b5c; --accent-tekst: #ffffff;
  --goed-bg: #e0f3ec; --goed: #0b5a4c; --fout-bg: #fbe6e3; --fout: #a12b1c;
  --geel: #f7cf3e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111715; --vlak: #1a2320; --tekst: #e9efec; --zacht: #9aa8a3;
    --lijn: #2f3b37; --accent: #3fb8a0; --accent-tekst: #08231d;
    --goed-bg: #17352d; --goed: #8fe0cc; --fout-bg: #3d1e19; --fout: #f4b1a6;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--tekst);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main {
  max-width: 460px; margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
h1 { margin: 0; font-size: 26px; }
h2 { margin: 0 0 12px; font-size: 17px; }
.saldo { margin: 0; color: var(--zacht); font-size: 15px; }
section, form:not(.kaal) { background: var(--vlak); border: 1px solid var(--lijn); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
label, legend { display: block; padding: 0; margin-bottom: 6px; color: var(--zacht); font-size: 14px; }
[hidden] { display: none !important; }
#alle-kentekens { margin-top: 10px; }
.kentekenlijst { list-style: none; margin: 6px 0 0; padding: 0; }
.kentekenlijst li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.kentekenlijst button[data-kenteken] { flex: 1; min-width: 0; min-height: 44px; padding: 4px 12px; text-align: left; background: var(--bg); border: 1px solid var(--lijn); border-radius: 10px; font-size: 15px; overflow-wrap: anywhere; }
.kentekenlijst button.gekozen { background: var(--accent); border-color: var(--accent); color: var(--accent-tekst); }
.ster { flex: none; width: 44px; height: 44px; background: none; border: 0; color: var(--accent); font-size: 22px; line-height: 1; }
#bewaar-rij { margin-top: 12px; }
label.vinkje { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; color: var(--tekst); font-size: 15px; cursor: pointer; }
.vinkje input { width: 20px; min-height: 0; height: 20px; margin: 0; accent-color: var(--accent); }
#naam-rij { margin-top: 8px; }
label.tweede { margin-top: 14px; }
fieldset { border: 0; padding: 0; margin: 16px 0 0; }
input {
  width: 100%; min-height: 46px; padding: 8px 12px; font: inherit; color: var(--tekst);
  background: var(--bg); border: 1px solid var(--lijn); border-radius: 10px;
}
input.kenteken {
  min-height: 56px; text-align: center; text-transform: uppercase; font-size: 24px; font-weight: 700;
  letter-spacing: 1px; color: #17201d; background: var(--geel); border-color: transparent;
}
input.kenteken::placeholder { color: #17201d; opacity: .35; }
button { font: inherit; cursor: pointer; color: var(--tekst); touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:not(:empty) { margin-top: 10px; }
.chips button { min-height: 40px; padding: 4px 12px; background: var(--bg); border: 1px solid var(--lijn); border-radius: 20px; font-size: 14px; }
.chips button.gekozen, .keuzes button.gekozen { background: var(--accent); border-color: var(--accent); color: var(--accent-tekst); }
.keuzes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keuzes button { min-height: 46px; background: var(--bg); border: 1px solid var(--lijn); border-radius: 10px; }
details { margin-top: 14px; }
summary { min-height: 32px; color: var(--zacht); cursor: pointer; font-size: 14px; }
details label { margin-top: 6px; }
.primair {
  width: 100%; min-height: 52px; margin-top: 16px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-tekst); font-weight: 650; font-size: 17px;
}
button:disabled { opacity: .55; cursor: default; }
.kaal { text-align: center; }
.link { min-height: 44px; padding: 8px 16px; background: none; border: 0; color: var(--zacht); text-decoration: underline; }
.sessies { list-style: none; margin: 0; padding: 0; }
.sessies li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 10px 0; border-top: 1px solid var(--lijn); }
.sessies li:first-child { border-top: 0; padding-top: 0; }
.sessies li:last-child { padding-bottom: 0; }
.sessies .titel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.sessies strong { padding: 5px 12px; background: var(--geel); color: #17201d; border-radius: 8px; letter-spacing: .5px; }
.sessies .titel span { color: var(--tekst); font-size: 15px; }
.sessies span { color: var(--zacht); font-size: 14px; }
.knoppen { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.knoppen button { flex: 1 1 0; white-space: nowrap; }
.knoppen button:last-child { flex-basis: 100%; }
.sessies .verleng { color: var(--accent); border-color: var(--accent); }
.sessies button { min-height: 42px; padding: 4px 8px; background: transparent; color: var(--fout); border: 1px solid var(--fout); border-radius: 10px; }
.sessies button.zeker { background: var(--fout); color: var(--vlak); }
.melding { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--goed-bg); color: var(--goed); }
.melding.fout { background: var(--fout-bg); color: var(--fout); }
