/* Happy Bits: design "Affiche"
   Lichte achtergronden per scherm, tomaatrode koppen in Lilita One (hoofdletters),
   kobalt als detail en schuine accenten in Instrument Serif. */

:root {
  --lila: #e4d5f8;
  --roze: #f9dcd8;
  --creme: #fff4e6;
  --boter: #fbecc8;
  --tomaat: #e8452c;
  --kobalt: #2337d6;
  --inkt: #2b1d3d;
  --inkt-zacht: rgba(43, 29, 61, 0.62);
  --lijn: rgba(43, 29, 61, 0.16);

  --kopletter: "Lilita One", "Arial Rounded MT Bold", sans-serif;
  --tekstletter: "Manrope", system-ui, sans-serif;
  --schuin: "Instrument Serif", Georgia, serif;

  --achtergrond: var(--lila);
}

/* Elk scherm zijn eigen achtergrondkleur */
body[data-scherm="scherm-vandaag"],
body[data-scherm="scherm-inloggen"] { --achtergrond: var(--lila); }
body[data-scherm="scherm-dag"] { --achtergrond: var(--creme); }
body[data-scherm="scherm-cyclus"] { --achtergrond: var(--roze); }
body[data-scherm="scherm-museum"] { --achtergrond: var(--boter); }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--achtergrond);
  color: var(--inkt);
  font-family: var(--tekstletter);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
  transition: background-color 0.35s;
}

/* Papierkorrel over alles heen */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23k)'/%3E%3C/svg%3E");
  opacity: 0.14;
  mix-blend-mode: multiply;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- Letters ---------- */

.kop {
  font-family: var(--kopletter);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--tomaat);
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0;
}
.kop.reus {
  font-size: clamp(2.8rem, 13vw, 3.6rem);
  margin: 10px 0 14px;
}
.serif {
  font-family: var(--schuin);
  font-style: italic;
  font-weight: 400;
}
.label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--inkt-zacht);
  margin: 22px 0 8px;
}
.label-extra {
  font-family: var(--schuin);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--kobalt);
}
.ster { color: #9fb0ff; font-weight: 800; }
.verborgen {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.hint { color: var(--inkt-zacht); font-size: 1rem; margin: 8px 0; }
.midden { text-align: center; }

/* ---------- Bovenbalk ---------- */

.bovenbalk {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.bovenbalk-datum {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.merk {
  font-family: var(--schuin);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--kobalt);
}

/* ---------- Schermen ---------- */

.scherm { display: none; }
.scherm.actief { display: block; }

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

textarea,
input[type="email"],
input[type="password"] {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  color: var(--inkt);
  background: var(--creme);
  resize: vertical;
}
body[data-scherm="scherm-dag"] textarea { background: var(--roze); }
textarea::placeholder, input::placeholder { color: var(--inkt-zacht); }
textarea:focus, input:focus {
  outline: 2px solid var(--kobalt);
  outline-offset: 1px;
}
input[type="date"] {
  font: inherit;
  color: var(--inkt);
  background: var(--creme);
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
}
.formulier .label:first-child { margin-top: 4px; }

.foto-rij {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
}
.voorbeeld {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}
.datum-rij {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
  font-size: 0.9rem;
}

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

.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
}
.knop:disabled { opacity: 0.5; }
.knop.hoofd {
  background: var(--inkt);
  color: var(--creme);
}
.formulier > .knop.hoofd,
.cyclus-knoppen .knop,
.instellingen .knop.hoofd { width: 100%; padding: 15px; }
.knop.rand,
.knop.zacht {
  background: transparent;
  color: var(--kobalt);
  box-shadow: inset 0 0 0 2px var(--kobalt);
}
.link {
  background: none;
  border: none;
  padding: 0;
  color: var(--inkt-zacht);
  text-decoration: underline;
  text-underline-offset: 3px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.link.klein { font-size: 0.8rem; }
.iets-moois { display: flex; margin: 22px 0 0; }

.melding {
  color: var(--kobalt);
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 0.9rem;
}

/* ---------- Momenten ---------- */

.teller {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}
.teller-getal {
  font-size: 3.4rem;
  line-height: 1;
  color: var(--kobalt);
  white-space: nowrap;
}
.teller-tekst { font-size: 0.85rem; line-height: 1.3; max-width: 190px; }

.tussenkop { margin-top: 30px; }
.lijst { display: grid; gap: 10px; }
.moment {
  background: var(--creme);
  border-radius: 8px;
  overflow: hidden;
}
.moment img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  cursor: zoom-in;
}
.moment .inhoud { padding: 12px 14px; }
.moment p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.moment .onder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.75rem;
}
.moment .onder > span:first-child { font-weight: 800; color: var(--kobalt); letter-spacing: 0.04em; }
.moment .acties { display: flex; gap: 14px; }
.moment .acties .link { font-size: 0.75rem; }

.leeg {
  font-family: var(--schuin);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--inkt-zacht);
  padding: 10px 0;
  margin: 0;
}
.rode-draad {
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--kobalt);
  margin: 40px 0 10px;
}

/* ---------- Mijn dag ---------- */

