/* Aftellen – stijlen. Elke stijl zet alleen variabelen; daaronder per stijl wat extra's. */

@font-face { font-family: "Gochi Hand"; src: url(../fonts/gochi-hand.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url(../fonts/patrick-hand.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(../fonts/fredoka.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }

/* ---------- Stijlvariabelen ---------- */

[data-stijl="schetsboek"] {
  --achter: #efe4c8;
  --papier: #faf3e0;
  --inkt: #3a2f25;
  --zacht: #7c6a55;
  --lijn: #3a2f25;
  --kop: #2c52a8;
  --font-kop: "Gochi Hand", "Patrick Hand", "Comic Sans MS", cursive;
  --font-tekst: "Patrick Hand", "Comic Sans MS", cursive;
  --font-cijfer: "Gochi Hand", "Patrick Hand", cursive;
  --hoek: 18px 6px 16px 5px / 6px 16px 5px 18px;
  --knop-achter: #2c52a8;
  --knop-inkt: #fffaf0;
  --k0: #e0457b; --k1: #f0b92a; --k2: #5aa66a; --k3: #ef7d2d;
  --k4: #8e5fc4; --k5: #2f6fd1; --k6: #a6c43a; --k7: #d8283f;
  color-scheme: light;
}

[data-stijl="waterverf"] {
  --achter: #f7f4ee;
  --papier: #ffffff;
  --inkt: #3b3742;
  --zacht: #8a8492;
  --lijn: #e6e0d6;
  --kop: #3b3742;
  --font-kop: "Fredoka", ui-rounded, system-ui, sans-serif;
  --font-tekst: "Fredoka", ui-rounded, system-ui, sans-serif;
  --font-cijfer: "Fredoka", ui-rounded, system-ui, sans-serif;
  --hoek: 22px;
  --knop-achter: #3b3742;
  --knop-inkt: #ffffff;
  --k0: #ee8fb6; --k1: #f2cd45; --k2: #86d0c0; --k3: #f39236;
  --k4: #b6a0e6; --k5: #86bfe6; --k6: #c4dd52; --k7: #e2574f;
  color-scheme: light;
}

[data-stijl="strak"] {
  --achter: #f3f4f6;
  --papier: #ffffff;
  --inkt: #111827;
  --zacht: #6b7280;
  --lijn: #e5e7eb;
  --kop: #111827;
  --font-kop: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-tekst: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cijfer: system-ui, -apple-system, "Segoe UI", sans-serif;
  --hoek: 16px;
  --knop-achter: #111827;
  --knop-inkt: #ffffff;
  --k0: #ec4899; --k1: #eab308; --k2: #14b8a6; --k3: #f97316;
  --k4: #8b5cf6; --k5: #3b82f6; --k6: #65a30d; --k7: #ef4444;
  color-scheme: light;
}

[data-stijl="nacht"] {
  --achter: #0d1024;
  --papier: #171b38;
  --inkt: #eef0ff;
  --zacht: #9aa0c8;
  --lijn: #2a3060;
  --kop: #eef0ff;
  --font-kop: "Fredoka", ui-rounded, system-ui, sans-serif;
  --font-tekst: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cijfer: "Fredoka", ui-rounded, system-ui, sans-serif;
  --hoek: 20px;
  --knop-achter: #ffd84d;
  --knop-inkt: #0d1024;
  --k0: #ff6fb5; --k1: #ffd84d; --k2: #4fe3c1; --k3: #ff9a3d;
  --k4: #b18cff; --k5: #5cc8ff; --k6: #c6f35a; --k7: #ff5a6e;
  color-scheme: dark;
}

/* ---------- Basis ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--achter);
  color: var(--inkt);
  font-family: var(--font-tekst);
  font-size: 17px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* Papierkorrel voor de twee 'getekende' stijlen. */
html[data-stijl="schetsboek"] body::before,
html[data-stijl="waterverf"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 0 0 0 -1.4 .75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-kop); font-weight: 600; margin: 0; }

main, .kop { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }

/* ---------- Kop ---------- */

.kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 14px;
}

.titel {
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1;
  color: var(--kop);
  letter-spacing: .01em;
  white-space: nowrap;
}
.titel span { display: inline-block; }

.kop-acties { display: flex; gap: 8px; align-items: center; }

.chip, .rond {
  border: 1.5px solid var(--lijn);
  background: var(--papier);
  min-height: 42px;
  border-radius: 999px;
}
.chip { padding: 6px 14px; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rond { width: 42px; display: inline-grid; place-items: center; padding: 0; flex: none; }
.rond svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rond:disabled { opacity: .35; cursor: default; }

/* ---------- Tegels ---------- */

.tegels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}

.tegel {
  --k: var(--k0);
  position: relative;
  background: var(--papier);
  border-radius: var(--hoek);
  padding: 16px 18px 14px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .2s;
  outline-offset: 3px;
}
.tegel:active { transform: scale(.98); }

.tegel-kop { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-right: 36px; }
.tegel-emoji { font-size: 30px; line-height: 1; flex: none; }
.tegel h2 { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }

.teller {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.eenheid { display: flex; flex-direction: column; align-items: center; padding: 8px 2px 6px; border-radius: 12px; }
.eenheid b { font-family: var(--font-cijfer); font-weight: 600; font-size: 30px; line-height: 1; }
.eenheid.dagen b { font-size: 40px; }
.eenheid small { font-size: 13px; color: var(--zacht); margin-top: 4px; }

.tegel-datum { margin: 10px 0 0; font-size: 14px; color: var(--zacht); }

.hoera { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 0 4px; }
.hoera strong { font-family: var(--font-kop); font-size: 32px; line-height: 1.1; color: var(--k); }
.hoera span { font-size: 14px; color: var(--zacht); }

.tegel.soort-feest { animation: wiebel 2.4s ease-in-out infinite; }
.tegel.soort-voorbij { opacity: .85; }
.terug-label { margin: -4px 0 6px; font-size: 15px; color: var(--zacht); letter-spacing: .02em; }
.groot .terug-label { margin: 0; font-size: 18px; }
.tegel.bijna { animation: tik 1s ease-in-out infinite; }
.tegel.vandaag .eenheid.dagen b { color: var(--k); }

@keyframes tik { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.035); } }
@keyframes wiebel { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-.8deg); } 75% { transform: rotate(.8deg); } }

