html {
    min-height: 100%;
    background-color: #241810;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    font-family: Arial, sans-serif;
}

.studiekamer {
    position: relative;
    width: min(100vw, calc(100vh * 1672 / 941));
    width: min(100vw, calc(100dvh * 1672 / 941));
    aspect-ratio: 1672 / 941;
    background-image: url("studiekamer.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.studiekamer.is-licht {
    background-image: url("studiekamer-uil-middag.png");
}

.studiekamer.is-eenhoorn {
    background-image: url("studiekamer-eenhoorn.png");
}

.studiekamer.is-eenhoorn.is-licht {
    background-image: url("studiekamer-eenhoorn-middag.png");
}

.studiekamer.is-beer {
    background-image: url("studiekamer-beer.png");
}

.studiekamer.is-beer.is-licht {
    background-image: url("studiekamer-beer-middag.png");
}

.studiekamer.is-kat {
    background-image: url("studiekamer-kat.png");
}

.studiekamer.is-kat.is-licht {
    background-image: url("studiekamer-kat-middag.png");
}

.studiekamer.is-vos {
    background-image: url("studiekamer-vos.png");
}

.studiekamer.is-vos.is-licht {
    background-image: url("studiekamer-vos-middag.png");
}

.matchaStoom {
    display: none;
    position: absolute;
    left: 34.3%;
    top: 45.8%;
    width: 6.2%;
    height: 15.4%;
    overflow: visible;
    pointer-events: none;
    fill: none;
    stroke: #fff5e7;
    stroke-width: 4;
    stroke-linecap: round;
    filter: blur(2px);
}

.studiekamer.is-vos .matchaStoom { display: block; }

.matchaStoom path {
    opacity: 0;
    transform-origin: 50px 150px;
    animation: matchaDamp 5.5s ease-in-out infinite;
}

.matchaStoom path:nth-child(2) { animation-delay: -1.8s; }
.matchaStoom path:nth-child(3) { animation-delay: -3.6s; }

@keyframes matchaDamp {
    0% { opacity: 0; transform: translate(0, 8px) scale(.75, .65); }
    25% { opacity: .25; }
    55% { opacity: .18; }
    100% { opacity: 0; transform: translate(8px, -25px) scale(1.15, 1.1); }
}

@media (prefers-reduced-motion: reduce) {
    .matchaStoom path { animation: none; opacity: .1; }
}

.studiekamer.is-eenhoorn .kopje,
.studiekamer.is-beer .kopje,
.studiekamer.is-kat .kopje,
.studiekamer.is-vos .kopje {
    top: 51.54%;
}

.kopje {
    position: absolute;
    left: 36.42%;
    top: 55.15%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.uil {
    position: absolute;
    left: 22.37%;
    top: 44.63%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.raam {
    position: absolute;
    left: 71.23%;
    top: 16.47%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.muziek {
    position: absolute;
    left: 84.69%;
    top: 74.28%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.takenlijst {
    position: absolute;
    left: 85.77%;
    top: 49.84%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.zon {
    position: absolute;
    left: 12.14%;
    top: 29.01%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.tools {
    position: absolute;
    left: 7.5%;
    top: 61.5%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.studiehoekKeuze {
    position: absolute;
    left: 27%;
    top: 80%;
    width: 3.95%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

#studiehoekKnop,
#toolsKnop {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 2px solid rgb(255 244 228 / 75%);
    border-radius: 50%;
    background: rgb(30 26 24 / 75%);
    color: #fff4e4;
    cursor: pointer;
}

#studiehoekKnop svg,
#toolsKnop svg { width: 50%; height: 50%; }

#zonKnop,
#takenlijstKnop,
#muziekKnop,
#kopjeKnop,
#uilKnop,
#raamKnop {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

#studiehoekKnop:hover,
#studiehoekKnop:focus-visible,
#toolsKnop:hover,
#toolsKnop:focus-visible,
#zonKnop:hover,
#zonKnop:focus-visible,
#takenlijstKnop:hover,
#takenlijstKnop:focus-visible,
#kopjeKnop:hover,
#kopjeKnop:focus-visible,
#uilKnop:hover,
#uilKnop:focus-visible,
#raamKnop:hover,
#raamKnop:focus-visible,
#muziekKnop:hover,
#muziekKnop:focus-visible {
    outline: 3px solid #ffe0ac;
    outline-offset: 3px;
    background: rgb(255 224 172 / 15%);
}

#studiehoekOpties,
#studiehoekBericht,
#toolsOpties,
#toolsBericht,
#zonBericht,
#takenlijstBericht,
#kopjeBericht,
#uilBericht,
#raamBericht,
#muziekBericht,
#uilOpties,
#muziekOpties,
#kopjeOpties {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    width: max-content;
    max-width: min(270px, 65vw);
    margin: 0;
    padding: 14px 18px;
    border-radius: 16px;
    background: #fff4e4;
    color: #422b1d;
    box-shadow: 0 6px 24px rgb(0 0 0 / 25%);
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

#studiehoekBericht,
#toolsBericht,
#zonBericht,
#takenlijstBericht,
#kopjeBericht,
#uilBericht,
#raamBericht,
#muziekBericht {
    visibility: hidden;
    pointer-events: none;
}

.studiehoekKeuze:not(.is-open):hover #studiehoekBericht,
.studiehoekKeuze:not(.is-open):has(#studiehoekKnop:focus-visible) #studiehoekBericht,
.tools:not(.is-open):hover #toolsBericht,
.tools:not(.is-open):has(#toolsKnop:focus-visible) #toolsBericht,
.zon:hover #zonBericht,
.zon:has(#zonKnop:focus-visible) #zonBericht,
.takenlijst:hover #takenlijstBericht,
.takenlijst:has(#takenlijstKnop:focus-visible) #takenlijstBericht,
.kopje:not(.is-open):hover #kopjeBericht,
.kopje:not(.is-open):has(#kopjeKnop:focus-visible) #kopjeBericht,
.uil:not(.is-open):hover #uilBericht,
.uil:not(.is-open):has(#uilKnop:focus-visible) #uilBericht,
.raam:hover #raamBericht,
.raam:has(#raamKnop:focus-visible) #raamBericht,
.muziek:not(.is-open):hover #muziekBericht,
.muziek:not(.is-open):has(#muziekKnop:focus-visible) #muziekBericht {
    visibility: visible;
}

#kopjeOpties,
#muziekOpties,
#uilOpties {
    border: 0;
    width: 270px;
    min-width: 0;
    max-height: 45dvh;
    overflow-y: auto;
    text-align: left;
}

.uil.is-open,
.muziek.is-open,
.kopje.is-open {
    z-index: 1;
}

#muziekOpties {
    bottom: calc(100% - 18px);
    left: auto;
    right: 0;
    transform: none;
    max-height: min(60dvh, 36vw);
}

.studiekamer.is-donker #muziekOpties {
    top: calc(100% + 14px);
    bottom: auto;
    max-height: min(55dvh, 34cqw);
}

#muziekTitel {
    margin: 0 0 8px;
    font-weight: bold;
}

.spotifyUitleg {
    margin: 0 0 12px;
    font-size: 13px;
}

#regenTitel,
#lofiTitel {
    margin: 12px 0 8px;
    font-size: 14px;
}

#regenGeluid,
#lofiGeluid {
    display: block;
    width: 100%;
    margin-bottom: 14px;
}

#muziekOpties a {
    color: inherit;
    text-decoration: none;
}

#muziekOpties a:focus-visible {
    outline: 2px solid #805631;
    outline-offset: 2px;
}

#uilOpties {
    top: calc(100% + 14px);
    bottom: auto;
    left: 0;
    transform: none;
    max-width: 70vw;
    max-height: min(45dvh, 27vw);
}

#kopjeOpties legend,
.buddyNaamWijzigen:not([hidden]) { display: block; width: 100%; margin-top: 12px; padding: 10px 12px; border: 1px solid #d9b990; border-radius: 8px; background: #fff4e4; color: #422b1d; font: inherit; text-align: left; cursor: pointer; }
.buddyNaamWijzigen:focus-visible { outline: 2px solid #805631; outline-offset: 2px; }
#uilOpties legend {
    float: left;
    width: 100%;
    padding: 0;
    margin-bottom: 12px;
    font-weight: bold;
}

.studiekeuze {
    position: relative;
    clear: both;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #d9b990;
    border-radius: 10px;
    cursor: pointer;
}

.studiekeuze:hover,
.studiekeuze:has(input:checked) {
    background: #f3ddbd;
}

.studiekeuze input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.studiekeuze:has(input:focus-visible) {
    outline: 2px solid #805631;
    outline-offset: 2px;
}

#studiehoekBericht::after,
#toolsBericht::after,
#zonBericht::after,
#takenlijstBericht::after,
#kopjeBericht::after,
#uilBericht::after,
#raamBericht::after,
#muziekBericht::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: #fff4e4;
}

.studiekamer { container-type: inline-size; }
.laptop {
    position: absolute;
    left: 44.5%;
    top: 40.7%;
    width: 21.2%;
    height: 23.5%;
    display: grid;
    place-items: center;
    border-radius: .3cqw;
    background: rgb(15 24 34 / 48%);
    color: #fff4e4;
    text-align: center;
    pointer-events: none;
}

.welkom {
    position: absolute;
    top: 3%;
    left: 3%;
    z-index: 2;
    box-sizing: border-box;
    max-width: min(420px, 80%);
    padding: clamp(10px, 1.2cqw, 20px);
    border: 1px solid rgb(255 244 228 / 18%);
    border-radius: 14px;
    background: rgb(36 24 16 / 75%);
    color: #fff4e4;
    backdrop-filter: blur(8px);
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

#begroetingWeergave:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 8px;
}

#begroetingTekst {
    min-width: 0;
    margin: 0;
    font-size: clamp(18px, 2cqw, 32px);
    font-weight: 300;
    overflow-wrap: anywhere;
}

#naamForm label { display: block; margin-bottom: 8px; }
.naamInvoer { display: flex; flex-wrap: wrap; gap: 8px; }
.welkom input, .welkom button {
    border: 1px solid #d9b990;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}
.welkom input { min-width: 0; width: 130px; flex: 1; background: #fff4e4; color: #422b1d; }
.welkom button { background: #fff4e4; color: #422b1d; cursor: pointer; }
#naamWijzigen { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 6px; border: 0; background: transparent; color: #ead3b5; }
.welkom button:hover { filter: brightness(1.1); }
.welkom :focus-visible { outline: 2px solid #ffe0ac; outline-offset: 3px; }

#huidigUur {
    font-family: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", sans-serif;
    font-size: 3.6cqw;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
    letter-spacing: .06em;
    line-height: 1;
    text-shadow: 0 2px 12px rgb(0 0 0 / 20%);
}



.tools.is-open { z-index: 3; }
#toolsOpties {
    left: 0;
    transform: none;
    width: 240px;
    max-width: 80vw;
    max-height: 48dvh;
    overflow-y: auto;
    text-align: left;
}
#toolsTitel { margin: 0 0 8px; font-weight: bold; }
#toolsOpties a { color: inherit; text-decoration: none; }
#toolsOpties a:focus-visible { outline: 2px solid #805631; outline-offset: 2px; }

.studiehoekKeuze.is-open { z-index: 3; }
#studiehoekOpties { border: 0; width: 230px; max-height: 45dvh; overflow-y: auto; text-align: left; }
#studiehoekOpties legend { float: left; width: 100%; margin-bottom: 10px; padding: 0; font-weight: bold; }
.studiekamer.is-donker {
    width: min(100vw, calc(100dvh * 1536 / 1024));
    aspect-ratio: 1536 / 1024;
    background-image: url("studiekamer-jongensversie.png");
}
.studiekamer.is-donker .laptop { left: 41.8%; top: 35.1%; width: 24%; height: 22.8%; transform: rotate(2deg); }
.studiekamer.is-donker .matchaStoom,
.studiekamer.is-donker .zon { display: none; }
.studiekamer.is-donker .tools { left: 25%; top: 47%; }
.studiekamer.is-donker .studiehoekKeuze { left: 55%; top: 78%; }
.studiekamer.is-donker .muziek { left: 76%; top: 35%; }
.studiekamer.is-donker .takenlijst { left: 90%; top: 61%; }
.studiekamer.is-donker .kopje { left: 88%; top: 35%; }
.studiekamer.is-donker .raam { left: 13%; top: 20%; }
.studiekamer.is-donker :is(#muziekKnop, #takenlijstKnop, #kopjeKnop, #raamKnop) {
    border: 2px solid rgb(255 244 228 / 75%);
    background: rgb(30 26 24 / 75%);
    color: #fff4e4;
    font-size: 2cqw;
}
.studiekamer.is-donker #muziekKnop::before { content: "♫"; }
.studiekamer.is-donker #takenlijstKnop::before { content: "☷"; }
.studiekamer.is-donker #kopjeKnop::before { content: "?"; }
.studiekamer.is-donker #raamKnop::before { content: "☕"; }

.studiekamer.is-donker.is-beer {
    background-image: url("studiekamer-jongensversie-beer.png");
}

.studiekamer.is-donker.is-vos {
    background-image: url("studiekamer-jongensversie-vos.png");
}

.studiekamer.is-donker .uil {
    left: 76%;
    top: 49%;
    width: 15%;
    height: 23%;
}
.studiekamer.is-donker #uilKnop { border-radius: 40%; }
.studiekamer.is-donker #uilOpties {
    left: 50%;
    transform: translateX(-50%);
    max-height: 33dvh;
}
.studiekamer.is-donker.is-kat {
    background-image: url("studiekamer-jongensversie-kat.png");
}

.studiekamer.is-donker.is-eenhoorn {
    background-image: url("studiekamer-jongensversie-eenhoorn%C2%B5.png");
}

.studiekamer.is-plantparent {
    background-image: url("studiekamer-plantparent.png");
}
.studiekamer.is-plantparent .laptop { left: 44.8%; top: 40.2%; width: 22.2%; height: 25.2%; transform: rotate(3deg); }
.studiekamer.is-plantparent .matchaStoom,
.studiekamer.is-plantparent .zon { display: none; }

.studiekamer.is-plantparent.is-vos {
    background-image: url("studiekamer-plantparent-vos.png");
}
.studiekamer.is-plantparent .uil {
    left: 31.5%;
    top: 56%;
    width: 13%;
    height: 25%;
}
.studiekamer.is-plantparent #uilKnop { border-radius: 40%; }
.studiekamer.is-plantparent #uilOpties {
    left: 50%;
    transform: translateX(-50%);
    max-height: 28dvh;
}
.studiekamer.is-plantparent.is-kat {
    background-image: url("studiekamer-plantparent-kat.png");
}

.studiekamer.is-plantparent.is-beer {
    background-image: url("studiekamer-plantparent-beer.png");
}

.studiekamer.is-plantparent.is-eenhoorn {
    background-image: url("studiekamer-plantparent-eenhoorn.png");
}
.studiekamer.is-plantparent .tools { left: 13%; top: 55%; }
.studiekamer.is-plantparent .studiehoekKeuze { left: 53%; top: 80%; }
.studiekamer.is-plantparent .muziek { left: 87%; top: 78%; }
.studiekamer.is-plantparent .takenlijst { left: 91%; top: 59%; }
.studiekamer.is-plantparent .kopje { left: 77%; top: 59%; }
.studiekamer.is-plantparent .raam { left: 13%; top: 19%; }
.studiekamer.is-plantparent :is(#muziekKnop, #takenlijstKnop, #kopjeKnop, #raamKnop) {
    border: 2px solid rgb(255 244 228 / 75%);
    background: rgb(30 40 24 / 75%);
    color: #fff4e4;
    font-size: 2cqw;
}
.studiekamer.is-plantparent #muziekKnop::before { content: "♫"; }
.studiekamer.is-plantparent #takenlijstKnop::before { content: "☷"; }
.studiekamer.is-plantparent #kopjeKnop::before { content: "?"; }
.studiekamer.is-plantparent #raamKnop::before { content: "☕"; }

.studiekamer.is-bib {
    background-image: url("studiekamer-bib-uil.png");
}
.studiekamer.is-bib.is-kat { background-image: url("studiekamer-bib.png"); }

.studiekamer.is-bib .matchaStoom,
.studiekamer.is-bib .zon { display: none; }
.studiekamer.is-bib .uil { left: 23.5%; top: 67%; width: 14%; height: 24%; }
.studiekamer.is-bib.is-kat .uil { left: 26%; top: 68%; width: 23%; height: 20%; }
.studiekamer.is-bib #uilKnop { border-radius: 35%; }
.studiekamer.is-bib #uilOpties { top: auto; bottom: calc(100% + 14px); max-height: 40dvh; }
.studiekamer.is-bib.is-beer {
    background-image: url("studiekamer-bib-beer.png");
}

.studiekamer.is-bib.is-vos {
    background-image: url("studiekamer-bib-vos.png");
}

.studiekamer.is-bib.is-eenhoorn {
    background-image: url("studiekamer-bib-eenhoorn.png");
}


.studiekamer.is-bib .tools { left: 91%; top: 64%; }
.studiekamer.is-bib .studiehoekKeuze { left: 52%; top: 91%; }
.studiekamer.is-bib .muziek { left: 65%; top: 88%; }
.studiekamer.is-bib .takenlijst { left: 83%; top: 80%; }
.studiekamer.is-bib .kopje { left: 78%; top: 47%; }
.studiekamer.is-bib .raam { left: 72%; top: 20%; }
.studiekamer.is-bib :is(#muziekKnop, #takenlijstKnop, #kopjeKnop, #raamKnop) {
    border: 2px solid rgb(255 244 228 / 75%);
    background: rgb(45 32 24 / 75%);
    color: #fff4e4;
    font-size: 2cqw;
}
.studiekamer.is-bib #muziekKnop::before { content: "♫"; }
.studiekamer.is-bib #takenlijstKnop::before { content: "☷"; }
.studiekamer.is-bib #kopjeKnop::before { content: "?"; }
.studiekamer.is-bib #raamKnop::before { content: "☕"; }
.studiekamer.is-bib #toolsOpties { left: auto; right: 0; }


/* Het originele beeld blijft even groot; alleen onderaan komt scrollruimte bij. */
body:not(.examenRust):has(.studiekamer:not(.is-donker, .is-plantparent, .is-bib, .is-academia, .is-geek, .is-halloween, .is-kat, .is-vos, .is-beer, .is-eenhoorn)) {
    align-items: start;
}
body:not(.examenRust) .studiekamer:not(.is-donker, .is-plantparent, .is-bib, .is-academia, .is-geek, .is-halloween, .is-kat, .is-vos, .is-beer, .is-eenhoorn) {
    margin-bottom: min(39.414vw, 70.032dvh);
}
body:not(.examenRust) .studiekamer:not(.is-donker, .is-plantparent, .is-bib, .is-academia, .is-geek, .is-halloween, .is-kat, .is-vos, .is-beer, .is-eenhoorn)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 39.414cqw;
    background: url("studiekamer-verlengd.png") center bottom / 100% auto no-repeat;
    pointer-events: none;
}

/* Eén middagbeeld voor het bureau en de stoel voorkomt een donkere naad. */
body:not(.examenRust) .studiekamer.is-licht:not(.is-donker, .is-plantparent, .is-bib, .is-academia, .is-geek, .is-halloween, .is-kat, .is-vos, .is-beer, .is-eenhoorn) {
    background-image: url("studiekamer-verlengd-middag.png");
    background-size: 100% auto;
    background-position: center top;
}

body:not(.examenRust) .studiekamer.is-licht:not(.is-donker, .is-plantparent, .is-bib, .is-academia, .is-geek, .is-halloween, .is-kat, .is-vos, .is-beer, .is-eenhoorn)::after {
    background-image: url("studiekamer-verlengd-middag.png");
    background-position: center -56.2799cqw;
}



.studiekamer.is-academia { background-image: url("dark%20academia.png"); }
.studiekamer.is-academia .laptop {
    left: 45.9%; top: 41%; width: 24%; height: 26.2%;
    transform: none;
    clip-path: polygon(7% 0, 100% 2%, 96% 100%, 0 93%);
}
.studiekamer.is-academia .matchaStoom,
.studiekamer.is-academia .zon,
.studiekamer.is-academia .uil { display: none; }
.studiekamer.is-academia .tools { left: 12%; top: 63%; }
.studiekamer.is-academia .studiehoekKeuze { left: 48%; top: 79%; }
.studiekamer.is-academia .muziek { left: 76%; top: 60%; }
.studiekamer.is-academia .takenlijst { left: 24%; top: 69%; }
.studiekamer.is-academia .kopje { left: 39%; top: 54%; }
.studiekamer.is-academia .raam { left: 85%; top: 21%; }
.studiekamer.is-academia :is(#muziekKnop, #takenlijstKnop, #kopjeKnop, #raamKnop) {
    border: 2px solid rgb(255 244 228 / 75%);
    background: rgb(35 24 18 / 75%);
    color: #fff4e4;
    font-size: 2cqw;
}
.studiekamer.is-academia #muziekKnop::before { content: "♫"; }
.studiekamer.is-academia #takenlijstKnop::before { content: "☷"; }
.studiekamer.is-academia #kopjeKnop::before { content: "?"; }
.studiekamer.is-academia #raamKnop::before { content: "☕"; }

.studiekamer:not(.is-donker, .is-plantparent, .is-bib, .is-academia, .is-geek, .is-halloween) #kopjeKnop {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    border: 2px solid rgb(255 244 228 / 75%);
    background: #302923;
    color: #fff4e4;
    font: 300 2cqw "Segoe UI", sans-serif;
}
.studiekamer:not(.is-donker, .is-plantparent, .is-bib, .is-academia, .is-geek, .is-halloween) #kopjeKnop::before {
    content: "?";
}

