/* Le Fil, stijl C "Bulles": Rubik, lichtblauwe achtergrond, dikke zwarte randen,
   verschoven schaduwen, gele, lucht-, koraal- en mintkleurige panelen, blauwe knoppen
   en tekstballonnen. Gsm eerst; op een groot scherm gecentreerd, hoogstens 480 px. */

:root {
  --achtergrond: #EAF4FF;
  --inkt: #151515;
  --wit: #FFFFFF;
  --geel: #FFD84D;
  --lucht: #BFE0FF;
  --koraal: #FF9F87;
  --koraal-diep: #E8553E;
  --mint: #9FE2BF;
  --blauw: #2259F0;
  --link: #1B47C9;
  --link-hover: #123499;
  --gedempt: #3B3B3B;
  --grijs: #4A4A4A;
  --zacht: #2F2F2F;
  --wolk: #F4F9FF;
  --rand: 2.5px solid var(--inkt);
  --rand-dun: 2px solid var(--inkt);
  --schaduw: 4px 4px 0 var(--inkt);
  --schaduw-klein: 3px 3px 0 var(--inkt);
  --lettertype: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

/* scrollbar-gutter: de kolom springt niet opzij tussen lange en korte schermen. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--achtergrond);
  color: var(--inkt);
  font-family: var(--lettertype);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Kader ---------- */

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--achtergrond);
}

