:root {
  --achtergrond: #0d3b3f;
  --kaart: #ffffff;
  --tekst: #ffffff;
  --zacht: #9fc4c0;
  --lijn: #23605f;
  --groen: #1d9a6c;
  --groen-donker: #157a55;
  --rood: #d63a2a;
  --anna: #ffc93c;
  --anna-licht: rgba(255, 201, 60, 0.25);
  --geel: #fff3c4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--achtergrond);
  color: var(--tekst);
  font-family: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 20px;
  line-height: 1.5;
}

a { color: var(--anna); }
h1 { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; font-size: 2.2rem; line-height: 1.1; margin: 0.4em 0; }
.klein { font-size: 0.9rem; color: var(--zacht); }
.groot { font-size: 1.4rem; }

.testmodus {
  background: #ff6f59;
  color: #fff !important;
  font-size: 1rem !important;
  padding: 14px 16px !important;
  color: #0d3b3f;
  border-bottom: 1px solid #ecd9a0;
  padding: 8px 16px;
  font-size: 0.85rem;
  text-align: center;
}

/* Belscherm: groot, rustig, weinig knoppen */

body.gesprek main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  text-align: center;
  min-height: 100vh;
}

.avatar {
  width: 168px;
  height: 168px;
  margin: 24px auto 8px;
  border-radius: 50%;
  border: none;
  background: var(--anna);
  font: 800 4.5rem/168px "Bricolage Grotesque", system-ui, sans-serif;
  color: #0d3b3f;
  display: block;
  box-shadow: 0 0 0 10px var(--anna-licht);
  transition: box-shadow 0.4s;
  cursor: default;
}
.avatar.belt { animation: belt 1.4s ease-in-out infinite; }
.avatar.praat { animation: praat 1.1s ease-in-out infinite; cursor: pointer; }
.avatar.luistert { box-shadow: 0 0 0 10px rgba(29, 154, 108, 0.35); background: var(--groen); color: #fff; }
.avatar.denkt { opacity: 0.8; }

@keyframes belt {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-6deg); }
  20%, 40% { transform: rotate(6deg); }
  50% { transform: rotate(0); }
}
@keyframes praat {
  0%, 100% { box-shadow: 0 0 0 10px var(--anna-licht); }
  50% { box-shadow: 0 0 0 22px var(--anna-licht); }
}

.toestand { font-size: 1.2rem; color: var(--zacht); margin: 12px 0; }
.anna-zegt { font-size: 1.6rem; line-height: 1.4; min-height: 3em; margin: 16px 0; }
.jij-zegt { font-size: 1.1rem; color: var(--zacht); font-style: italic; min-height: 1.5em; }

button { font: inherit; cursor: pointer; }

.knop-groen, .knop-rood {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 28px auto 0;
  padding: 22px;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
}
.knop-groen { background: var(--groen); }
.knop-groen:hover { background: var(--groen-donker); }
.knop-rood { background: var(--rood); }