.studiekamer > #kopjeOpties {
    bottom: auto;
    transform: none;
    z-index: 5;
    width: 290px;
    max-width: calc(100% - 16px);
    max-height: min(400px, 43dvh);
    overflow: visible;
    border: 1px solid #d9b990;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 10px 32px rgb(0 0 0 / 28%);
}
.studiekamer > #kopjeOpties::after {
    content: "";
    position: absolute;
    left: var(--ballon-pijl, 50%);
    top: 100%;
    transform: translateX(-50%);
    border: 12px solid transparent;
    border-top-color: #fff4e4;
}
.studiekamer > #kopjeOpties legend { font-size: 16px; }
@media (max-height: 700px) {
    .studiekamer > #kopjeOpties { max-height: none; padding: 12px; }
    .studiekamer > #kopjeOpties .studiekeuze { margin-top: 5px; padding: 6px 10px; }
}

#eenhoornBallon {
    position: fixed;
    margin: 0;
    box-sizing: border-box;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    border: 1px solid #d6b4ca;
    border-radius: 24px 24px 24px 5px;
    padding: 22px;
    background: #fff4ed;
    color: #51354d;
    box-shadow: 0 12px 45px #25132855;
    font: 16px/1.5 'Segoe UI', sans-serif;
}
#eenhoornBallon::backdrop { background: rgb(27 17 24 / 22%); }
#eenhoornSluiten { float: right; width: 44px; padding: 0; }
#eenhoornTekst { clear: both; margin: 8px 0 16px; }
#eenhoornNaamForm label { display: block; margin-bottom: 6px; }
#eenhoornNaam { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #caa8bf; border-radius: 10px; font: inherit; background: #fffdfa; color: inherit; }
#eenhoornBallon button { min-height: 44px; margin-top: 8px; border: 1px solid #caa8bf; border-radius: 10px; background: #f4dce9; color: inherit; padding: 8px 12px; font: inherit; cursor: pointer; }
#eenhoornWisselen { background: transparent; font-size: 14px; }
#eenhoornReactie:empty { display: none; }
#eenhoornBallon :focus-visible { outline: 2px solid #805878; outline-offset: 2px; }
@media (max-width: 700px), (pointer: coarse) {
    #eenhoornBallon { margin: auto; }
}