.leeg { text-align: center; padding: 60px 20px; color: var(--zacht); }
.leeg-groot { font-family: var(--font-kop); font-size: 26px; color: var(--kop); margin: 0 0 6px; }

/* ---------- Schetsboek ---------- */

html[data-stijl="schetsboek"] .titel { text-transform: uppercase; letter-spacing: .03em; }
html[data-stijl="schetsboek"] .titel span:nth-child(odd) { transform: rotate(-4deg) translateY(1px); }
html[data-stijl="schetsboek"] .titel span:nth-child(even) { transform: rotate(3deg); }
html[data-stijl="schetsboek"] .titel::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 30px;
  margin-left: 6px;
  vertical-align: top;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 36'%3E%3Cg stroke='%23ef7d2d' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M8 30 3 22M20 26V12M32 30l5-8'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}

html[data-stijl="schetsboek"] .chip,
html[data-stijl="schetsboek"] .rond { border: 2px solid var(--lijn); border-radius: 22px 18px 24px 16px / 18px 24px 16px 22px; background: var(--papier); }

html[data-stijl="schetsboek"] .tegel {
  border: 2.5px solid var(--lijn);
  transform: rotate(var(--draai));
  box-shadow: 3px 4px 0 rgba(58, 47, 37, .12);
}
html[data-stijl="schetsboek"] .tegel:active { transform: rotate(var(--draai)) scale(.98); }
html[data-stijl="schetsboek"] .tegel h2 { color: var(--kop); font-size: 26px; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; }
html[data-stijl="schetsboek"] .tegel-datum { font-size: 16px; }