.dag-wissel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 0;
}
.dag-titel {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.rond {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  box-shadow: inset 0 0 0 2px var(--kobalt);
  background: transparent;
  color: var(--kobalt);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.rond:disabled { opacity: 0.25; cursor: default; }

.cyclus-info {
  background: var(--lila);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 4px;
}
.cyclus-kop {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cyclus-tekst { margin: 2px 0 0; color: var(--kobalt); font-size: 1.05rem; }

.sterren { display: flex; gap: 4px; margin-top: 4px; }
.ster-knop {
  border: none;
  background: none;
  padding: 2px;
  font-size: 2.3rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.6px var(--tomaat);
  cursor: pointer;
  transition: color 0.25s, transform 0.25s;
}
.ster-knop.vol { color: var(--tomaat); }
.ster-knop:active { transform: scale(1.15); }
.zacht-tekst { margin: 2px 0 0; font-size: 1.2rem; color: var(--kobalt); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: none;
  box-shadow: inset 0 0 0 1.5px var(--lijn);
  background: transparent;
  color: var(--inkt);
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.chip.actief {
  background: var(--lila);
  box-shadow: none;
  font-weight: 600;
}
.chip.anders {
  box-shadow: none;
  border: 1.5px dashed var(--kobalt);
  padding: 5.5px 11.5px;
  color: var(--kobalt);
  font-weight: 600;
}
.chip.anders-invoer {
  width: 10em;
  cursor: text;
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--kobalt);
  font-size: 16px; /* kleiner laat de iPhone inzoomen */
  padding: 5px 13px;
}
.mens-vraag .knop { margin-top: 4px; }
.mens-keuze { display: flex; flex-wrap: wrap; gap: 10px; }
.mens-keuze .knop { flex: 1 1 140px; }
#mens-nee { display: block; margin-top: 10px; }
#dag-status { min-height: 1.4em; }
.laden .dag-kaart { opacity: 0.5; pointer-events: none; }

/* ---------- Cyclus ---------- */

.cyclus-status { margin: 4px 0 18px; }
.dagnr { display: flex; align-items: flex-end; gap: 12px; }
.dagnr-getal { font-size: 7.4rem; line-height: 0.82; }
.dagnr .label { margin: 0 0 8px; }
.status-fase { margin: 10px 0 0; font-size: 2.3rem; line-height: 1; color: var(--kobalt); }
.status-tekst { margin: 6px 0 0; font-size: 0.95rem; }
.status-voorspelling {
  margin: 12px 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cyclus-knoppen { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cyclus-knoppen:empty { display: none; }

.blok {
  background: var(--creme);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.kalender { padding: 14px 10px; }
.kalender .dag-wissel { margin: 0 0 10px; }
.kal-raster {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.kal-weekdag {
  font-size: 0.66rem;
  color: var(--inkt-zacht);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 4px;
}
.kal-dag {
  aspect-ratio: 1;
  max-width: 44px;
  width: 100%;
  margin: 0 auto;
  border: none;
  border-radius: 50%;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--inkt);
  cursor: pointer;
  padding: 0;
}
.kal-dag.vruchtbaar { background: var(--lila); }
.kal-dag.eisprong { background: var(--kobalt); color: var(--creme); }
.kal-dag.mens-echt { background: var(--tomaat); color: var(--creme); }
.kal-dag.mens-verwacht { box-shadow: inset 0 0 0 2px var(--tomaat); color: var(--tomaat); }
.kal-dag.vandaag { outline: 2px solid var(--inkt); outline-offset: 2px; }

.legenda {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--inkt-zacht);
}
.legenda span { display: inline-flex; align-items: center; gap: 5px; }
.stip { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.stip.mens-echt { background: var(--tomaat); }
.stip.mens-verwacht { box-shadow: inset 0 0 0 1.5px var(--tomaat); }
.stip.vruchtbaar { background: var(--lila); }
.stip.eisprong { background: var(--kobalt); }

.instelling {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 12px 0;
  font-size: 0.95rem;
}
.blok .instelling input[type="date"] { background: var(--roze); }
.stapper { display: flex; align-items: center; gap: 10px; }
.stapper output { min-width: 74px; text-align: center; font-weight: 700; }
.instellingen summary {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kobalt);
}

/* ---------- Museum ---------- */

.museum-inhoud { min-width: 0; }
.intro { font-size: 1.3rem; line-height: 1.15; color: var(--kobalt); margin: 10px 0 0; }

.seizoenen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 22px 0 4px;
}
.seizoenen .chip {
  box-shadow: none;
  border-radius: 0;
  padding: 2px 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--inkt-zacht);
}
.seizoenen .chip.actief {
  background: none;
  color: var(--kobalt);
  box-shadow: inset 0 -2px 0 var(--kobalt);
}

.maand-kop {
  font-family: var(--kopletter);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--tomaat);
  font-size: 1.8rem;
  line-height: 1;
  margin: 26px 0 0;
}
.dag-kop {
  margin: 12px 0 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fase-label {
  font-family: var(--schuin);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  color: var(--kobalt);
}


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

.onderbalk {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr; /* ook goed als het tabje Cyclus uit staat */
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--creme);
  box-shadow: 0 -1.5px 0 var(--lijn);
}
.tab {
  border: none;
  background: none;
  padding: 10px 2px 6px;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--inkt-zacht);
  cursor: pointer;
}
.tab::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 5px auto 0;
  background: transparent;
}
.tab.actief { color: var(--kobalt); }
.tab.actief::after { background: var(--kobalt); }