#eenhoornBallon { inset: 0; margin: auto; }

#eenhoornHulp {
    box-sizing: border-box;
    width: min(440px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid #d6b4ca;
    border-radius: 24px 24px 24px 5px;
    background: #fff4ed;
    color: #51354d;
    box-shadow: 0 12px 45px #25132855;
    font: 16px/1.6 'Segoe UI', sans-serif;
}
#eenhoornHulp::backdrop { background: rgb(27 17 24 / 35%); }
#eenhoornHulp h2 { clear: both; margin-bottom: 0; font-size: 24px; }
#hulpBuddyNaam { margin-top: 4px; font-size: 14px; color: #78526d; }
#eenhoornHulp button { display: block; width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 12px; border: 1px solid #caa8bf; border-radius: 12px; background: #f4dce9; color: inherit; font: inherit; cursor: pointer; text-align: left; }
#eenhoornHulp #hulpSluiten { width: auto; margin: 0 0 10px auto; }
#gekozenKleineStap { padding: 14px; border-radius: 12px; background: #f4dce9; font-weight: 600; }
#eenhoornHulp :focus-visible { outline: 2px solid #805878; outline-offset: 3px; }

#stressNotitie { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid #caa8bf; border-radius: 10px; background: #fffdfa; color: #51354d; font: inherit; resize: vertical; }
#stressPrivacy { font-size: 13px; color: #78526d; }