@media (min-width: 520px) {
  body { background: #DCEAF9; }
  #app { border-left: var(--rand); border-right: var(--rand); }
}

.scherm {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: calc(24px + env(safe-area-inset-top)) 18px 16px;
  min-width: 0;
}

.scherm.deel {
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
}

.vul { flex: 1; }
.stapel { display: flex; flex-direction: column; gap: 12px; }
.rij { display: flex; align-items: center; gap: 10px; }
.tussen { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Koppen ---------- */

.kop { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kop-tekst { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.titel { font-weight: 800; font-size: 36px; line-height: 1.05; }
.titel:focus { outline: none; }
.sub { font-size: 15px; color: var(--grijs); }
.kop-acties { display: flex; align-items: flex-start; gap: 10px; flex: none; }

.groet {
  position: relative;
  margin-top: 4px;
  flex: none;
  background: var(--wit);
  border: var(--rand);
  border-radius: 16px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 18px;
}
.groet::after {
  content: "";
  box-sizing: content-box;
  position: absolute;
  left: 16px;
  bottom: -9px;
  width: 14px;
  height: 14px;
  background: var(--wit);
  border-right: var(--rand);
  border-bottom: var(--rand);
  transform: rotate(45deg);
}

.terugkop { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.terugknop {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: var(--rand);
  background: var(--wit);
  color: var(--inkt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.kop-midden { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.kop-titel { font-weight: 800; font-size: 19px; line-height: 1.2; }
.kop-titel:focus { outline: none; }
.kop-sub { font-size: 13px; color: var(--grijs); }
.kop-rechts { min-width: 44px; display: flex; justify-content: flex-end; align-items: center; flex: none; }

.paginatitel { display: flex; flex-direction: column; gap: 2px; }
.paginatitel h1 { font-weight: 800; font-size: 27px; line-height: 1.1; }
.paginatitel h1:focus { outline: none; }
.paginatitel span { font-size: 14px; color: var(--grijs); }

/* ---------- Panelen ---------- */

.paneel {
  background: var(--wit);
  border: var(--rand);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.paneel.geel { background: var(--geel); }
.paneel.lucht { background: var(--lucht); }
.paneel.koraal { background: var(--koraal); }
.paneel.mint { background: var(--mint); }
.paneel.wit { background: var(--wit); }
.paneel.wolk { background: var(--wolk); }
.paneel.klein { border-radius: 12px; padding: 9px 12px; gap: 4px; }
.schaduw { box-shadow: var(--schaduw); }
.schaduw-klein { box-shadow: var(--schaduw-klein); }
.schaduw-blauw { box-shadow: 4px 4px 0 var(--blauw); }

.paneel h2, .sectiekop { font-weight: 800; font-size: 18px; }
.paneel-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.paneel-kop strong, .paneel-kop .naam { font-weight: 800; font-size: 15px; }
.paneel-kop span { font-size: 13px; color: var(--gedempt); }

.strook {
  background: var(--geel);
  border: var(--rand);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
}
.strook.groot { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; font-size: 16px; line-height: 1.35; font-weight: 400; box-shadow: var(--schaduw-klein); }
.strook .kleinkop { display: block; letter-spacing: .08em; font-size: 12px; font-weight: 800; }

.sticker {
  align-self: flex-start;
  border: var(--rand);
  border-radius: 12px;
  box-shadow: var(--schaduw-klein);
  padding: 8px 12px;
  transform: rotate(-0.8deg);
  font-size: 15px;
}
.sticker.rechts-gedraaid { transform: rotate(1deg); }
.sticker.geel { background: var(--geel); }
.sticker.mint { background: var(--mint); }
.sticker.lucht { background: var(--lucht); }
.sticker.koraal { background: var(--koraal); }
.sticker.wit { background: var(--wit); }

.kleinkop { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gedempt { color: var(--gedempt); }
.klein { font-size: 14px; }
.kleiner { font-size: 13px; }
.midden { text-align: center; }
.vet { font-weight: 700; }
.zwaar { font-weight: 800; }
.cijfers { font-variant-numeric: tabular-nums; }

.foutpaneel { gap: 10px; }
.foutpaneel .pilknop { align-self: flex-start; }

/* ---------- Labels ---------- */

.pil {
  background: var(--wit);
  border: var(--rand-dun);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pil.klein { padding: 2px 8px; font-size: 12px; }
.pil.mint { background: var(--mint); }
.pil.geel { background: var(--geel); }
.pil.lucht { background: var(--lucht); }
.pil.koraal { background: var(--koraal); }

.etiket {
  background: var(--geel);
  border: var(--rand);
  border-radius: 4px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.etiket.klein { border-width: 2px; padding: 2px 8px; font-size: 12px; letter-spacing: .05em; }

.nu-tag {
  align-self: flex-start;
  background: var(--inkt);
  color: var(--geel);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  border-radius: 6px;
  padding: 2px 8px;
}

/* ---------- Knoppen ---------- */

.knop {
  min-height: 56px;
  width: 100%;
  border-radius: 14px;
  border: var(--rand);
  background: var(--blauw);
  color: var(--wit);
  box-shadow: var(--schaduw);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
a.knop:hover { color: var(--wit); }
.knop:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--inkt); }
.knop:disabled, .knop[aria-disabled="true"] { opacity: .55; cursor: default; }
.knop.wit { background: var(--wit); color: var(--inkt); box-shadow: none; font-size: 16px; }
a.knop.wit:hover { color: var(--inkt); }
.knop.wit:active:not(:disabled) { transform: none; }
.knop.geel { background: var(--geel); color: var(--inkt); }
.knop.mint { background: var(--mint); color: var(--inkt); }
.knop.klein { min-height: 48px; font-size: 16px; width: auto; padding: 6px 16px; box-shadow: var(--schaduw-klein); }

.knoprij { display: flex; gap: 10px; }
.knoprij > .knop.wit { width: auto; flex: none; padding: 0 18px; }
.knoprij > .knop:not(.wit) { flex: 1; width: auto; }

.linkknop {
  align-self: center;
  background: none;
  border: 0;
  padding: 8px 6px;
  min-height: 44px;
  color: var(--link);
  font-weight: 700;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.linkknop:hover { color: var(--link-hover); }

.pilknop {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  border: var(--rand-dun);
  background: var(--wit);
  color: var(--inkt);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}
a.pilknop:hover { color: var(--inkt); }
.pilknop[aria-pressed="true"] { background: var(--geel); }
.scherm > .pilknop, .paneel > .pilknop { align-self: flex-start; }
.pilknop:disabled { opacity: .55; cursor: default; }
.pilknop.blauw { background: var(--blauw); color: var(--wit); }
.pilknop.geel { background: var(--geel); }

.rondknop {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: var(--rand-dun);
  background: var(--wit);
  color: var(--inkt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-decoration: none;
}
a.rondknop:hover { color: var(--inkt); }
.rondknop.blauw { background: var(--blauw); color: var(--wit); }
.rondknop.groot { width: 48px; height: 48px; border-width: 2.5px; }
.rondknop:disabled { opacity: .5; cursor: default; }
.rondknop.tandwiel { margin-top: 2px; }

.keuzerij { display: flex; flex-wrap: wrap; gap: 8px; }
.invoerrij { display: flex; gap: 10px; align-items: stretch; }
.invoerrij .invoer { flex: 1; min-width: 0; }

/* ---------- Invoer ---------- */

.veld { display: flex; flex-direction: column; gap: 6px; }
.veld > label, .veldlabel { font-weight: 700; font-size: 15px; }
.invoer {
  width: 100%;
  min-height: 52px;
  border: var(--rand);
  border-radius: 12px;
  background: var(--wit);
  padding: 12px 14px;
  font-size: 18px;
  color: var(--inkt);
  appearance: none;
  -webkit-appearance: none;
}
.invoer::placeholder { color: #6B6B6B; }
.invoer.smal { max-width: 140px; }
textarea.invoer { min-height: 104px; resize: vertical; line-height: 1.4; }
select.invoer {
  font-size: 16px;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--inkt) 50%), linear-gradient(135deg, var(--inkt) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.invoer:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.hulptekst { font-size: 14px; color: var(--gedempt); }

/* ---------- Onderbalk ---------- */

.onderbalk {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border-top: var(--rand);
  background: var(--wit);
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
}
.balkknop {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--inkt);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}
.balkknop:hover { color: var(--inkt); background: var(--wolk); }
.balkknop[aria-current="page"] { background: var(--geel); border-color: var(--inkt); font-weight: 700; }

/* ---------- Vandaag ---------- */

.draad { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.draad-teller { display: flex; flex-direction: column; }
.draad-getal { font-weight: 800; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.draad-label { font-weight: 700; font-size: 15px; }
.draad-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.draad-knopen { font-size: 14px; font-weight: 500; }

.week { display: flex; gap: 5px; }
.dagvak { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dagnaam { font-size: 11px; font-weight: 700; }
.dag {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: var(--rand);
  background: var(--wit);
}
.dag.gedaan { background: var(--inkt); }
.dag.hersteld { background: var(--blauw); }
.dag.minimum { background: linear-gradient(90deg, var(--inkt) 50%, var(--wit) 50%); }
.dag.knoop { border-radius: 0; transform: rotate(45deg) scale(.8); }
.dag.pauze { background: var(--wit) linear-gradient(var(--inkt), var(--inkt)) center / 10px 3px no-repeat; }
.dag.gemist { border-color: rgba(21, 21, 21, .3); background: transparent; }
.dag.open { background: var(--wit); }
.dag.toekomst { border-color: rgba(21, 21, 21, .45); }

.nu-kaart {
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  color: var(--inkt);
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.nu-kaart:hover { color: var(--inkt); }
.nu-kaart:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--inkt); }
.nu-tekst { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nu-boven { font-weight: 500; font-size: 14px; margin-top: 4px; }
.nu-titel { font-weight: 800; font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.nu-onder { font-size: 14px; color: var(--zacht); }
.tekening { flex: none; }

.instap-paneel { flex-direction: row; align-items: center; gap: 10px; padding: 14px; }
.instap-tekst { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.instap-tekst h2 { font-size: 23px; line-height: 1.1; }
.instap-tekst p { font-size: 15px; }

.klaar-kaart { flex-direction: row; align-items: center; gap: 12px; color: var(--inkt); text-decoration: none; }
.klaar-kaart:hover { color: var(--inkt); }
.klaar-tekst { display: flex; flex-direction: column; font-size: 15px; }
.klaar-tekst strong { font-size: 17px; font-weight: 800; }
.rond-vink {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--rand);
  background: var(--wit);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rond-vink.klein { width: 26px; height: 26px; border-width: 2px; }

.sessie-kop { display: flex; justify-content: space-between; align-items: baseline; }
.sessie-kop h2 { font-weight: 800; font-size: 19px; }
.sessie-kop span { font-size: 14px; color: var(--grijs); }

.tegels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: -4px; }
.tegel {
  min-height: 44px;
  background: var(--wit);
  border: var(--rand);
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--inkt);
  text-decoration: none;
}
.tegel:hover { color: var(--inkt); }
.tegel.breed { grid-column: 1 / -1; }
.tegel-naam { font-weight: 700; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.tegel-min { font-size: 14px; color: var(--grijs); white-space: nowrap; }
.tegel-vink { display: flex; }
.tegel.klaar { background: var(--mint); }
.tegel.nu { background: var(--blauw); color: var(--wit); box-shadow: var(--schaduw-klein); }
.tegel.nu:hover { color: var(--wit); }
.tegel.nu .tegel-min { color: var(--wit); font-weight: 500; }

.onderweg { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.onderweg-paneel { align-self: stretch; }
.onderweg-paneel p { font-size: 15px; }

/* ---------- Ballonnen ---------- */

.gesprek { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.4; }
.regel { display: flex; gap: 8px; align-items: flex-end; }
.regel.rechts { justify-content: flex-end; }
.avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: var(--rand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  background: var(--koraal);
  color: var(--inkt);
}
.avatar.groot { width: 44px; height: 44px; font-size: 18px; }
.avatar.spreekt { box-shadow: 0 0 0 3px var(--blauw); }
.ballon {
  position: relative;
  max-width: 80%;
  background: var(--wit);
  border: var(--rand);
  border-radius: 18px 18px 18px 4px;
  padding: 9px 13px;
  overflow-wrap: anywhere;
}
.regel.rechts .ballon { background: var(--lucht); border-radius: 18px 18px 4px 18px; }
.ballon.actief { box-shadow: 4px 4px 0 var(--blauw); font-weight: 500; }
.ballon.later { background: var(--wolk); border-style: dashed; color: var(--grijs); }
.regel.rechts .ballon.later { background: var(--wolk); }
.ballon.jij { background: var(--blauw); color: var(--wit); }
.regel.rechts .ballon.jij { background: var(--blauw); }
.ballon.spreekt { background: var(--wit); border: 2.5px dashed var(--link); color: var(--link); font-weight: 700; }
.regel.rechts .ballon.spreekt { background: var(--wit); }
.ballon.verborgen .woorden { filter: blur(0); }
mark.vorm { background: var(--geel); color: inherit; border-radius: 4px; padding: 0 3px; }
mark.gloss { background: var(--mint); color: inherit; border-radius: 4px; padding: 0 3px; font-weight: 700; }
mark.fout { background: var(--koraal); color: inherit; border-radius: 4px; padding: 0 3px; }
mark.goed { background: var(--mint); color: inherit; border-radius: 4px; padding: 0 3px; }
mark.bijna { background: var(--lucht); color: inherit; border-radius: 4px; padding: 0 3px; }
.ballon.jij mark { color: var(--inkt); }

button.woord {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
  text-align: inherit;
  border-radius: 4px;
  cursor: pointer;
}
button.woord:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
button.woord.gekozen { background: var(--koraal); padding: 0 3px; font-weight: 700; }
.woord.weg { color: transparent; background: rgba(21, 21, 21, .12); border-radius: 4px; }
.ballon.later .woord.weg { background: rgba(21, 21, 21, .08); }

.uitlegkaart {
  margin-left: 38px;
  align-self: flex-start;
  max-width: calc(100% - 38px);
  background: var(--koraal);
  border: var(--rand);
  border-radius: 12px;
  box-shadow: var(--schaduw-klein);
  padding: 6px 6px 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: rotate(-1deg);
}
.regel.rechts + .uitlegkaart, .uitlegkaart.rechts { margin-left: 0; margin-right: 38px; align-self: flex-end; }
.uitlegkaart .uitleg-tekst { font-size: 15px; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.uitlegkaart .uitleg-extra { font-size: 14px; }
.uitlegkaart .knop-bewaar { flex: none; min-height: 44px; padding: 0 12px; border-radius: 10px; border: var(--rand-dun); background: var(--wit); font-weight: 700; font-size: 14px; }
.uitlegkaart .knop-bewaar:disabled { opacity: .7; }

.legende { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--zacht); }
.legende-blok { width: 22px; height: 14px; border-radius: 4px; background: var(--geel); border: 2px solid var(--inkt); flex: none; }

.glossticker {
  margin-left: 38px;
  align-self: flex-start;
  background: var(--mint);
  border: var(--rand);
  border-radius: 10px;
  box-shadow: var(--schaduw-klein);
  padding: 5px 10px;
  font-size: 14px;
  transform: rotate(1deg);
}
.glossticker.lucht { background: var(--lucht); transform: rotate(-0.6deg); }

/* ---------- Speler ---------- */

.speler {
  background: var(--wit);
  border: var(--rand);
  border-radius: 16px;
  box-shadow: var(--schaduw);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.voortgangbalk { display: flex; flex-direction: column; gap: 4px; }
.balk {
  position: relative;
  height: 12px;
  border: 2px solid var(--inkt);
  border-radius: 6px;
  background: var(--achtergrond);
  overflow: hidden;
}
.balk > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blauw); }
.balk.wit { background: var(--wit); height: 14px; border-radius: 7px; }
.balk.mint > span { background: var(--mint); border-right: 2px solid var(--inkt); }
.tikbalk { padding: 8px 0; margin: -8px 0; cursor: pointer; touch-action: none; }
.tijden { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bediening { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bediening-midden { display: flex; align-items: center; gap: 12px; }
.tempoknop, .tekstknop {
  min-width: 58px;
  height: 44px;
  border-radius: 12px;
  border: var(--rand-dun);
  background: var(--geel);
  color: var(--inkt);
  font-weight: 800;
  font-size: 15px;
  padding: 0 8px;
}
.tekstknop { background: var(--wit); }
.tekstknop[data-modus="geen"] { background: var(--inkt); color: var(--wit); }
.tekstknop[data-modus="kern"] { background: var(--lucht); }
.sprongknop {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: var(--rand-dun);
  background: var(--wit);
  color: var(--inkt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.speelknop {
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: var(--rand);
  background: var(--blauw);
  color: var(--wit);
  box-shadow: var(--schaduw-klein);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.speelknop.groot { width: 64px; height: 64px; }
.speelknop:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--inkt); }
.speelknop:disabled { opacity: .55; }

.onderkant {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0 calc(4px + env(safe-area-inset-bottom));
  margin-bottom: calc(-20px - env(safe-area-inset-bottom));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(234, 244, 255, 0), var(--achtergrond) 14px);
}

/* Personages tijdens luisteren zonder tekst */
.luisterbeeld { flex-direction: row; align-items: center; justify-content: center; gap: 18px; padding: 18px 14px; flex-wrap: wrap; }
.spreker { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; transition: transform .15s ease; }
.spreker .avatar { width: 56px; height: 56px; font-size: 22px; }
.spreker.aan { transform: translateY(-4px); }
.spreker.aan .avatar { box-shadow: 0 0 0 4px var(--blauw); }

/* Tijdlijn: waar verloor je de draad */
.tijdlijn { display: flex; gap: 3px; align-items: stretch; }
.tijdlijn button {
  flex: 1 1 0;
  min-width: 12px;
  height: 48px;
  border: var(--rand-dun);
  border-radius: 6px;
  background: var(--wit);
  padding: 0;
  position: relative;
}
.tijdlijn button::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--strip, transparent); border-radius: 3px 3px 0 0; }
.tijdlijn button[aria-pressed="true"], .tijdlijn button.aangeduid { background-color: var(--koraal); }
.tijdlijn button.nu { box-shadow: inset 0 -6px 0 var(--blauw); }
.tijdlijn button.gehoord { background-image: linear-gradient(rgba(34, 89, 240, .14), rgba(34, 89, 240, .14)); }
.tijdlijn button[aria-pressed="true"].gehoord { background-color: var(--koraal); }
.tijdlijn-tijden { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--gedempt); font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--wit);
  border: var(--rand-dun);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 15px;
  font-weight: 500;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button.chip { min-height: 44px; padding: 0 12px; }
button.chip[aria-pressed="true"] { background: var(--mint); font-weight: 700; }
button.chip.wegchip { gap: 8px; padding: 0 10px 0 14px; color: var(--inkt); }
button.chip.wegchip:hover { background: var(--wolk); }

.lijst { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.lijst li { padding-left: 2px; }

.keuzekaart {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--wit);
  border: var(--rand);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 52px;
  text-align: left;
  color: var(--inkt);
  font-size: 16px;
  width: 100%;
}
label.keuzekaart { cursor: pointer; }
.keuzekaart[aria-pressed="true"], .keuzekaart[aria-checked="true"], .keuzekaart:has(input:checked) { background: var(--mint); box-shadow: var(--schaduw-klein); }
.keuzekaart .bolletje { flex: none; width: 22px; height: 22px; border-radius: 50%; border: var(--rand); background: var(--wit); }
.keuzekaart[aria-pressed="true"] .bolletje, .keuzekaart[aria-checked="true"] .bolletje, .keuzekaart:has(input:checked) .bolletje { background: var(--inkt); box-shadow: inset 0 0 0 3px var(--wit); }
.keuzekaart:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 3px; }
fieldset.keuzes { border: 0; margin: 0; padding: 0; min-width: 0; }

.vraagkaart { gap: 6px; }
.vraagkaart .antwoord-tekst { font-size: 15px; background: var(--mint); border: var(--rand-dun); border-radius: 10px; padding: 6px 10px; }

/* ---------- Oortraining ---------- */

.zinpaneel { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.zinpaneel-links { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wie { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.resultaat-zin { font-size: 18px; line-height: 1.5; }
.resultaat-zin.vet { font-weight: 700; }
.resultaat-zin.zacht { font-size: 16px; color: var(--gedempt); }
.vormkaart { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 12px; }
.vormkaart:nth-child(even) { transform: rotate(-0.6deg); }
.vormkaart .vorm-tekst { display: flex; flex-direction: column; gap: 2px; }
.vormkaart .vorm-naam { font-weight: 800; font-size: 16px; }
.vormkaart .vorm-uitleg { font-size: 14px; }
.woord-gemist { text-decoration: line-through; }
.weggelaten { display: inline-block; min-width: 1.4em; text-align: center; }

.klankopties { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.klankoptie {
  min-height: 72px;
  border-radius: 14px;
  border: var(--rand);
  background: var(--wit);
  box-shadow: var(--schaduw-klein);
  font-weight: 800;
  font-size: 22px;
  color: var(--inkt);
}
.klankoptie.juist { background: var(--mint); }
.klankoptie.fout { background: var(--koraal); }
.klankoptie:disabled { cursor: default; }

/* ---------- Herhalen ---------- */

.kaart {
  background: var(--wit);
  border: var(--rand);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--inkt);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kaart-vraag { font-weight: 800; font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }
.kaart-scheiding { border-top: 2.5px dashed var(--inkt); }
.kaart-antwoord { font-weight: 800; font-size: 27px; line-height: 1.15; overflow-wrap: anywhere; }
.kaart-extra { font-size: 16px; color: var(--gedempt); }
.zei { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.zei:empty { display: none; }
.beoordeling { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: -4px; }
.beoordeling button {
  min-height: 64px;
  border-radius: 12px;
  border: var(--rand);
  box-shadow: var(--schaduw-klein);
  color: var(--inkt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
}
.beoordeling button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--inkt); }
.beoordeling .b-naam { font-weight: 800; font-size: 14px; }
.beoordeling .b-na { font-size: 12px; }
.beoordeling .b1 { background: var(--koraal); }
.beoordeling .b2 { background: var(--geel); }
.beoordeling .b3 { background: var(--mint); }
.beoordeling .b4 { background: var(--lucht); }

/* ---------- Praten en opnemen ---------- */

.chatlog { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; font-size: 16px; line-height: 1.4; }
.chatlog .ballon { max-width: 76%; }
.spreekt-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--link); }
.golfjes rect { fill: currentColor; }
.hulprij { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.hulprij .pilknop { padding: 0 10px; }
.micblok { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.micwrap { position: relative; width: 160px; height: 104px; display: flex; align-items: center; justify-content: center; }
.micwrap .stralen { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .15s ease; }
.micwrap.actief .stralen { opacity: 1; }
.micknop {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: var(--rand);
  background: var(--blauw);
  color: var(--wit);
  box-shadow: var(--schaduw);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.micknop.klein { width: 44px; height: 44px; box-shadow: none; border-width: 2px; }
.micwrap.actief .micknop { transform: translate(2px, 2px) scale(1.04); box-shadow: 2px 2px 0 var(--inkt); }
.micknop:disabled, .micknop[aria-disabled="true"] { opacity: .55; cursor: default; }
.mic-label { font-size: 15px; font-weight: 800; text-align: center; }
.mic-sub { font-size: 14px; color: var(--grijs); text-align: center; }
.niveaumeter { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.niveaumeter span { width: 4px; background: var(--link); border-radius: 2px; height: 20%; transition: height .08s linear; }
.typblok { display: flex; flex-direction: column; gap: 8px; }
.wisselknop { align-self: center; }

.opdracht-gehaald { flex-direction: row; align-items: center; gap: 10px; }

/* ---------- Na het gesprek ---------- */

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--wit); border: var(--rand); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; }
.stat .s-label { font-size: 13px; color: var(--gedempt); }
.stat .s-waarde { font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat.lucht { background: var(--lucht); }
.stat.mint { background: var(--mint); }
.stat.lucht .s-label, .stat.mint .s-label { color: var(--inkt); font-weight: 700; }
.verbetering { background: var(--wit); border: var(--rand); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.verbetering p { font-size: 15px; }
.verbetering .uitlegrij { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.verbetering .uitlegrij > span { font-size: 14px; color: var(--gedempt); }
.verbetering .knoppen { display: flex; gap: 8px; flex: none; }

/* ---------- Vlotheid ---------- */

.rondes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ronde { background: var(--wit); border: var(--rand); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.ronde .r-naam { font-weight: 800; font-size: 14px; }
.ronde .r-tijd { font-size: 13px; }
.ronde.klaar { background: var(--mint); }
.ronde.nu { background: var(--blauw); color: var(--wit); box-shadow: var(--schaduw-klein); }
.klok { position: relative; align-self: center; width: 184px; height: 184px; margin: 0 auto; }
.klok svg { position: absolute; left: 0; top: 0; }
.klok-tekst { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.klok-tekst .k-tijd { font-weight: 800; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.klok-tekst .k-sub { font-size: 14px; color: var(--gedempt); }
.uitslag { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.uitslag th, .uitslag td { text-align: left; padding: 6px 4px; border-bottom: 2px solid rgba(21, 21, 21, .12); }
.uitslag th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.uitslag td { font-variant-numeric: tabular-nums; }

/* ---------- Traject ---------- */

.lijnen { position: relative; display: flex; flex-direction: column; gap: 12px; padding-left: 30px; }
.lijnen::before { content: ""; position: absolute; left: 9px; top: 18px; bottom: 30px; width: 5px; background: var(--inkt); border-radius: 3px; }
.lijn { position: relative; }
.lijn-stip {
  position: absolute;
  left: -30px;
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--inkt);
  background: var(--wit);
}
.lijn-stip.klaar { background: var(--inkt); }
.lijn-kaart { padding: 10px 14px; gap: 4px; }
.lijn-kaart.nu { padding: 12px 14px; gap: 8px; box-shadow: var(--schaduw); }
.lijn-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lijn-naam { font-weight: 800; font-size: 17px; }
.lijn-kaart.nu .lijn-naam { font-size: 18px; }
.lijn-maanden { font-size: 13px; font-weight: 500; white-space: nowrap; }
.lijn-doel { font-size: 14px; }
.hier { align-self: flex-start; background: var(--blauw); color: var(--wit); border: var(--rand-dun); border-radius: 8px; padding: 2px 8px; font-weight: 800; font-size: 13px; transform: rotate(-2deg); }
.stations { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.stations li { display: flex; align-items: center; gap: 8px; }
.stations li.nu { font-weight: 700; }
.station-stip { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--inkt); background: var(--wit); }
.stations li.klaar .station-stip { background: var(--inkt); }
.stations li.later .station-stip { border-style: dashed; }
.lijn-meer { align-self: flex-start; margin-top: 2px; min-height: 44px; font-size: 13px; padding: 0 12px; }
.lijn-meer::after { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid var(--inkt); border-bottom: 2px solid var(--inkt); transform: rotate(45deg) translate(-2px, -2px); margin-left: 4px; }
.lijn-meer[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }

/* ---------- Voortgang ---------- */

.snelheid { font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.snelheid small { font-weight: 500; font-size: 15px; }
.schaal { position: relative; height: 16px; border: var(--rand-dun); border-radius: 8px; background: var(--wit); margin-top: 4px; }
.schaal-vul { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blauw); border-radius: 6px 0 0 6px; }
.schaal-doel { position: absolute; top: -6px; width: 3px; height: 24px; background: var(--inkt); }
.schaal-labels { position: relative; height: 18px; font-size: 12px; font-weight: 500; }
.schaal-labels span { position: absolute; white-space: nowrap; }

.raster { display: grid; grid-template-columns: 82px repeat(6, minmax(0, 1fr)); gap: 4px; align-items: center; font-size: 12px; font-weight: 700; text-align: center; }
.raster .r-naam { text-align: left; font-size: 14px; font-weight: 500; }
.raster .vakje { height: 18px; border: 2px solid var(--inkt); border-radius: 4px; background: var(--wit); }
.raster .vakje.aan { background: var(--blauw); }
.raster .r-leeg { grid-column: span 6; text-align: left; font-size: 13px; font-weight: 500; color: var(--gedempt); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.duo .paneel { padding: 8px 12px; gap: 0; border-radius: 12px; }
.duo .d-label { font-size: 13px; font-weight: 700; }
.duo .d-waarde { font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.duo .d-sub { font-size: 12px; }

/* ---------- Woorden ---------- */

.zoekvak { position: relative; }
.zoekvak svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.zoekvak .invoer { padding-left: 44px; }
.woordrij { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; }
.woordrij-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.woordrij-fr { font-weight: 800; font-size: 17px; overflow-wrap: anywhere; }
.woordrij-nl { font-size: 14px; color: var(--gedempt); overflow-wrap: anywhere; }
.woordrij-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.woordrij-meta .kleiner { color: var(--gedempt); }
.woordrij-acties { display: flex; align-items: center; gap: 8px; flex: none; }
.bevestig { flex-direction: column; gap: 8px; background: var(--geel); }

/* ---------- Instellingen ---------- */

.segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.segment button { min-height: 48px; border-radius: 12px; border: var(--rand); background: var(--wit); font-weight: 800; font-size: 16px; color: var(--inkt); }
.segment button[aria-pressed="true"] { background: var(--geel); box-shadow: var(--schaduw-klein); }
.stapper { display: flex; align-items: center; gap: 12px; }
.stapper output { min-width: 3ch; text-align: center; font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.statuslijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.statuslijst li { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pauzelijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pauzelijst li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.datumrij { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.datumrij .invoer { font-size: 16px; }

/* ---------- Instaptest ---------- */

.delen { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.deelrij { background: var(--wit); border: var(--rand); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; }
.deel-nr { flex: none; width: 34px; height: 34px; border-radius: 50%; border: var(--rand); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.deel-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.deel-titel { font-weight: 700; font-size: 16px; }
.deel-uitleg { font-size: 14px; color: var(--gedempt); }
.deel-min { flex: none; font-size: 14px; font-weight: 700; }
.deelrij.klaar { background: var(--mint); }
.deelrij.nu { box-shadow: var(--schaduw-klein); }
.testwoord { font-weight: 800; font-size: 40px; line-height: 1.1; text-align: center; padding: 26px 10px; overflow-wrap: anywhere; }
.ctekst { font-size: 18px; line-height: 2.6; }
.gat { display: inline-flex; align-items: baseline; white-space: nowrap; }
.gat input {
  width: calc(var(--lengte, 4) * 0.72em + 18px);
  min-width: 2.6em;
  max-width: 9em;
  height: 42px;
  border: var(--rand-dun);
  border-radius: 8px;
  background: var(--wit);
  padding: 0 6px;
  font-size: 18px;
  margin-left: 1px;
}
.gat input:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.voortgangtekst { font-size: 14px; font-weight: 700; }

/* ---------- Laden, meldingen ---------- */

.laden { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--gedempt); min-height: 40vh; text-align: center; }
.puntjes { display: flex; gap: 6px; }
.puntjes span { width: 12px; height: 12px; border-radius: 50%; border: var(--rand-dun); background: var(--geel); animation: hup 1s infinite ease-in-out; }
.puntjes span:nth-child(2) { background: var(--lucht); animation-delay: .15s; }
.puntjes span:nth-child(3) { background: var(--koraal); animation-delay: .3s; }
@keyframes hup { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } }

.toast {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top));
  transform: translate(-50%, -16px);
  max-width: min(440px, calc(100vw - 32px));
  background: var(--inkt);
  color: var(--wit);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.toast.zichtbaar { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Aanmelden ---------- */

.aanmelden { justify-content: center; gap: 18px; max-width: 420px; width: 100%; margin: 0 auto; }
.aanmeld-kop { display: flex; align-items: flex-start; gap: 14px; }
.aanmeld-logo { border: var(--rand); border-radius: 20px; box-shadow: var(--schaduw); }

/* ---------- Minder beweging ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .spreker.aan { transform: none; }
}