/* ---------- Vensters ---------- */

.groot {
  border: none;
  border-radius: 14px;
  padding: 20px 18px 18px;
  width: min(90vw, 520px);
  background: var(--creme);
  color: var(--inkt);
}
.groot::backdrop { background: rgba(43, 29, 61, 0.55); }
.groot img {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
}
.groot-kop { font-size: 2rem; margin-bottom: 12px; }
.groot-tekst { white-space: pre-wrap; margin: 0; font-size: 1.05rem; }
.groot-datum { color: var(--kobalt); font-size: 1.05rem; margin: 6px 0 0; }
.dialoogkop { font-size: 1.7rem; margin-bottom: 12px; }
.kal-dag-fase { font-size: 1.2rem; color: var(--kobalt); margin: 0; }
.knoppen {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
}
.groot textarea,
.groot input[type="date"] { background: #fff; }

/* ---------- Museum: momenten of terugblik ---------- */

.weergave {
  display: flex;
  gap: 18px;
  margin: 12px 0 4px;
}
.weergave-knop {
  border: none;
  background: none;
  padding: 2px 0;
  font-family: var(--kopletter);
  font-size: 1.35rem;
  text-transform: uppercase;
  color: var(--inkt-zacht);
  opacity: 0.55;
  cursor: pointer;
}
.weergave-knop.actief {
  color: var(--kobalt);
  opacity: 1;
  box-shadow: inset 0 -3px 0 var(--kobalt);
}

.periode-keuze { display: flex; gap: 7px; margin: 16px 0 12px; }
.tb-titel { font-size: clamp(2.2rem, 10vw, 3rem); margin: 18px 0 4px; }

.tb-blok { margin-top: 22px; }
.tb-blok > .label { margin-top: 0; }
.tb-subkop { margin: 12px 0 6px; font-size: 0.85rem; font-weight: 600; }
.tb-zin { font-size: 1.15rem; line-height: 1.2; color: var(--kobalt); margin: 10px 0 0; }

/* Kijk hoeveel moois */
.tb-getallen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tb-getal {
  background: var(--creme);
  border-radius: 8px;
  padding: 10px 10px 12px;
}
.tb-getal .serif { display: block; font-size: 2.8rem; line-height: 1; color: var(--kobalt); }
.tb-getal small { font-size: 0.72rem; line-height: 1.2; display: block; }

/* Hoe je je voelde */
.tb-grafiek {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 120px;
  background: var(--creme);
  border-radius: 8px;
  padding: 12px 10px 8px;
}
.tb-grafiek.tb-week { height: 140px; gap: 10px; }
.tb-grafiek.tb-seizoen { gap: 1px; }
.tb-kolom {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}
.tb-kolom.toekomst { opacity: 0.3; }
.tb-staaf {
  display: block;
  width: 100%;
  max-width: 22px;
  border-radius: 999px 999px 3px 3px;
  background: var(--tomaat);
}
.tb-stip {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lijn);
}
.tb-mens {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.tb-mens.aan { background: var(--kobalt); }
.tb-kolom small { font-size: 0.6rem; color: var(--inkt-zacht); text-transform: uppercase; }
.tb-legenda {
  display: flex;
  gap: 14px;
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: var(--inkt-zacht);
}
.tb-legenda span { display: inline-flex; align-items: center; gap: 5px; }

/* Wat je het vaakst voelde */
.tb-chip { cursor: default; }
.tb-chip small { margin-left: 6px; color: var(--kobalt); font-weight: 700; }

/* Foto's */
.tb-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tb-fotos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
}

/* Dagboek */
.tb-dagboek {
  margin: 0 0 10px;
  padding: 12px 14px;
  background: var(--creme);
  border-radius: 8px;
  border-left: 4px solid var(--kobalt);
}
.tb-dagboek p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-dagboek cite { display: block; margin-top: 6px; color: var(--kobalt); font-size: 1rem; }