.kaars { position: absolute; left: 9%; top: 58%; width: 5%; height: 11%; }
#kaarsKnop { width: 100%; height: 100%; background: transparent; border: 0; border-radius: 35%; cursor: pointer; }
#kaarsKnop:hover, #kaarsKnop:focus-visible { outline: 2px solid #ffe0ac; outline-offset: 3px; background: #ffe0ac20; }
#kaarsSpreuk { position: absolute; bottom: calc(100% + 14px); left: 0; width: max-content; max-width: min(280px, 75vw); box-sizing: border-box; padding: 14px 18px; margin: 0; border-radius: 16px; background: #fff4e4; color: #422b1d; box-shadow: 0 6px 24px #0004; font: 16px/1.5 Georgia, serif; overflow-wrap: anywhere; white-space: pre-wrap; visibility: hidden; pointer-events: none; }
.kaars:hover, .kaars:focus-within { z-index: 4; }
.kaars:hover #kaarsSpreuk, .kaars:has(:focus-visible) #kaarsSpreuk { visibility: visible; }
#kaarsSpreuk::after { content: ''; position: absolute; top: 100%; left: 20px; border: 9px solid transparent; border-top-color: #fff4e4; }
.studiekamer.is-plantparent .kaars { left: 20%; top: 54%; width: 7%; height: 15%; }
.studiekamer.is-academia .kaars { left: 15%; top: 59%; width: 5%; height: 12%; }
.studiekamer.is-donker .kaars { left: 96%; top: 0; width: 4%; height: 5%; }
.studiekamer.is-donker #kaarsSpreuk { top: calc(100% + 14px); bottom: auto; left: auto; right: 0; }
.studiekamer.is-donker #kaarsSpreuk::after { top: auto; bottom: 100%; left: auto; right: 12px; border-top-color: transparent; border-bottom-color: #fff4e4; }
.studiekamer.is-bib .kaars { display: none; }
#spreukVenster { box-sizing: border-box; width: min(400px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px; border: 1px solid #d9b990; border-radius: 20px; background: #fff4e4; color: #422b1d; }
#spreukVenster::backdrop { background: #18100a88; }
#spreukTitel { margin-top: 0; }
#spreukInvoer { display: block; box-sizing: border-box; width: 100%; margin-top: 12px; padding: 12px; border: 1px solid #c9a678; border-radius: 10px; font: 16px/1.5 'Segoe UI', sans-serif; resize: vertical; }
#spreukForm button { min-height: 44px; padding: 10px 14px; border: 1px solid #c9a678; border-radius: 10px; background: #f3ddbd; color: inherit; font: inherit; cursor: pointer; }
#spreukForm :focus-visible { outline: 2px solid #805631; outline-offset: 3px; }

#uilBallon { box-sizing: border-box; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid #b8b795; border-radius: 22px 22px 22px 5px; background: #f8f5e9; color: #434932; box-shadow: 0 12px 45px #251e1655; font: 16px/1.7 'Segoe UI', sans-serif; }
#uilBallon::backdrop { background: rgb(27 25 17 / 25%); }
#uilVoorstelling { clear: both; font: 22px/1.5 Georgia, serif; }
#uilBallon button { min-height: 44px; margin-top: 10px; padding: 8px 12px; border: 1px solid #b8b795; border-radius: 10px; background: #e7e8d6; color: inherit; font: inherit; cursor: pointer; }
#uilSluiten { display: block; margin-left: auto; }
#uilNaamInvoer { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #b8b795; border-radius: 10px; font: inherit; color: inherit; background: #fffdf6; }
#uilNaamReactie:empty { display: none; }
#uilBallon :focus-visible { outline: 2px solid #61704d; outline-offset: 3px; }

/* Geek: plaats de bediening bij de voorwerpen in deze kamer. */
.studiekamer.is-geek { background-image: url("studiekamer-geek.png"); }
.studiekamer.is-geek .laptop {
    left: 31.8%; top: 43.4%; width: 23.7%; height: 25.9%;
    transform: none;
    clip-path: polygon(0 2%, 91% 0, 100% 93%, 4% 100%);
}
.studiekamer.is-geek .matchaStoom,
.studiekamer.is-geek .zon,
.studiekamer.is-geek .uil { display: none; }
.studiekamer.is-geek .tools { left: 9%; top: 48%; }
.studiekamer.is-geek .studiehoekKeuze { left: 51%; top: 83%; }
.studiekamer.is-geek .muziek { left: 79%; top: 69%; }
.studiekamer.is-geek .takenlijst { left: 26%; top: 81%; }
.studiekamer.is-geek .kopje { left: 64%; top: 56%; }
.studiekamer.is-geek .raam { left: 91%; top: 28%; }
.studiekamer.is-geek .kaars { left: 70%; top: 51%; width: 4.5%; height: 9%; }
.studiekamer.is-geek :is(#muziekKnop, #takenlijstKnop, #kopjeKnop, #raamKnop) {
    border: 2px solid rgb(255 244 228 / 75%);
    background: rgb(35 24 18 / 75%);
    color: #fff4e4;
    font-size: 2cqw;
}
.studiekamer.is-geek #muziekKnop::before { content: "♫"; }
.studiekamer.is-geek #takenlijstKnop::before { content: "☷"; }
.studiekamer.is-geek #kopjeKnop::before { content: "?"; }
.studiekamer.is-geek #raamKnop::before { content: "☕"; }

#geekLampKnop { display: none; }
.studiekamer.is-geek #geekLampKnop {
    display: block;
    position: absolute;
    left: 8%; top: 25%; width: 12%; height: 19%;
    border: 0; border-radius: 40%; background: transparent;
    cursor: pointer;
}
.studiekamer.is-geek #geekLampKnop:hover,
.studiekamer.is-geek #geekLampKnop:focus-visible {
    outline: 2px solid #ffe0ac; outline-offset: 3px;
    background: #ffe0ac18;
}
.studiekamer.is-geek.is-middernacht { background-image: url("studiekamer-geek-middernacht.png"); }
.studiekamer.is-geek.is-middernacht #geekLampKnop {
    left: 69%; top: 42%; width: 7%; height: 23%;
}
.studiekamer.is-geek.is-middernacht .laptop {
    left: 36.3%; top: 46.5%; width: 22.5%; height: 25%;
    clip-path: polygon(0 1%, 93% 0, 100% 95%, 3% 100%);
}
.studiekamer.is-geek.is-middernacht .tools { left: 9%; top: 53%; }
.studiekamer.is-geek.is-middernacht .kopje { left: 28%; top: 57%; }
.studiekamer.is-geek.is-middernacht .takenlijst { left: 19%; top: 82%; }
.studiekamer.is-geek.is-middernacht .kaars { left: 59%; top: 50%; width: 4.5%; height: 10%; }