.nood {
  background: var(--rood);
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 8px;
  font-size: 1.2rem;
}
.nood strong { font-size: 1.8rem; }
.knop-nood {
  background: #fff;
  color: var(--rood);
  border-radius: 999px;
  padding: 14px;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.typen { margin-top: 32px; font-size: 1rem; color: var(--zacht); }
.typen form { display: flex; gap: 8px; margin-top: 12px; }
.typen input { color: #16302f; flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 12px; border: 1px solid var(--lijn); border-radius: 10px; }
.typen button { padding: 12px 18px; border: none; border-radius: 10px; background: var(--groen); color: #fff; }

.keuzelijst { display: grid; gap: 12px; margin: 24px 0; }
.keuze {
  display: block;
  padding: 20px;
  background: var(--kaart);
  border: 1px solid var(--lijn);
  border-radius: 16px;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--tekst);
}

/* Beheer */

body.beheer { font-size: 16px; }
body.beheer main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 64px; }
body.beheer h1 { font-size: 1.7rem; }
body.beheer h2 { font-size: 1.25rem; margin: 32px 0 12px; }
.balk { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kaart { background: var(--kaart); border: 1px solid var(--lijn); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.melding { border-left: 6px solid var(--anna); }
.melding.nood { background: #fdecea; color: var(--tekst); border-left-color: var(--rood); display: block; font-size: 1rem; }
.melding.gelezen { opacity: 0.55; }
.melding .tijd, .gesprek-kop { font-size: 0.85rem; color: var(--zacht); }
.persoon-rij { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.knop { display: inline-block; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--lijn); background: var(--kaart); color: var(--tekst); text-decoration: none; font-size: 0.95rem; }
.knop.hoofd { background: var(--groen); border-color: var(--groen); color: #fff; }
form.fiche { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
form.fiche label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--zacht); }
form.fiche .breed { grid-column: 1 / -1; }
form.fiche input, form.fiche textarea { font: inherit; font-size: 16px; color: var(--tekst); padding: 10px; border: 1px solid var(--lijn); border-radius: 8px; background: #fff; }
form.fiche textarea { min-height: 70px; resize: vertical; }
.labels { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.label { font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: var(--anna-licht); }
.label.signaal { background: var(--rood); color: #fff; }
.transcript { font-size: 0.9rem; color: var(--zacht); white-space: pre-wrap; margin-top: 8px; }
ul.feiten { margin: 0; padding-left: 20px; }

@media (max-width: 640px) {
  form.fiche { grid-template-columns: 1fr; }
  .avatar { width: 136px; height: 136px; line-height: 136px; font-size: 3.6rem; }
  h1 { font-size: 1.7rem; }
}

.stemkeuze { display: flex; gap: 8px; margin-top: 12px; }
.stemkeuze select { color: #16302f; flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px; border: 1px solid var(--lijn); border-radius: 10px; background: #fff; }
.stemkeuze button { padding: 10px 16px; border: none; border-radius: 10px; background: var(--groen); color: #fff; }

.knop-licht {
  display: block; width: 100%; max-width: 360px; margin: 16px auto 0; padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 999px; background: transparent; color: #fff; font-size: 1.2rem; font-weight: 600;
}
.knop-licht:hover { border-color: var(--anna); color: var(--anna); }
.avatar.rinkelt { animation: belt 1.4s ease-in-out infinite; }

.ja-nee { display: grid; gap: 4px; margin-top: 12px; }
#toestemming-vraag { font-size: 1.35rem; }

.demo-naam { display: block; width: 100%; max-width: 360px; margin: 18px auto 0; font: inherit; font-size: 16px; padding: 14px 16px; border: 2px solid rgba(255,255,255,0.35); border-radius: 16px; background: rgba(255,255,255,0.08); color: #fff; text-align: center; }
.demo-naam::placeholder { color: #9fc4c0; }
a.knop-groen { text-decoration: none; text-align: center; }
#delen-keuze { display: grid; gap: 4px; }

.terug-mijn { position: fixed; top: 14px; left: 14px; z-index: 20; background: rgba(255, 255, 255, 0.95); color: #0d3b3f; text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 999px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5); }
.terug-mijn:hover { background: #fff; }

/* Warmer belscherm */
body.gesprek { background: radial-gradient(900px 520px at 50% -120px, #1f6a62 0, rgba(31, 106, 98, 0) 70%), radial-gradient(700px 400px at 50% 110%, rgba(255, 201, 60, 0.14) 0, rgba(255, 201, 60, 0) 70%), var(--achtergrond); background-attachment: fixed; }
.avatar-doos { position: relative; width: 210px; height: 210px; margin: 18px auto 6px; display: grid; place-items: center; }
.avatar-doos::before, .avatar-doos::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 3px solid rgba(255, 201, 60, 0.5); opacity: 0; }
.avatar-doos:has(.avatar.praat)::before { animation: ring 1.8s ease-out infinite; }
.avatar-doos:has(.avatar.praat)::after { animation: ring 1.8s ease-out 0.9s infinite; }
.avatar-doos:has(.avatar.luistert)::before { border-color: rgba(46, 204, 140, 0.7); animation: ring 2.2s ease-out infinite; }
@keyframes ring { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
.avatar-doos .avatar { margin: 0; width: 168px; height: 168px; line-height: 1; padding: 0; display: grid; place-items: center; }
.gezicht { width: 100%; height: 100%; }
.gezicht .ogen ellipse { fill: #0d3b3f; transform-origin: center; animation: knipper 5s infinite; }
.gezicht .mond { stroke: #0d3b3f; transform-origin: 50px 62px; }
.avatar.praat .mond { animation: praatmond 0.45s ease-in-out infinite alternate; }
.avatar.luistert { background: #3ad19a; }
.avatar.luistert .mond { d: path("M33 62 Q50 68 67 62"); }
@keyframes knipper { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes praatmond { from { transform: scaleY(0.55); } to { transform: scaleY(1.25); } }

.toestand { display: inline-flex; align-items: center; gap: 12px; padding: 12px 26px; border-radius: 999px; font: 800 1.45rem "Bricolage Grotesque", sans-serif; background: rgba(255, 255, 255, 0.1); color: #fff; margin: 14px auto; }
.toestand.praat { background: #ffc93c; color: #0d3b3f; }
.toestand.luistert { background: #3ad19a; color: #05382a; }
.toestand.denkt { background: rgba(255, 255, 255, 0.14); }
.golfje { display: inline-flex; gap: 4px; align-items: center; height: 22px; }
.golfje i { width: 5px; height: 8px; border-radius: 3px; background: currentColor; opacity: 0.8; }
.toestand.praat .golfje i { animation: golfje 0.9s ease-in-out infinite; }
.toestand.luistert .golfje i { animation: golfje 1.6s ease-in-out infinite; }
.golfje i:nth-child(2) { animation-delay: 0.15s !important; }
.golfje i:nth-child(3) { animation-delay: 0.3s !important; }
.golfje i:nth-child(4) { animation-delay: 0.45s !important; }
@keyframes golfje { 0%, 100% { height: 6px; } 50% { height: 22px; } }
.anna-zegt { font-size: 1.75rem; line-height: 1.35; min-height: 4em; }
.jij-zegt { background: rgba(255, 255, 255, 0.08); border-radius: 18px; padding: 10px 16px; display: inline-block; min-width: 40%; font-size: 1.15rem; }
.jij-zegt:empty { display: none; }
.knop-rood { min-height: 76px; font-size: 1.6rem; box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.6); }
.knop-groen { min-height: 76px; font-size: 1.6rem; }
@media (max-width: 480px) { .avatar-doos { width: 180px; height: 180px; } .avatar-doos .avatar { width: 144px; height: 144px; } .anna-zegt { font-size: 1.5rem; } }
.duim-blok { margin-top: 18px; }
.duim-blok p { margin: 0 0 8px; }
.duim { font-size: 2.4rem; background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 50%; width: 76px; height: 76px; margin: 0 8px; cursor: pointer; }
.duim:disabled { opacity: 0.5; cursor: default; }
.terug-mijn { display: inline-block; }