/* Jij en je cyclus */
.tb-fasen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tb-fase { background: var(--creme); border-radius: 8px; padding: 10px 12px; }
.tb-fase-naam {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tb-fase-getal { margin: 4px 0 0; font-size: 1.15rem; line-height: 1.1; color: var(--kobalt); }
.tb-fase-extra { margin: 4px 0 0; font-size: 0.75rem; color: var(--inkt-zacht); }
.tb-blok > .hint:last-child { font-size: 0.8rem; }

/* ---------- Quote van vandaag ---------- */

.quote-vandaag {
  margin-top: 26px;
  background: var(--creme);
  border-radius: 10px;
  padding: 16px 16px 18px;
}
.quote-vandaag .label { margin-top: 0; }
.ster-kobalt { color: var(--kobalt); }
.quote-tekst {
  font-size: 1.8rem;
  line-height: 1.05;
  color: var(--tomaat);
  margin: 0 0 14px;
}

/* ---------- Kaartmaker ---------- */

/* Schermvullend op een telefoon: bovenaan de afbeelding, onderaan tabjes met keuzes */
.kaartmaker {
  border: none; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  padding: calc(env(safe-area-inset-top) + 8px) 0 calc(env(safe-area-inset-bottom) + 10px);
  background: var(--creme); color: var(--inkt); overflow: hidden;
}
.kaartmaker[open] { display: flex; flex-direction: column; }
.kaartmaker::backdrop { background: rgba(43, 29, 61, 0.55); }
/* Op een computer: een rustig venster in het midden */
@media (min-width: 700px) {
  .kaartmaker { width: 480px; height: min(94dvh, 940px); margin: auto; border-radius: 14px; }
}
.km-balk { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 6px; }
.km-titel { font-size: 1.35rem; margin: 0; }
.km-rond, .km-rond-ruimte { width: 38px; height: 38px; flex: none; }
.km-rond { border: none; border-radius: 50%; background: var(--lijn); color: var(--inkt); font: inherit; font-size: 1rem; cursor: pointer; }

/* De afbeelding vult alle ruimte die over is, en past er altijd helemaal in */
.km-voorbeeld { flex: 1 1 0; min-height: 0; container-type: size; display: grid; place-items: center; padding: 4px 16px 10px; }
.kaart-canvas {
  display: block; width: min(100cqw, 100cqh * 0.8); height: auto; aspect-ratio: 4 / 5;
  border-radius: 8px; box-shadow: 0 10px 28px rgba(43, 29, 61, 0.18);
}

.km-tabs {
  display: flex; gap: 2px; overflow-x: auto; padding: 0 8px; flex: none;
  border-top: 1.5px solid var(--lijn); scrollbar-width: none;
}
.km-tabs::-webkit-scrollbar { display: none; }
.km-tabs button {
  flex: 1 0 auto; border: none; background: none; cursor: pointer; padding: 12px 6px 10px;
  font: inherit; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--inkt-zacht); position: relative;
}
.km-tabs button.actief { color: var(--kobalt); }
.km-tabs button.actief::after { content: ""; position: absolute; left: 6px; right: 6px; top: -1.5px; height: 3px; border-radius: 3px; background: var(--kobalt); }
.km-tabs button[hidden] { display: none; }

/* Vaste hoogte, zodat de afbeelding niet verspringt als je van tabje wisselt */
.km-panelen { flex: none; height: 168px; overflow-y: auto; padding: 4px 16px 0; }
.km-paneel[hidden] { display: none; }
.km-paneel .hint { margin: 0 0 8px; font-size: 0.85rem; }
.km-paneel textarea { margin-top: 10px; }
.km-paneel .label { margin: 0 0 6px; }
/* Bij Letter: het kopje naast de keuzes, zodat alle drie de rijen passen */
.km-rij { display: flex; align-items: center; gap: 10px; }
.km-rij .label { flex: none; width: 74px; margin: 0; font-size: 0.6rem; }
.km-rij .chips { gap: 6px; flex-wrap: nowrap; }
.km-rij .chip { padding: 6px 10px; }
.km-rij .stalen { gap: 8px; }
.km-rij .staal { width: 34px; height: 34px; }
.km-rij + .km-rij { margin-top: 12px; }
.km-paneel .schuif-kop { margin-top: 10px; }
.km-paneel #km-fotos .foto-keuze { margin-top: 12px; }
.km-melding { flex: none; text-align: center; margin: 2px 16px 0; min-height: 1.2em; }
.km-knoppen { flex: none; display: flex; gap: 10px; padding: 6px 16px 0; }
.km-knoppen .knop { flex: 1; padding: 13px 8px; white-space: nowrap; font-size: 0.78rem; }
.km-elegant { font-family: var(--schuin); font-style: italic; font-size: 1rem; }
.km-stoer { font-family: var(--kopletter); text-transform: uppercase; }
.km-modern { font-weight: 800; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.03em; }

.stalen { display: flex; flex-wrap: wrap; gap: 10px; }
.staal {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  box-shadow: inset 0 0 0 1.5px var(--lijn);
  cursor: pointer;
  padding: 0;
}
.staal.actief { box-shadow: 0 0 0 3px var(--creme), 0 0 0 5px var(--kobalt); }
.staal-foto {
  width: auto;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--creme);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--kobalt);
  box-shadow: inset 0 0 0 2px var(--kobalt);
}

.foto-keuze {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
}
.foto-keuze-nieuw,
.foto-keuze-moment {
  flex: none;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  border: none;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.foto-keuze-nieuw {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--kobalt);
  color: var(--kobalt);
  font-size: 1.6rem;
  line-height: 1;
}
.foto-keuze-nieuw small { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; margin-top: 4px; text-align: center; }
.foto-keuze-moment img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Foutmelding ---------- */
.foutmelding {
  max-width: 560px;
  margin: 12px auto 0;
  padding: 14px 16px;
  background: var(--creme);
  border-left: 4px solid var(--tomaat);
  border-radius: 8px;
}
@media (max-width: 600px) { .foutmelding { margin: 12px 18px 0; } }
.foutmelding p { margin: 0 0 4px; font-weight: 600; }
.foutmelding small { display: block; color: var(--inkt-zacht); margin-bottom: 10px; overflow-wrap: anywhere; }
.versie { font-size: 0.75rem; margin-top: -4px; }
.staal-foto.actief { background: var(--kobalt); color: var(--creme); }