#katBallon { box-sizing: border-box; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid #c6afa0; border-radius: 22px 22px 22px 5px; background: #faf1e9; color: #51443e; box-shadow: 0 12px 45px #251e1655; font: 16px/1.7 'Segoe UI', sans-serif; }
#katBallon::backdrop { background: rgb(27 25 17 / 25%); }
#katVoorstelling { clear: both; font: 22px/1.5 Georgia, serif; }
#katBallon button { min-height: 44px; margin-top: 10px; padding: 8px 12px; border: 1px solid #c6afa0; border-radius: 10px; background: #efdfd3; color: inherit; font: inherit; cursor: pointer; }
#katSluiten { display: block; margin-left: auto; }
#katNaamInvoer { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #c6afa0; border-radius: 10px; font: inherit; color: inherit; background: #fffdf6; }
#katNaamReactie:empty { display: none; }
#katBallon :focus-visible { outline: 2px solid #896653; outline-offset: 3px; }

#katHulp {
    box-sizing: border-box; width: min(440px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px); overflow-y: auto;
    padding: 24px; border: 1px solid #c6afa0; border-radius: 24px 24px 24px 5px;
    background: #faf1e9; color: #51443e; box-shadow: 0 12px 45px #251e1655;
    font: 16px/1.6 'Segoe UI', sans-serif;
}
#katHulp::backdrop { background: rgb(27 25 17 / 35%); }
#katHulp h2 { clear: both; font: 24px/1.4 Georgia, serif; margin-bottom: 0; }
#katHulpNaam, #katTakenTip { font-size: 14px; color: #756257; }
#katHulp button {
    display: block; width: 100%; min-height: 44px; margin-top: 10px;
    padding: 10px 12px; border: 1px solid #c6afa0; border-radius: 12px;
    background: #efdfd3; color: inherit; font: inherit; text-align: left;
    cursor: pointer; overflow-wrap: anywhere;
}
#katHulp #katHulpSluiten { width: auto; margin: 0 0 10px auto; }
#katHulp :is(textarea, input) {
    box-sizing: border-box; display: block; width: 100%; min-height: 44px;
    margin-top: 8px; padding: 12px; border: 1px solid #c6afa0; border-radius: 10px;
    background: #fffdf6; color: inherit; font: inherit;
}
#katHulp textarea { resize: vertical; }
#katGekozenTaak, #katEersteStap { padding: 14px; border-radius: 12px; background: #efdfd3; overflow-wrap: anywhere; }
#katHulp :focus-visible { outline: 2px solid #896653; outline-offset: 3px; }

#vosBallon { box-sizing: border-box; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid #cfaa87; border-radius: 22px 22px 22px 5px; background: #fff3e5; color: #51443e; box-shadow: 0 12px 45px #251e1655; font: 16px/1.7 'Segoe UI', sans-serif; }
#vosBallon::backdrop { background: rgb(27 25 17 / 25%); }
#vosVoorstelling { clear: both; font: 22px/1.5 Georgia, serif; }
#vosBallon button { min-height: 44px; margin-top: 10px; padding: 8px 12px; border: 1px solid #cfaa87; border-radius: 10px; background: #f5ddc3; color: inherit; font: inherit; cursor: pointer; }
#vosSluiten { display: block; margin-left: auto; }
#vosNaamInvoer { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #cfaa87; border-radius: 10px; font: inherit; color: inherit; background: #fffdf6; }
#vosNaamReactie:empty { display: none; }
#vosBallon :focus-visible { outline: 2px solid #896653; outline-offset: 3px; }

#vosHulp {
    box-sizing: border-box; width: min(440px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px); overflow-y: auto;
    padding: 24px; border: 1px solid #cfaa87; border-radius: 24px 24px 24px 5px;
    background: #fff3e5; color: #51443e; box-shadow: 0 12px 45px #251e1655;
    font: 16px/1.6 'Segoe UI', sans-serif;
}
#vosHulp::backdrop { background: rgb(27 25 17 / 35%); }
#vosHulp h2 { clear: both; font: 24px/1.4 Georgia, serif; margin-bottom: 0; }
#vosHulpNaam, #vosTakenTip { font-size: 14px; color: #756257; }
#vosHulp button {
    display: block; width: 100%; min-height: 44px; margin-top: 10px;
    padding: 10px 12px; border: 1px solid #cfaa87; border-radius: 12px;
    background: #f5ddc3; color: inherit; font: inherit; text-align: left;
    cursor: pointer; overflow-wrap: anywhere;
}
#vosHulp #vosHulpSluiten { width: auto; margin: 0 0 10px auto; }
#vosHulp :is(textarea, input) {
    box-sizing: border-box; display: block; width: 100%; min-height: 44px;
    margin-top: 8px; padding: 12px; border: 1px solid #cfaa87; border-radius: 10px;
    background: #fffdf6; color: inherit; font: inherit;
}
#vosHulp textarea { resize: vertical; }
#vosGekozenTaak, #vosEersteStap { padding: 14px; border-radius: 12px; background: #f5ddc3; overflow-wrap: anywhere; }
#vosHulp :focus-visible { outline: 2px solid #896653; outline-offset: 3px; }

#beerBallon { box-sizing: border-box; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid #bea383; border-radius: 22px 22px 22px 5px; background: #faf2e5; color: #51443e; box-shadow: 0 12px 45px #251e1655; font: 16px/1.7 'Segoe UI', sans-serif; }
#beerBallon::backdrop { background: rgb(27 25 17 / 25%); }
#beerVoorstelling { clear: both; font: 22px/1.5 Georgia, serif; }
#beerBallon button { min-height: 44px; margin-top: 10px; padding: 8px 12px; border: 1px solid #bea383; border-radius: 10px; background: #ebdcc5; color: inherit; font: inherit; cursor: pointer; }
#beerSluiten { display: block; margin-left: auto; }
#beerNaamInvoer { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #bea383; border-radius: 10px; font: inherit; color: inherit; background: #fffdf6; }
#beerNaamReactie:empty { display: none; }
#beerBallon :focus-visible { outline: 2px solid #896653; outline-offset: 3px; }

#beerHulp {
    box-sizing: border-box; width: min(440px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px); overflow-y: auto;
    padding: 24px; border: 1px solid #bea383; border-radius: 24px 24px 24px 5px;
    background: #faf2e5; color: #51443e; box-shadow: 0 12px 45px #251e1655;
    font: 16px/1.6 'Segoe UI', sans-serif;
}
#beerHulp::backdrop { background: rgb(27 25 17 / 35%); }
#beerHulp h2 { clear: both; font: 24px/1.4 Georgia, serif; margin-bottom: 0; }
#beerHulpNaam, #beerTakenTip { font-size: 14px; color: #756257; }
#beerHulp button {
    display: block; width: 100%; min-height: 44px; margin-top: 10px;
    padding: 10px 12px; border: 1px solid #bea383; border-radius: 12px;
    background: #ebdcc5; color: inherit; font: inherit; text-align: left;
    cursor: pointer; overflow-wrap: anywhere;
}
#beerHulp #beerHulpSluiten { width: auto; margin: 0 0 10px auto; }
#beerHulp :is(textarea, input) {
    box-sizing: border-box; display: block; width: 100%; min-height: 44px;
    margin-top: 8px; padding: 12px; border: 1px solid #bea383; border-radius: 10px;
    background: #fffdf6; color: inherit; font: inherit;
}
#beerHulp textarea { resize: vertical; }
#beerGekozenTaak, #beerEersteStap { padding: 14px; border-radius: 12px; background: #ebdcc5; overflow-wrap: anywhere; }
#beerHulp :focus-visible { outline: 2px solid #896653; outline-offset: 3px; }