/* Getekende sterretjes in de hoek, om en om rood, geel en blauw. */
html[data-stijl="schetsboek"] .tegel::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  transform: rotate(14deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r'%3E%3CfeTurbulence baseFrequency='.08' numOctaves='2' seed='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='6'/%3E%3C/filter%3E%3Cpolygon filter='url(%23r)' points='50,6 61,35 92,36 68,56 76,86 50,69 24,86 32,56 8,36 39,35' fill='%23d8283f' stroke='%23a51a2e' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
html[data-stijl="schetsboek"] .tegel:nth-child(3n+2)::after {
  transform: rotate(-10deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r'%3E%3CfeTurbulence baseFrequency='.08' numOctaves='2' seed='5'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='6'/%3E%3C/filter%3E%3Cpolygon filter='url(%23r)' points='50,6 61,35 92,36 68,56 76,86 50,69 24,86 32,56 8,36 39,35' fill='none' stroke='%23f0b92a' stroke-width='7' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-stijl="schetsboek"] .tegel:nth-child(3n)::after {
  transform: rotate(4deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cfilter id='r'%3E%3CfeTurbulence baseFrequency='.08' numOctaves='2' seed='9'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='6'/%3E%3C/filter%3E%3Cpolygon filter='url(%23r)' points='50,6 61,35 92,36 68,56 76,86 50,69 24,86 32,56 8,36 39,35' fill='%232f6fd1' stroke='%231f4fa0' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Ingekleurd vak met krijtarcering achter de cijfers. */
html[data-stijl="schetsboek"] .tegel .teller,
html[data-stijl="schetsboek"] .groot-teller {
  padding: 6px;
  border: 2.5px solid var(--k);
  border-radius: var(--hoek);
  background:
    repeating-linear-gradient(-62deg, color-mix(in srgb, var(--k) 30%, transparent) 0 2px, transparent 2px 6px),
    color-mix(in srgb, var(--k) 10%, var(--papier));
}
html[data-stijl="schetsboek"] .eenheid b { font-weight: 400; font-size: 36px; }
html[data-stijl="schetsboek"] .eenheid.dagen b { font-size: 48px; color: var(--kop); }
html[data-stijl="schetsboek"] .eenheid small { font-size: 15px; color: var(--inkt); }
html[data-stijl="schetsboek"] .hoera strong { font-weight: 400; font-size: 38px; text-transform: uppercase; }
html[data-stijl="schetsboek"] .hoera strong::after { content: " !!"; color: var(--k7); }

/* ---------- Waterverf ---------- */

html[data-stijl="waterverf"] .titel { font-weight: 600; }
html[data-stijl="waterverf"] .titel span:nth-child(8n+1) { color: var(--k0); }
html[data-stijl="waterverf"] .titel span:nth-child(8n+2) { color: var(--k1); }
html[data-stijl="waterverf"] .titel span:nth-child(8n+3) { color: var(--k2); }
html[data-stijl="waterverf"] .titel span:nth-child(8n+4) { color: var(--k3); }
html[data-stijl="waterverf"] .titel span:nth-child(8n+5) { color: var(--k4); }
html[data-stijl="waterverf"] .titel span:nth-child(8n+6) { color: var(--k5); }
html[data-stijl="waterverf"] .titel span:nth-child(8n+7) { color: var(--k6); }
html[data-stijl="waterverf"] .titel span:nth-child(8n+8) { color: var(--k7); }

html[data-stijl="waterverf"] .tegel {
  box-shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 10px 28px rgba(60, 40, 20, .07);
  padding-bottom: 46px;
}
html[data-stijl="waterverf"] .tegel h2 { font-weight: 600; }
html[data-stijl="waterverf"] .eenheid b { font-weight: 500; }
html[data-stijl="waterverf"] .hoera strong { color: color-mix(in srgb, var(--k) 70%, var(--inkt)); }
html[data-stijl="waterverf"] .eenheid.dagen {
  background: color-mix(in srgb, var(--k) 22%, transparent);
  border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
}

/* ---------- Strak ---------- */

html[data-stijl="strak"] .titel { font-weight: 800; letter-spacing: -.02em; }
html[data-stijl="strak"] .tegel {
  border-top: 5px solid var(--k);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 6px 20px rgba(0, 0, 0, .05);
}
html[data-stijl="strak"] .eenheid { background: var(--achter); }
html[data-stijl="strak"] .eenheid b { font-weight: 700; }

/* ---------- Nacht ---------- */

html[data-stijl="nacht"] body {
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 42%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 64%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 82%, #fff6 50%, transparent 51%),
    var(--achter) fixed;
}
html[data-stijl="nacht"] .titel { background: linear-gradient(90deg, var(--k0), var(--k1), var(--k2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-stijl="nacht"] .tegel {
  border: 1px solid color-mix(in srgb, var(--k) 45%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--k) 18%, transparent);
}
html[data-stijl="nacht"] .eenheid b { color: var(--k); text-shadow: 0 0 14px color-mix(in srgb, var(--k) 60%, transparent); }

/* ---------- Plusknop ---------- */

.fab {
  position: fixed;
  z-index: 5;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: var(--knop-achter);
  color: var(--knop-inkt);
  font-size: 38px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
html[data-stijl="schetsboek"] .fab { border: 2.5px solid var(--lijn); border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%; font-family: var(--font-kop); box-shadow: 3px 4px 0 rgba(58, 47, 37, .25); }
html[data-stijl="waterverf"] .fab { background: var(--k3); color: #fff; }

/* ---------- Dialogen ---------- */

dialog {
  border: 0;
  padding: 0;
  color: var(--inkt);
  background: var(--papier);
}
dialog::backdrop { background: rgba(20, 16, 30, .4); }

.blad {
  width: min(560px, 100%);
  max-width: 100%;
  max-height: 92dvh;
  margin: auto auto 0;
  border-radius: 24px 24px 0 0;
  overscroll-behavior: contain;
}
@media (min-width: 640px) {
  .blad { margin: auto; border-radius: 24px; }
}
.blad.klein { width: min(420px, 100%); }
.blad[open] { animation: omhoog .22s ease-out; }
@keyframes omhoog { from { transform: translateY(30px); opacity: 0; } }

.blad-inhoud { padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.blad h2 { font-size: 26px; color: var(--kop); }
.blad h3 { font-size: 19px; margin-top: 6px; }
.uitleg { margin: 0; color: var(--zacht); font-size: 15px; }
.uitleg.klein { font-size: 13.5px; }

html[data-stijl="schetsboek"] .blad { border: 2.5px solid var(--lijn); border-bottom: 0; }
html[data-stijl="schetsboek"] .blad h2 { font-weight: 400; text-transform: uppercase; }

.veld { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--zacht); border: 0; padding: 0; margin: 0; min-width: 0; }
.veld legend { padding: 0; margin-bottom: 6px; }
.veld input:not([type="checkbox"]):not([type="radio"]),
.blad input[name="antwoord"] {
  font-size: 17px;
  color: var(--inkt);
  background: var(--achter);
  border: 1.5px solid var(--lijn);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  min-height: 46px;
}
.veld input:focus-visible, .blad input:focus-visible { outline: 2px solid var(--kop); outline-offset: 1px; }
.rij { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }

.emoji-rij { display: flex; gap: 10px; align-items: flex-start; }
.emoji-rij .emoji-invoer { width: 64px !important; flex: none; text-align: center; font-size: 26px !important; padding: 4px !important; }
.emoji-keuze { display: flex; flex-wrap: wrap; gap: 2px; }
.emoji-keuze button { border: 0; background: none; font-size: 24px; width: 40px; height: 40px; border-radius: 10px; padding: 0; }
.emoji-keuze button:hover { background: var(--achter); }

.schakel { display: flex; gap: 10px; align-items: center; font-size: 16px; }
.schakel input { width: 22px; height: 22px; accent-color: var(--kop); flex: none; }

.kleuren { display: flex; flex-wrap: wrap; gap: 10px; }
.kleur { position: relative; }
.kleur input { position: absolute; opacity: 0; }
.kleur span { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--k); border: 3px solid var(--papier); box-shadow: 0 0 0 1.5px var(--lijn); }
.kleur input:checked + span { box-shadow: 0 0 0 3px var(--inkt); }
.kleur input:focus-visible + span { outline: 2px solid var(--kop); outline-offset: 4px; }

.feest-keuze { display: flex; flex-wrap: wrap; gap: 8px; }
.feest-chip input { position: absolute; opacity: 0; }
.feest-chip span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--lijn); color: var(--inkt); font-size: 15px; }
.feest-chip input:checked + span { background: var(--knop-achter); color: var(--knop-inkt); border-color: var(--knop-achter); }
.feest-chip input:focus-visible + span { outline: 2px solid var(--kop); outline-offset: 2px; }

.knoppen { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 6px; }
.knoppen.links { justify-content: flex-start; margin-top: 0; }
.vul { flex: 1; }
.knop {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--lijn);
  background: var(--papier);
  color: var(--inkt);
}
.knop.hoofd { background: var(--knop-achter); color: var(--knop-inkt); border-color: var(--knop-achter); }
.knop.gevaar { color: #c62f3a; border-color: currentColor; background: transparent; }
.knop.klein { min-height: 36px; padding: 4px 12px; align-self: flex-start; margin-top: 8px; font-size: 15px; }
html[data-stijl="schetsboek"] .knop { border-width: 2px; border-color: var(--lijn); border-radius: 14px 10px 16px 9px / 10px 15px 9px 14px; }
html[data-stijl="schetsboek"] .knop.gevaar { border-color: #c62f3a; }
[hidden] { display: none !important; }

/* Tabbladen in het blad 'nieuw' */
.tabs { display: flex; gap: 4px; margin: 18px 20px 0; padding: 4px; border-radius: 14px; background: var(--achter); }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--zacht); font-family: var(--font-kop); font-size: 17px; }
.tabs button[aria-selected="true"] { background: var(--papier); color: var(--kop); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
html[data-stijl="schetsboek"] .tabs button { font-size: 19px; text-transform: uppercase; }
html[data-stijl="schetsboek"] .tabs button[aria-selected="true"] { border: 2px solid var(--lijn); border-radius: 12px 8px 13px 7px / 8px 12px 7px 13px; box-shadow: none; }

/* Jubileum */
.veld select {
  font-size: 17px;
  color: var(--inkt);
  background: var(--achter);
  border: 1.5px solid var(--lijn);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 46px;
}
.feest-chip small { opacity: .65; margin-left: 2px; }
.jub-datums { display: flex; flex-direction: column; gap: 12px; }
.jub-datum { display: grid; grid-template-columns: 1fr 1fr 42px; gap: 8px; align-items: center; }
.jub-datum .jub-naam { grid-column: 1 / 3; }
.jub-datum .jub-tijd { grid-column: 2 / 4; }
.jub-datum input {
  font-size: 17px;
  color: var(--inkt);
  background: var(--achter);
  border: 1.5px solid var(--lijn);
  border-radius: 12px;
  padding: 8px 10px;
  min-height: 44px;
  width: 100%;
  min-width: 0;
}
.jub-datums .jub-datum:only-child [data-weg] { visibility: hidden; }
.jub-tabel-wrap { max-height: 50dvh; overflow: auto; border: 1.5px solid var(--lijn); border-radius: 14px; }
.jub-tabel { width: 100%; border-collapse: collapse; font-size: 15px; }
.jub-tabel th { position: sticky; top: 0; z-index: 1; background: var(--achter); text-align: left; font-weight: 600; font-size: 13px; color: var(--zacht); padding: 8px 6px; }
.jub-tabel td { padding: 9px 6px; border-top: 1px solid var(--lijn); vertical-align: top; cursor: pointer; }
.jub-tabel td:first-child, .jub-tabel th:first-child { width: 34px; padding-left: 10px; }
.jub-tabel td:last-child { white-space: nowrap; color: var(--zacht); padding-right: 10px; }
.jub-tabel input { width: 20px; height: 20px; accent-color: var(--kop); margin: 0; }
.jub-tabel b { font-family: var(--font-cijfer); font-size: 17px; }
.jub-tabel small { color: var(--zacht); }
.jub-tabel tr:has(input:checked) td { background: color-mix(in srgb, var(--kop) 9%, transparent); }
.jub-tabel tr.al td { opacity: .5; cursor: default; }
.jub-soort { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 12px; background: var(--achter); color: var(--zacht); vertical-align: 1px; }
.soort-rond .jub-soort { background: color-mix(in srgb, var(--k5) 22%, transparent); }
.soort-herhalend .jub-soort { background: color-mix(in srgb, var(--k0) 22%, transparent); }
.soort-reeks .jub-soort { background: color-mix(in srgb, var(--k1) 30%, transparent); }
.verborgen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Profielen */
.profielen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.profielen li { display: flex; gap: 8px; align-items: center; }
.profiel-naam {
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--lijn);
  background: var(--papier);
}
.profiel-naam span { font-size: 18px; overflow: hidden; text-overflow: ellipsis; }
.profiel-naam small { color: var(--zacht); font-size: 13.5px; }
.profielen li.actief .profiel-naam { border-color: var(--kop); box-shadow: inset 0 0 0 1.5px var(--kop); }

/* Stijlkeuze: elke kaart draagt zijn eigen data-stijl en laat dus zichzelf zien. */
.stijlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stijl-kaart {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 16px;
  border: 2px solid var(--lijn);
  background: var(--achter);
  color: var(--inkt);
  font-family: var(--font-tekst);
}
.stijl-kaart[aria-pressed="true"] { outline: 3px solid var(--kop); outline-offset: 2px; }
.stijl-voorbeeld { display: flex; align-items: center; justify-content: space-between; background: var(--papier); border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; }
.stijl-cijfer { font-family: var(--font-cijfer); font-size: 30px; line-height: 1; color: var(--kop); }
.stijl-stippen { display: grid; grid-template-columns: repeat(2, 12px); gap: 4px; }
.stijl-stippen i { width: 12px; height: 12px; border-radius: 50%; background: var(--k0); }
.stijl-stippen i:nth-child(2) { background: var(--k1); }
.stijl-stippen i:nth-child(3) { background: var(--k2); }
.stijl-stippen i:nth-child(4) { background: var(--k3); }
.stijl-naam { font-family: var(--font-kop); font-size: 18px; }
.stijl-kaart small { color: var(--zacht); font-size: 13px; }

/* ---------- Grote weergave ---------- */

.groot {
  --k: var(--k0);
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: auto;
  background: var(--achter);
}
.groot-inhoud {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: calc(60px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.groot .sluit { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); font-size: 18px; }
.groot-emoji { font-size: 84px; line-height: 1; }
.groot-titel { font-size: clamp(30px, 8vw, 54px); color: var(--kop); line-height: 1.1; overflow-wrap: anywhere; }
html[data-stijl="schetsboek"] .groot-titel { font-weight: 400; text-transform: uppercase; }
.groot-teller { width: min(640px, 100%); grid-template-columns: repeat(2, 1fr); gap: 12px; }
.groot-teller .eenheid { background: var(--papier); padding: 18px 6px 12px; border-radius: var(--hoek); }
.groot-teller .eenheid b,
.groot-teller .eenheid.dagen b { font-size: clamp(54px, 17vw, 104px); }
.groot-teller .eenheid small { font-size: 17px; }
.groot-teller .eenheid.dagen { background: color-mix(in srgb, var(--k) 25%, var(--papier)); }
@media (min-width: 700px) { .groot-teller { grid-template-columns: repeat(4, 1fr); } }
html[data-stijl="schetsboek"] .groot-teller .eenheid { border: 2px solid var(--lijn); }
html[data-stijl="nacht"] .groot-teller .eenheid { border: 1px solid color-mix(in srgb, var(--k) 45%, transparent); }
.groot-hoera { align-items: center; }
.groot-hoera strong { font-size: clamp(44px, 13vw, 90px); }
.groot-datum { margin: 0; color: var(--zacht); font-size: 17px; }
.groot .knoppen { justify-content: center; }

/* ---------- Feest ---------- */

#feestCanvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1000; }
.feest-laag { position: fixed; inset: 0; pointer-events: none; z-index: 1001; display: grid; place-items: start center; padding-top: calc(70px + env(safe-area-inset-top)); }

.feest-banner {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: min(92vw, 440px);
  padding: 16px 26px;
  text-align: center;
  background: var(--papier);
  color: var(--inkt);
  border-radius: var(--hoek);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
  animation: plop .5s cubic-bezier(.2, 1.6, .4, 1);
  transition: opacity .5s, transform .5s;
}
.feest-banner.weg { opacity: 0; transform: translateY(-20px); }
.feest-banner-emoji { font-size: 46px; line-height: 1.1; }
.feest-banner strong { font-family: var(--font-kop); font-size: 28px; color: var(--kop); overflow-wrap: anywhere; }
html[data-stijl="schetsboek"] .feest-banner { border: 2.5px solid var(--lijn); }
html[data-stijl="schetsboek"] .feest-banner strong { font-weight: 400; text-transform: uppercase; }
@keyframes plop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tegel.soort-feest, .tegel.bijna { animation: none; }
}