/* ---------- Happy Bits-logo ---------- */
.merk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--kopletter);
  font-style: normal;
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1;
  color: var(--tomaat);
}
.merk-vlek { width: 22px; height: 22px; }

.inlog-logo { display: flex; align-items: center; gap: 14px; margin: 26px 0 6px; }
.inlog-vlek { width: 84px; height: 84px; flex: none; }
.inlog-naam { font-size: 3.4rem; line-height: 0.88; }
.inlog-tagline { font-size: 1.35rem; color: var(--kobalt); margin: 26px 0 22px; }
.inlog-logo { position: relative; width: max-content; max-width: 100%; padding-right: 40px; }
.inlog-stipjes { position: absolute; inset: -6px 0 -6px -6px; width: calc(100% + 6px); height: calc(100% + 12px); pointer-events: none; overflow: visible; }

/* ---------- Ruimte tussen onderdelen (nagelopen in versie 19) ---------- */
/* Hoofdknop van een formulier nooit tegen het laatste invulveld aan */
.formulier > .knop.hoofd { margin-top: 20px; }
/* Uitleg boven een invulblok */
.formulier > .hint { margin-bottom: 16px; }
/* Mijn dag: cycluskaartje los van de sterren */
.cyclus-info { margin-bottom: 18px; }
/* Museum: lijst niet tegen de knop "Laat me iets moois zien" */
#lijst-museum { margin-top: 18px; }
/* Terugblik: legenda iets los van het grafiekje */
.tb-legenda { margin-top: 10px; }
/* Aanpasvenster: foto los van het tekstvak */
.groot textarea + .voorbeeld { margin-top: 12px; }
.versie { margin-top: 6px; }
/* Inlogscherm: "Welkom terug" los van het eerste veld */
#scherm-inloggen > h1.label { margin-bottom: 18px; }
/* Museum: uitleg los van de keuze Momenten / Terugblik */
.weergave { margin-bottom: 16px; }

/* =====================================================================
   Versie 21: nieuwe opzet na de UX-review
   ===================================================================== */

.sub { font-size: 1.2rem; line-height: 1.2; color: var(--kobalt); margin: -4px 0 18px; }

/* ---------- Polaroids (Happy Bits en Museum) ---------- */
.polaroids {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.polaroid {
  display: flex;
  flex-direction: column;
  border: none;
  padding: 8px 8px 0;
  background: var(--creme);
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(43, 29, 61, 0.12);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.polaroid-beeld {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--lijn);
}
.polaroid-beeld img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid-onder {
  display: block;
  padding: 8px 2px 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--inkt-zacht);
}
.polaroid-tekst { display: flex; align-items: center; justify-content: center; padding: 12px; }
.polaroid-tekst p {
  margin: 0;
  font-family: var(--schuin);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kleur-tomaat { background: var(--tomaat); color: var(--creme); }
.kleur-kobalt { background: var(--kobalt); color: var(--creme); }
.kleur-roze { background: var(--roze); color: var(--tomaat); }
.kleur-zon { background: #f6c445; color: var(--kobalt); }

.polaroid-leeg { background: transparent; box-shadow: none; padding-top: 8px; }
.polaroid-leeg .polaroid-beeld {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 244, 230, 0.55);
  border: 2px dashed var(--kobalt);
  border-radius: 6px;
  color: var(--kobalt);
}
.plus {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--kobalt); color: var(--creme);
  font-size: 1.8rem; line-height: 1;
}
.leeg-tekst { font-size: 0.78rem; font-weight: 700; text-align: center; padding: 0 10px; }

/* Quote op Happy Bits: compacter */
.quote-vandaag { margin: 0 0 6px; }
.quote-tekst { font-size: 1.5rem; margin-bottom: 8px; }
#quote-kaart { color: var(--kobalt); text-decoration: none; font-weight: 700; }

/* ---------- Plusknop ---------- */
.fab {
  position: fixed;
  right: max(18px, calc(50% - 262px));
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 45;
  width: 60px; height: 60px;
  border: none; border-radius: 50%;
  background: var(--tomaat); color: var(--creme);
  font-size: 2.3rem; line-height: 1;
  box-shadow: 0 10px 22px rgba(232, 69, 44, 0.38);
  cursor: pointer;
}

/* Invulvenster: in het midden, net als de andere vensters */
.andere-dag summary { cursor: pointer; color: var(--kobalt); font-size: 0.85rem; font-weight: 700; margin: 2px 0 6px; }
.andere-dag[open] summary { margin-bottom: 10px; }