#pauzeVenster {
    box-sizing: border-box; width: min(460px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px;
    border: 1px solid #cfb797; border-radius: 24px;
    background: #fff5e8; color: #51443e; font: 16px/1.6 'Segoe UI', sans-serif;
}
#pauzeVenster::backdrop { background: #21180d77; }
#pauzeVenster h2 { font: 25px/1.4 Georgia, serif; }
#pauzeVenster button, #pauzeVenster input, #pauzeVenster select {
    box-sizing: border-box; width: 100%; min-height: 44px; margin: 8px 0;
    padding: 10px 12px; border: 1px solid #cfb797; border-radius: 12px;
    font: inherit; color: inherit; background: #fffcf6;
}
#pauzeVenster button { background: #efdfc7; cursor: pointer; text-align: left; }
#pauzeVenster label { display: block; margin-top: 12px; }
#pauzeVenster #pauzeSluiten { width: auto; display: block; margin-left: auto; }
#pauzeVenster [aria-pressed="true"] { background: #d7ddc0; border-color: #647445; }
#pauzeVenster :focus-visible { outline: 2px solid #647445; outline-offset: 3px; }

#planningVenster {
    box-sizing: border-box; width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
    overflow-y: auto; padding: 24px; border: 1px solid #cfb797; border-radius: 24px;
    background: #fff5e8; color: #51443e; font: 16px/1.6 'Segoe UI', sans-serif;
}
#planningVenster::backdrop { background: #21180d77; }
#planningVenster h2 { font: 25px/1.4 Georgia, serif; }
.planningVoorbeelden { background: #efe7d7; padding: 4px 16px; border-radius: 14px; margin-bottom: 18px; }
#planningVenster button, #planningForm input {
    box-sizing: border-box; min-height: 44px; padding: 10px 12px;
    border: 1px solid #cfb797; border-radius: 10px; font: inherit; color: inherit;
}
#planningVenster button { background: #efdfc7; cursor: pointer; }
#planningVenster #planningSluiten { display: block; margin-left: auto; }
#planningForm label { display: block; margin-top: 12px; }
#planningForm input { display: block; width: 100%; background: #fffcf6; margin: 6px 0 12px; }
.planningActies { display: flex; flex-wrap: wrap; gap: 8px; }
#planningTaken { padding: 0; list-style: none; }
#planningTaken li { border-top: 1px solid #dac8ae; padding: 16px 0; overflow-wrap: anywhere; }
#planningTaken label { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
#planningTaken input { width: 22px; height: 22px; flex-shrink: 0; accent-color: #647445; }
#planningTaken .is-klaar label span { text-decoration: line-through; }
#planningTaken p, .planningOpslag { font-size: 14px; }
#planningStatus:empty { display: none; }
#planningVenster :focus-visible { outline: 2px solid #647445; outline-offset: 3px; }

#taakViering {
    position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
    pointer-events: none; padding: 16px; background: #32251730;
}
#taakViering[hidden] { display: none; }
.vieringKaart {
    position: relative; width: min(390px, calc(100vw - 48px)); box-sizing: border-box;
    padding: 22px; text-align: center; border-radius: 28px; background: #fff7e9;
    color: #51443e; box-shadow: 0 12px 50px #21180d33;
}
.vieringDecor { height: 110px; position: relative; }
.vieringIcoon { position: relative; display: inline-block; font-size: 72px; line-height: 110px; }
.vieringNaam { margin: 8px 0; font-size: 14px; }
.vieringTitel { font: 24px/1.3 Georgia, serif; margin: 8px 0; }
.viering-uil .vieringIcoon { animation: geefPluim 3.4s ease-in-out both; }
.viering-beer .vieringIcoon { animation: berenKnuffel 3.4s ease-in-out both; }
.vieringKnuffel { position: absolute; inset: 25px 0 0; font-size: 32px; white-space: pre; animation: knuffelArmen 3.4s ease-in-out both; }
.viering-kat .vieringIcoon { animation: rolWol 3.4s ease-in-out both; }
.viering-vos .vieringIcoon { animation: vosFeest .4s ease-in-out 7 alternate; transform-origin: 50% 85%; }
.viering-vos .vieringKaart { background: #fff0d9; }
.viering-eenhoorn { background: #ed91ca30 !important; }
.viering-eenhoorn .vieringKaart { background: #fff0fb; color: #743668; border: 2px solid #e6a2d5; }
.viering-eenhoorn .vieringIcoon { animation: eenhoornDans .4s ease-in-out 7 alternate; }
.vieringRegenboog { position: absolute; inset: -50px 0 0; font-size: 155px; opacity: .8; }
.vieringConfetti { position: fixed; left: var(--x); top: -50px; font-size: 27px; animation: feestVal 2.3s var(--vertraging) ease-in both; }
@keyframes geefPluim {
    0% { opacity: 0; transform: translate(-40px, -20px) rotate(-25deg) scale(.6); }
    35% { opacity: 1; transform: translate(0, 0) rotate(12deg) scale(1); }
    75%, 100% { transform: translate(0, 12px) rotate(-8deg) scale(1.15); }
}
@keyframes berenKnuffel { 0%, 100% { transform: scale(1); } 40%, 70% { transform: scale(1.2); } }
@keyframes knuffelArmen { 0%, 100% { transform: scaleX(1); } 40%, 70% { transform: scaleX(.55); } }
@keyframes rolWol { 0% { transform: translateX(-90px) rotate(-120deg); } 55% { transform: translateX(20px) rotate(30deg); } 80%, 100% { transform: translateX(0) rotate(0); } }
@keyframes vosFeest { from { transform: rotate(-10deg) translateY(0); } to { transform: rotate(10deg) translateY(-10px); } }
@keyframes eenhoornDans { from { transform: translate(-20px, 4px) rotate(-15deg); } to { transform: translate(20px, -20px) rotate(15deg); } }
@keyframes feestVal { from { transform: translateY(0) rotate(0); } to { transform: translateY(105dvh) rotate(270deg); } }
@media (prefers-reduced-motion: reduce) {
    #taakViering * { animation: none !important; }
    #taakViering .vieringConfetti { display: none; }
}

#planningVenster.is-overzicht > :is(#planningBuddy, .planningVoorbeelden, #planningForm, #planningStatus, #planningHerstel, #planningLeeg, #planningTaken, .planningOpslag) { display: none; }
#planningOverzicht table { width: 100%; border-collapse: collapse; margin-top: 16px; table-layout: fixed; }
#planningOverzicht th, #planningOverzicht td { padding: 12px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid #dac8ae; overflow-wrap: anywhere; }
#planningOverzicht th:first-child { width: 22%; }
#planningOverzicht th:nth-child(2) { width: 46%; }

.muziekNootjes {
    display: none; position: absolute; inset: 0; pointer-events: none;
    color: #ffe5b3; text-shadow: 0 1px 5px #241810; z-index: 1;
}
.is-speelt > .muziekNootjes { display: block; }
.muziekNootjes > span {
    position: absolute; left: 50%; top: 0; opacity: 0;
    font: 26px/1 Georgia, serif;
    animation: zwevendeMuziek 3s linear infinite;
    --zijwaarts: -25px;
}
.muziekNootjes > span:nth-child(2) { animation-delay: -.75s; --zijwaarts: 25px; }
.muziekNootjes > span:nth-child(3) { animation-delay: -1.5s; --zijwaarts: -12px; }
.muziekNootjes > span:nth-child(4) { animation-delay: -2.25s; --zijwaarts: 40px; }
.mobieleTools [data-paneel="muziekOpties"] { position: relative; }
@keyframes zwevendeMuziek {
    0% { opacity: 0; transform: translate(-50%, 0) rotate(-12deg) scale(.7); }
    15% { opacity: .85; }
    75% { opacity: .65; }
    100% { opacity: 0; transform: translate(var(--zijwaarts), -85px) rotate(15deg) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
    .muziekNootjes > span { animation: none; display: none; }
    .muziekNootjes > span:first-child { display: block; opacity: .85; transform: translate(-50%, -25px); }
}

/* Het hoofd en de dobbelstenen zijn de hulpankers in deze kamers. */
.studiekamer.is-academia .kopje { left: 8%; top: 39%; width: 7%; height: 20%; }
.studiekamer.is-geek .kopje { left: 16%; top: 68%; width: 10%; height: 7%; }
.studiekamer.is-geek.is-middernacht .kopje { left: 65%; top: 69%; width: 13%; height: 7%; }
.studiekamer:is(.is-academia, .is-geek) #kopjeKnop { width: 100%; height: 100%; background: transparent; border: 0; border-radius: 25%; }
.studiekamer:is(.is-academia, .is-geek) #kopjeKnop::before { content: none; }
.studiekamer:is(.is-academia, .is-geek) #kopjeKnop:hover,
.studiekamer:is(.is-academia, .is-geek) #kopjeKnop:focus-visible { outline: 2px solid #e9c38d; background: #efcf8a20; }
#kamerHulp {
    box-sizing: border-box; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
    overflow-y: auto; padding: 24px; border: 1px solid #a18b68; border-radius: 24px 24px 24px 5px;
    background: #f3ecdd; color: #443b2c; font: 17px/1.6 Georgia, serif;
}
#kamerHulp::backdrop { background: #17140e77; }
#kamerHulp.is-geek-hulp { background: #f0e8fa; color: #493457; border-color: #ae90be; }
#kamerHulp button, #kamerHulp textarea { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; margin-top: 10px; border: 1px solid #b9a58a; border-radius: 12px; background: #fffaf1; color: inherit; font: 16px/1.5 'Segoe UI', sans-serif; }
#kamerHulp button { cursor: pointer; text-align: left; }
#kamerHulp #kamerHulpSluiten { width: auto; display: block; margin-left: auto; }
#kamerHulp textarea { resize: vertical; }
#kamerHulpSpreker { font-size: 14px; }
#kamerHulp :focus-visible { outline: 2px solid #876846; outline-offset: 3px; }

#hoofdNaamKnop { display: none; }
.studiekamer.is-academia #hoofdNaamKnop {
    display: block; position: absolute; left: 8%; top: 39%; width: 7%; height: 20%;
    background: transparent; border: 0; border-radius: 30%; cursor: pointer;
}
.studiekamer.is-academia #hoofdNaamKnop:hover,
.studiekamer.is-academia #hoofdNaamKnop:focus-visible { outline: 2px solid #e9c38d; background: #efcf8a20; }
.studiekamer.is-academia .kopje { left: 39%; top: 54%; width: 3.95%; height: auto; aspect-ratio: 1; }
.studiekamer.is-academia #kopjeKnop {
    border: 2px solid rgb(255 244 228 / 75%); border-radius: 50%;
    background: rgb(35 24 18 / 75%); color: #fff4e4; font-size: 2cqw;
}
.studiekamer.is-academia #kopjeKnop::before { content: "?"; }
#hoofdNaamVenster {
    box-sizing: border-box; width: min(400px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
    overflow-y: auto; padding: 24px; border: 1px solid #a18b68; border-radius: 24px;
    background: #f3ecdd; color: #443b2c; font: 17px/1.6 Georgia, serif;
}
#hoofdNaamVenster::backdrop { background: #17140e77; }
#hoofdNaamVenster button, #hoofdNaamInvoer {
    box-sizing: border-box; display: block; width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 12px;
    border: 1px solid #b9a58a; border-radius: 12px; background: #fffaf1; color: inherit; font: 16px 'Segoe UI', sans-serif;
}
#hoofdNaamVenster button { cursor: pointer; }
#hoofdNaamVenster #hoofdNaamSluiten { width: auto; margin-left: auto; }
#hoofdNaamVenster :focus-visible { outline: 2px solid #876846; outline-offset: 3px; }