/* Een happy bit bekijken: schermvullend, op inkt zodat foto's goed uitkomen */
.kijker {
  border: none;
  margin: 0;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 14px);
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: var(--inkt);
  color: var(--creme);
  overflow: hidden;
  touch-action: none; /* vegen doen we zelf */
  user-select: none;
}
.kijker[open] { display: flex; flex-direction: column; }
.kijker::backdrop { background: var(--inkt); }
.kijker-balk { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.kijker-teller { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; opacity: 0.8; }
.kijker-rond {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255, 244, 230, 0.14); color: var(--creme);
  font: inherit; font-size: 1.1rem; cursor: pointer;
}
.kijker-vel {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  width: min(100%, 560px); margin: 0 auto;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.kijker .groot-kop { color: var(--zon, #f6c445); text-align: center; }
.kijker-beeld { min-height: 0; display: flex; justify-content: center; }
.kijker-beeld img {
  display: block; max-width: 100%; max-height: 62dvh;
  object-fit: contain; border-radius: 6px; -webkit-user-drag: none;
}
.kijker-kaartje {
  width: min(100%, 420px); aspect-ratio: 1; border-radius: 6px;
}
.kijker-kaartje[hidden] { display: none; }
.kijker-kaartje p { font-size: clamp(1.5rem, 6vw, 2.1rem); }
.kijker .groot-tekst { margin-top: 14px; }
.kijker .groot-datum { color: var(--roze); }
.kijker-pijl { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; }
.kijker-pijl.vorige { left: 10px; }
.kijker-pijl.volgende { right: 10px; }
.kijker-pijl[hidden] { display: none; }
/* Op een telefoon veeg je; de pijltjes staan dan onderaan, uit de weg */
@media (max-width: 640px) {
  .kijker-pijl { top: auto; bottom: calc(env(safe-area-inset-bottom) + 64px); transform: none; }
}
.groot-acties {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1.5px solid rgba(255, 244, 230, 0.18);
}
.kijker .link { color: var(--creme); }
#groot-verwijder { color: #ff9a85; }

/* ---------- Vandaag ---------- */
.weekstrip { display: flex; align-items: center; gap: 6px; margin: 8px 0 18px; }
.klein-rond { width: 30px; height: 30px; font-size: 1.1rem; flex: none; }
.weekdagen { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.weekdag {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: none; background: none; border-radius: 12px;
  padding: 6px 0; font: inherit; color: var(--inkt); cursor: pointer;
}
.weekdag small { font-size: 0.58rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--inkt-zacht); }
.weekdag b { font-size: 0.95rem; }
.weekdag i { width: 5px; height: 5px; border-radius: 50%; }
.weekdag i.aan { background: var(--tomaat); }
.weekdag.is-vandaag b { color: var(--tomaat); }
.weekdag.gekozen { background: var(--kobalt); }
.weekdag.gekozen small, .weekdag.gekozen b { color: var(--creme); }
.weekdag.gekozen i.aan { background: #f6c445; }
.weekdag:disabled { opacity: 0.3; cursor: default; }

.voortgang { height: 6px; background: var(--lijn); border-radius: 999px; overflow: hidden; }
#voortgang-balk { height: 100%; background: var(--tomaat); border-radius: 999px; transition: width 0.35s; }
.voortgang-tekst { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--inkt-zacht); margin: 8px 0 0; }
.stap-fase { font-size: 0.75rem; font-weight: 700; color: var(--kobalt); margin: 4px 0 0; }
.stapkop { font-size: clamp(2rem, 9vw, 2.6rem); margin: 22px 0 14px; }

.gezichtjes { display: flex; justify-content: space-between; gap: 6px; margin: 22px 0 6px; }
.gezicht-knop {
  flex: 1; border: none; background: none; padding: 4px; cursor: pointer;
  opacity: 0.4; transition: transform 0.25s, opacity 0.25s;
}
.gezicht-knop svg { display: block; width: 100%; max-width: 62px; margin: 0 auto; }
.gezicht-knop.gekozen { opacity: 1; transform: scale(1.2); }
.stemming-tekst { text-align: center; color: var(--kobalt); font-size: 1.35rem; margin: 14px 0 0; }
.energie-keuze .chip { font-size: 1rem; padding: 12px 22px; }
.stap textarea { min-height: 220px; }

.stap-knoppen { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
#stap-volgende { margin-left: auto; padding: 14px 24px; }

.dagkaart { background: var(--lila); border-radius: 16px; padding: 18px; margin: 4px 0 16px; }
.dagkaart-boven { display: flex; align-items: center; gap: 14px; }
.sam-gezicht svg { display: block; width: 64px; height: 64px; }
.sam-gezicht.zacht { opacity: 0.45; }
.dagkaart-stemming { margin: 0; font-weight: 800; font-size: 1.1rem; }
.dagkaart-datum { margin: 2px 0 0; font-size: 0.8rem; color: var(--inkt-zacht); }
.dagkaart #sam-chips { margin-top: 14px; }
.dagkaart .chip.actief { background: var(--creme); cursor: default; }
.dagkaart-dagboek { font-size: 1.3rem; line-height: 1.2; margin: 14px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.knop.breed { width: 100%; padding: 14px; }

/* ---------- Cyclus ---------- */
.cyclus-status > .kop.reus { margin-bottom: 6px; }
.dagnr { align-items: center; gap: 14px; }
.dagnr-tekst .label { margin: 0; }
.dagnr-tekst .status-fase { margin: 2px 0 0; font-size: 1.9rem; }
.fasekaart { background: var(--lila); border-radius: 14px; padding: 16px; margin: 16px 0 12px; }
.fasekaart .label { margin: 0 0 6px; }
.fasekaart-tekst { font-size: 1.35rem; line-height: 1.15; color: var(--kobalt); margin: 0; }
.fasekaart-tip { font-size: 0.88rem; margin: 10px 0 0; }
.fasekaart-tip:empty, .verwacht-tekst:empty { display: none; }
.verwachtkaart .label { margin: 0 0 4px; }
.verwacht-tekst { font-weight: 800; font-size: 1.1rem; margin: 0; }
.verwachtkaart .cyclus-knoppen { margin-top: 12px; }

/* ---------- Museum ---------- */
.uitgelicht { position: relative; margin: 6px 0 18px; }
.uitgelicht-kaart {
  display: block; width: 100%; position: relative;
  border: none; padding: 0; border-radius: 16px; overflow: hidden;
  font: inherit; text-align: left; cursor: pointer;
}
.uitgelicht-kaart.met-foto img { display: block; width: 100%; height: 270px; object-fit: cover; }
.uitgelicht-kaart.met-foto .uitgelicht-tekst {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 50px 16px 16px;
  background: linear-gradient(transparent, rgba(43, 29, 61, 0.75));
  color: var(--creme);
}
.uitgelicht-kaart:not(.met-foto) .uitgelicht-tekst {
  min-height: 210px; padding: 28px 18px 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.uitgelicht-tekst .label { color: inherit; opacity: 0.85; margin: 0 0 6px; }
.uitgelicht-tekst p { margin: 0; font-size: 1.65rem; line-height: 1.1; }
.uitgelicht-nog {
  position: absolute; top: 12px; right: 12px;
  border: none; border-radius: 999px; padding: 6px 12px;
  background: var(--creme); color: var(--kobalt);
  font: inherit; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
}
/* Ruimte onderaan zodat de plusknop nooit een polaroid afdekt */
#scherm-vandaag { padding-bottom: 76px; }
/* Cyclus: "Cyclusdag 27" als kop, de fase eronder */
#cyclus-titel { margin-bottom: 2px; }
.cyclus-status > .status-fase { margin: 0; font-size: 1.9rem; }
.cyclus-status > .status-fase:empty { display: none; }
/* Museum: datum rechtsonder in de uitgelichte herinnering */
.uitgelicht-datum {
  position: absolute;
  right: 16px;
  bottom: 18px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.85;
}
.uitgelicht-kaart.met-foto .uitgelicht-datum { color: var(--creme); }
.uitgelicht-tekst { padding-right: 104px !important; }

/* =====================================================================
   Versie 27: account maken, wachtwoord vergeten en tweestapsverificatie
   ===================================================================== */

.inlog-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; }
.inlog-links .link:not(.klein) { color: var(--kobalt); font-weight: 700; }

/* Eisen voor een nieuw wachtwoord: vinken af terwijl je typt */
.eisen { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 3px; font-size: 0.85rem; }
.eisen li { color: var(--inkt-zacht); }
.eisen li::before { content: "○"; display: inline-block; width: 1.3em; color: var(--kobalt); }
.eisen li.ok { color: var(--inkt); }
.eisen li.ok::before { content: "✓"; font-weight: 800; }

.toestemming { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 0.9rem; line-height: 1.35; cursor: pointer; }
.toestemming input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--kobalt); }

/* Tweestapsverificatie instellen: drie stappen met een voortgangsbalk */
.voortgang-vulling { height: 100%; width: 0; background: var(--tomaat); border-radius: 999px; transition: width 0.35s; }
.instel-stap { margin-top: 18px; }
.instel-kop { font-size: 1.9rem; line-height: 1; margin: 0 0 10px; }
.instel-uitleg { font-size: 1.15rem; line-height: 1.3; color: var(--kobalt); margin: 0 0 18px; }
.instel-stap .knop.hoofd { margin-top: 22px; }

.app-kaart { display: flex; align-items: center; gap: 14px; background: var(--creme); border-radius: 12px; padding: 14px; }
.app-icoon {
  width: 48px; height: 48px; flex: none; border-radius: 12px;
  display: grid; place-items: center; background: var(--kobalt); color: #f6c445; font-size: 1.5rem;
}
.app-naam { display: grid; gap: 2px; }
.app-naam small { color: var(--inkt-zacht); font-size: 0.82rem; }
.app-winkels { display: flex; gap: 10px; margin: 10px 0 14px; }
.app-winkels .knop { flex: 1; text-align: center; text-decoration: none; }
.app-winkels .knop[hidden] { display: none; }

.instel-lijst { margin: 0; padding-left: 1.4em; display: grid; gap: 12px; font-size: 0.98rem; line-height: 1.4; }
.instel-lijst li::marker { color: var(--tomaat); font-weight: 800; }
.sleutel-knop {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; margin-top: 8px; padding: 12px 14px;
  border: 1.5px dashed var(--kobalt); border-radius: 10px; background: var(--creme);
  font: inherit; color: var(--inkt); cursor: pointer; text-align: left;
}
.sleutel-knop code { font-family: ui-monospace, Menlo, monospace; font-size: 0.95rem; letter-spacing: 0.04em; word-break: break-word; }
.sleutel-knop span { flex: none; font-weight: 800; font-size: 0.85rem; color: var(--kobalt); }
.sleutel-knop.gekopieerd { border-style: solid; }

.tweestaps-qr { display: block; width: 190px; height: 190px; background: #fff; padding: 10px; border-radius: 10px; margin: 0 0 16px; }
/* Op een telefoon kun je je eigen scherm niet scannen: daar alleen de sleutel */
@media (pointer: coarse) { .alleen-computer { display: none; } }

/* Zes vakjes voor de code */
.code-vakjes { position: relative; margin: 6px 0 4px; }
.code-vakjes .code-invoer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: none; font-size: 16px; /* geen inzoomen op een iPhone */
  caret-color: transparent; cursor: text;
}
.vakjes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; pointer-events: none; }
.vakjes span {
  height: 58px; border-radius: 10px; background: var(--creme);
  display: grid; place-items: center;
  font-family: var(--kopletter); font-size: 1.9rem; font-variant-numeric: tabular-nums; color: var(--inkt);
}
.vakjes span:nth-child(3) { margin-right: 6px; }
.vakjes span.actief { outline: 2px solid var(--kobalt); outline-offset: 1px; }
.uitlog-link { margin-top: 26px; }

/* =====================================================================
   Versie 30: instellingen, cyclus uitzetten en app-slot met pincode
   ===================================================================== */

.tab[hidden] { display: none; }
.bovenbalk-rechts { display: flex; align-items: center; gap: 10px; }
.tandwiel {
  width: 32px; height: 32px; margin: -6px -6px -6px 0; padding: 6px;
  border: none; background: none; color: var(--tomaat); cursor: pointer; border-radius: 50%;
  align-self: center;
}
.tandwiel svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tandwiel[hidden] { display: none; }

/* Een rij in de instellingen: uitleg links, schakelaar rechts */
.inst-rij {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1.5px solid var(--lijn);
}
.inst-naam { margin: 0 0 3px; font-weight: 700; }
.inst-rij > div { flex: 1; min-width: 0; }
.inst-rij .hint { margin: 0; font-size: 0.85rem; line-height: 1.35; }
.inst-rij .link { flex: none; color: var(--tomaat); font-weight: 700; }

.schakelaar {
  flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px;
  border: none; background: var(--lijn); cursor: pointer; transition: background 0.2s;
}
.schakelaar span {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(43, 29, 61, 0.25); transition: transform 0.2s;
}
.schakelaar[aria-checked="true"] { background: var(--kobalt); }
.schakelaar[aria-checked="true"] span { transform: translateX(20px); }

/* Het slot: schermvullend, lila, met een eigen cijfertoetsenbordje */
.slot {
  border: none; margin: 0; padding: calc(env(safe-area-inset-top) + 40px) 24px calc(env(safe-area-inset-bottom) + 24px);
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: var(--lila); color: var(--inkt);
}
.slot[open] { display: flex; flex-direction: column; align-items: center; }
.slot::backdrop { background: var(--lila); }
.slot-vlek { width: 64px; height: 64px; }
.slot-kop { font-size: 1.6rem; text-align: center; margin: 18px 0 22px; }
.slot-stippen { display: flex; gap: 18px; }
.slot-stippen span { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--kobalt); transition: background 0.1s; }
.slot-stippen span.vol { background: var(--kobalt); }
.slot-stippen.schud { animation: schud 0.35s; }
@keyframes schud { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.slot-melding { text-align: center; min-height: 2.6em; max-width: 280px; }
.toetsen { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; margin: 8px 0 18px; }
.toetsen button {
  width: 72px; height: 72px; border-radius: 50%; border: none;
  background: var(--creme); color: var(--inkt);
  font-family: var(--kopletter); font-size: 1.8rem; cursor: pointer;
}
.toetsen button:active { background: var(--kobalt); color: var(--creme); }
.toetsen button[data-toets="weg"] { background: none; font-family: inherit; font-size: 1.5rem; }
.slot .link[hidden] { display: none; }

/* =====================================================================
   Versie 33: foto bewerken in de kaartmaker (filter, licht, kleurlaagje)
   ===================================================================== */

.km-bewerk { margin-top: 6px; }
.km-bewerk .hint { margin: 2px 0 10px; font-size: 0.85rem; }

/* Filters als kleine voorbeeldjes, zoals op Instagram */
.filters { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; margin-top: 8px; }
.filter-knop {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: none; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--inkt-zacht);
}
.filter-knop canvas { width: 58px; height: 72px; border-radius: 8px; display: block; }
.filter-knop.actief { color: var(--kobalt); }
.filter-knop.actief canvas { box-shadow: 0 0 0 2px var(--creme), 0 0 0 4px var(--kobalt); }

/* Schuifjes in de huisstijl */
.schuif-kop { display: flex; justify-content: space-between; align-items: baseline; }
.schuif-kop span:last-child { color: var(--kobalt); font-variant-numeric: tabular-nums; }
.schuif {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; margin: 12px 0 4px; border-radius: 999px;
  background: var(--lijn); outline: none;
}
.schuif::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--kobalt); border: 3px solid var(--creme); box-shadow: 0 1px 4px rgba(43, 29, 61, 0.3);
  cursor: pointer;
}
.schuif::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--kobalt); border: 3px solid var(--creme); cursor: pointer;
}
.schuif:focus-visible { outline: 2px solid var(--kobalt); outline-offset: 4px; }