#hoofdSpreuk { margin: 16px 0; padding: 12px 16px; border-left: 3px solid #a18b68; background: #e9dfcc; border-radius: 0 12px 12px 0; }
#hoofdLatijn { margin: 0 0 6px; font: italic 22px/1.4 Georgia, serif; }
#hoofdVertaling { margin: 0; font: 15px/1.5 'Segoe UI', sans-serif; }

#welkomVenster {
    box-sizing: border-box; width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px); overflow-y: auto; padding: clamp(24px, 5vw, 40px);
    border: 1px solid #d4a89f; border-radius: 28px; background: #f7e3df; color: #384638;
    box-shadow: 0 18px 70px #21180d55; font: 17px/1.7 'Segoe UI', sans-serif;
}
#welkomVenster::backdrop { background: #20352699; }
#welkomTitel { margin-top: 0; font: 28px/1.35 Georgia, serif; color: #263e2d; }
#welkomVenster .welkomSlot { font-style: italic; }
#welkomVenster button {
    width: 100%; min-height: 48px; margin-top: 8px; padding: 12px 18px;
    border: 1px solid #304e39; border-radius: 14px; background: #304e39; color: #fff5ec;
    font: inherit; cursor: pointer;
}
#welkomVenster button:focus-visible { outline: 3px solid #927248; outline-offset: 4px; }

/* Origineel - Halloween: Uil en Beer, middag en avond. */
.studiekamer.is-halloween { background-image: url("studiekamer-halloween.png"); }
.studiekamer.is-halloween.is-licht { background-image: url("studiekamer-halloween-middag.png"); }
.studiekamer.is-halloween.is-beer { background-image: url("studiekamer-beer-halloween.png"); }
.studiekamer.is-halloween.is-beer.is-licht { background-image: url("studiekamer-beer-halloween-middag.png"); }
.studiekamer.is-halloween .laptop {
    left: 43.8%; top: 40.5%; width: 22.3%; height: 23.8%;
    transform: none; clip-path: polygon(3% 0, 100% 0, 100% 100%, 0 100%);
}
.studiekamer.is-halloween .uil {
    left: 23.5%; top: 56.5%; width: 15%; height: 24%;
    transform: translate(-50%, -50%);
}
.studiekamer.is-halloween #uilKnop { border-radius: 30%; }
.studiekamer.is-halloween .kopje { left: 36%; top: 55%; }
.studiekamer.is-halloween .tools { left: 84%; top: 49%; }
.studiekamer.is-halloween .takenlijst { left: 51%; top: 79%; }
.studiekamer.is-halloween .muziek { left: 77%; top: 77%; }
.studiekamer.is-halloween .studiehoekKeuze { left: 29%; top: 84%; }
.studiekamer.is-halloween .raam { left: 60%; top: 23%; }
.studiekamer.is-halloween .zon { display: block; left: 12%; top: 27%; }
.studiekamer.is-halloween .kaars { left: 6.6%; top: 57%; width: 5.5%; height: 11%; }
.studiekamer.is-halloween .matchaStoom { display: none; }
.studiekamer.is-halloween :is(#muziekKnop, #takenlijstKnop, #kopjeKnop, #raamKnop, #zonKnop) {
    border: 2px solid rgb(255 244 228 / 75%); border-radius: 50%;
    background: rgb(49 28 15 / 80%); color: #fff4e4; font-size: 2cqw;
}
.studiekamer.is-halloween #muziekKnop::before { content: "♫"; }
.studiekamer.is-halloween #takenlijstKnop::before { content: "☷"; }
.studiekamer.is-halloween #kopjeKnop::before { content: "?"; }
.studiekamer.is-halloween #raamKnop::before { content: "☕"; }
.studiekamer.is-halloween #zonKnop::before { content: "☀"; }
.studiekeuze[hidden] { display: none; }
.studiekamer.is-halloween.is-vos { background-image: url("studiekamer-vos-halloween.png"); }
.studiekamer.is-halloween.is-vos.is-licht { background-image: url("studiekamer-vos-halloween-middag.png"); }
.studiekamer.is-halloween.is-eenhoorn { background-image: url("studiekamer-eenhoorn-halloween.png"); }
.studiekamer.is-halloween.is-eenhoorn.is-licht { background-image: url("studiekamer-eenhoorn-halloween-middag.png"); }
.studiekamer.is-halloween.is-kat { background-image: url("studiekamer-kat-halloween.png"); }
.studiekamer.is-halloween.is-kat.is-licht { background-image: url("studiekamer-kat-halloween-middag.png"); }
/* De nieuwe afbeeldingen bevatten al iconen: leg de bediening daar precies op. */
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .kopje { left: 36.5%; top: 51.6%; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) #kopjeKnop { background: #35291f; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .uil { left: 22.5%; top: 56%; width: 18%; height: 27%; }
.studiekamer.is-halloween.is-kat .uil { left: 24%; top: 57%; width: 20%; height: 25%; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .muziek { left: 84.7%; top: 74%; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .takenlijst { left: 85.8%; top: 50%; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .tools { left: 9%; top: 70%; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .raam { left: 71.3%; top: 16.4%; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .zon { left: 94.2%; top: 92.2%; width: 8%; aspect-ratio: 2; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) #zonKnop { background: transparent; border: none; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) #zonKnop::before { content: none; }

#halloweenLampKnop, #halloweenLichtLabel { display: none; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) #halloweenLampKnop {
    display: block; position: absolute; left: 7%; top: 20%; width: 11%; height: 17%;
    border: 0; background: transparent; border-radius: 35%; cursor: pointer;
}
#halloweenLampKnop:hover, #halloweenLampKnop:focus-visible { outline: 2px solid #ffe1a5; outline-offset: 3px; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) .zon { z-index: 2; }
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) #zonKnop {
    position: absolute; inset: 0; border: 2px solid #efd5ad; border-radius: 40px; background: #35291f;
}
.studiekamer.is-halloween:is(.is-vos, .is-eenhoorn, .is-kat) #halloweenLichtLabel {
    display: grid; position: absolute; inset: 0; place-items: center; pointer-events: none;
    z-index: 1; color: #fff4e4; font: 600 clamp(10px, 1.2cqw, 18px)/1 'Segoe UI', sans-serif;
}

#geekLichtWissel { display: none; }
.studiekamer.is-geek #geekLichtWissel {
    display: block; position: absolute; right: 2%; bottom: 3%; z-index: 3;
    min-height: 44px; padding: 10px 16px; border: 1px solid #e9c999; border-radius: 24px;
    background: #33223be8; color: #fff2dd; font: 16px 'Segoe UI', sans-serif; cursor: pointer;
}
#geekLichtWissel:focus-visible { outline: 2px solid #ffe0ac; outline-offset: 3px; }
.studiekamer.is-geek.is-geek-halloween { background-image: url("studiekamer-geek-halloween.png"); }
.studiekamer.is-geek.is-geek-halloween.is-middernacht { background-image: url("studiekamer-geek-middernacht-halloween.png"); }
.studiekamer.is-geek.is-geek-halloween .laptop {
    left: 36.4%; top: 46.2%; width: 22%; height: 24.3%;
    clip-path: polygon(0 1%, 94% 0, 100% 96%, 3% 100%); transform: none;
}
.studiekamer.is-geek.is-geek-halloween #geekLampKnop { left: 9%; top: 28%; width: 11%; height: 17%; }
.studiekamer.is-geek.is-geek-halloween .kopje { left: 21%; top: 70%; width: 10%; height: 8%; }
.studiekamer.is-geek.is-geek-halloween .tools { left: 9%; top: 49%; }
.studiekamer.is-geek.is-geek-halloween .takenlijst { left: 27%; top: 81%; }
.studiekamer.is-geek.is-geek-halloween .kaars { left: 69%; top: 53%; width: 5%; height: 13%; }
@media (max-width: 1100px) and (pointer: coarse), (max-width: 700px) {
    .studiekamer.is-geek #geekLichtWissel { display: none; }
}

.studiekamer.is-academia.is-academia-halloween { background-image: url("dark-academia-halloween.png"); }



#welkomVenster {
    width: min(560px, calc(100vw - 32px));
    background: linear-gradient(145deg, #fff5ed 0%, #f7e3df 65%, #eddfd7 100%);
    border: 1px solid #e2bfb5; border-radius: 30px;
    padding: clamp(24px, 4vw, 36px); font-size: 16px; line-height: 1.65;
}
.welkomMerk { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: #53654b; font-size: 13px; letter-spacing: .08em; }
.welkomMerk img { display: block; width: 56px; height: 56px; object-fit: contain; }
#welkomTitel { font-size: clamp(25px, 4.5vw, 32px); line-height: 1.25; margin-bottom: 14px; letter-spacing: -.02em; }
#welkomVenster .welkomIntro { color: #53614e; margin: 0 0 22px; }
.welkomOntdekken { border-left: 2px solid #b5bea3; padding-left: 18px; }
.welkomOntdekken p { margin: 0 0 16px; }
.welkomOntdekken p:last-child { margin-bottom: 0; }
.welkomOntdekken strong { display: block; color: #304e39; font-weight: 600; margin-bottom: 3px; }
#welkomVenster .welkomSlot { margin: 22px 0 16px; font: italic 18px/1.5 Georgia, serif; color: #675447; }
#welkomVenster button { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #304e39; box-shadow: 0 4px 12px #304e3920; }
#welkomVenster button:hover { background: #233e2b; }

#welkomVenster { padding: clamp(18px, 3vw, 28px); }
#welkomVenster .welkomMerk { margin-bottom: 12px; }
#welkomVenster .welkomMerk img { width: 40px; height: 40px; }
#welkomVenster .welkomIntro { margin-bottom: 16px; }
#welkomVenster .welkomOntdekken p { margin-bottom: 10px; }
#welkomVenster .welkomSlot { margin: 16px 0 10px; }
@media (max-height: 600px) {
    #welkomVenster { padding: 16px 20px; font-size: 15px; line-height: 1.4; }
    #welkomVenster .welkomMerk { display: none; }
    #welkomTitel { font-size: 24px; margin-bottom: 10px; }
    #welkomVenster .welkomIntro, #welkomVenster .welkomSlot { margin: 10px 0; }
}

.welkomBuddies { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 8px 0 12px; }
.welkomBuddies span { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 1 38px; border-radius: 50%; background: #fff8f080; font-size: clamp(22px, 5.5vw, 28px); line-height: 1; }
@media (max-height: 600px) {
    .welkomBuddies { margin: 5px 0 8px; }
    .welkomBuddies span { height: 30px; font-size: 23px; }
}

.laptop { align-content: center; gap: .5cqw; }
#focusOpenen {
    pointer-events: auto; max-width: 94%; padding: .35cqw .65cqw;
    border: 1px solid #fff4e45c; border-radius: 20px; background: #14202ba6;
    color: #fff4e4; font: clamp(9px, 1.05cqw, 16px)/1.3 'Segoe UI', sans-serif; cursor: pointer;
}
#focusOpenen:hover { background: #283d4d; }
#focusOpenen:focus-visible { outline: 2px solid #ffe0ac; outline-offset: 2px; }
#focusVenster {
    box-sizing: border-box; width: min(400px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
    overflow-y: auto; padding: 24px; border: 1px solid #cfb797; border-radius: 24px;
    background: #fff5e8; color: #384638; font: 16px/1.6 'Segoe UI', sans-serif;
}
#focusVenster::backdrop { background: #20352688; }
#focusVenster button, #focusMinuten {
    box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; margin-top: 10px;
    border: 1px solid #a8b098; border-radius: 12px; font: inherit; color: inherit; background: #edf0e3;
}
#focusVenster button { cursor: pointer; }
#focusVenster #focusSluiten { display: block; width: auto; margin-left: auto; }
#focusResterend { text-align: center; font-size: 48px; font-weight: 300; font-variant-numeric: tabular-nums; margin: 16px 0; }
#focusStatus:empty { display: none; }
#focusVenster :focus-visible { outline: 2px solid #536246; outline-offset: 3px; }

#focusTerugblik {
    box-sizing: border-box; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
    overflow-y: auto; padding: 24px; border: 1px solid #d4a89f; border-radius: 24px;
    background: #f7e3df; color: #384638; font: 16px/1.6 'Segoe UI', sans-serif;
}
#focusTerugblik::backdrop { background: #20352688; }
#focusTerugblik h2 { font: 28px Georgia, serif; }
#focusTerugblik button {
    box-sizing: border-box; width: 100%; min-height: 44px; padding: 12px; margin-top: 10px;
    border: 1px solid #a8b098; border-radius: 12px; font: inherit; background: #fff9ef; color: inherit; cursor: pointer;
}
#focusTerugblik #focusTerugblikSluiten { display: block; width: auto; margin-left: auto; }
#focusTerugblik :focus-visible { outline: 2px solid #536246; outline-offset: 3px; }
