/* De kruikenkelder: het avontuur achter de scheve kast in de Leeszaal. */
#kelder { background: #040308; pointer-events: auto; z-index: 30; }
#kc { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: var(--col); max-width: none; height: 100%; display: block; touch-action: none; }
#kelder > div { position: relative; width: var(--col); max-width: none; padding-left: 12px; padding-right: 12px; }
.kltop { display: flex; align-items: center; gap: 8px; pointer-events: none; z-index: 6; }
.kltop > * { pointer-events: auto; }
#kl-count { opacity: 0; transition: opacity .4s; letter-spacing: .12em; font-size: 12px; }
#kl-count.on { opacity: 1; }
#kl-count.bump b { display: inline-block; animation: klpop .5s; }
@keyframes klpop { 30% { transform: scale(1.7); } }

/* onderschrift: de verteller */
.klcap { margin-top: auto; display: none; flex-direction: column; gap: 8px; text-align: center; background: linear-gradient(180deg, rgba(8,6,12,0), rgba(8,6,12,.92) 26%); padding-top: 38px; padding-bottom: 6px; z-index: 2; }
.klcap.on { display: flex; animation: klup .45s ease; }
.klcap.thru { pointer-events: none; }
@keyframes klup { from { opacity: 0; transform: translateY(14px); } }
#kl-text { margin: 0; font-size: 19px; line-height: 1.42; font-weight: 800; text-shadow: 0 2px 14px #000; }
#kl-text b { color: var(--gold); }
#kl-text small { display: block; font-size: 11.5px; letter-spacing: .2em; font-weight: 900; color: var(--gold2); margin-bottom: 6px; }
.klcap .hint { margin-top: 2px; }
#kl-acts { display: flex; flex-direction: column; gap: 8px; }
#kl-acts:empty { display: none; }

/* de grote vraag, midden in beeld */
#kelder > .klbig { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 0 22px; background: radial-gradient(ellipse at center, rgba(6,4,10,.92), rgba(6,4,10,.6) 70%, rgba(6,4,10,.2)); z-index: 4; }
#kelder > .klbig.on { display: flex; animation: fade .5s ease; }
.klbig small { font-size: 12px; letter-spacing: .28em; font-weight: 900; color: var(--gold2); }
.klbig h1 { margin: 0; font-family: Cinzel, serif; font-size: clamp(27px, 8.4vw, 40px); line-height: 1.16; color: #fff3a0; text-shadow: 0 0 28px rgba(231,199,7,.55); animation: zoomin .7s cubic-bezier(.2,1.4,.4,1); }

/* paneel: schrijffout, motieven, de wand */
.klpanel { display: none; flex-direction: column; gap: 9px; margin-top: auto; max-height: 86%; overflow-y: auto; background: rgba(14,11,18,.95); border: 1.5px solid rgba(231,199,7,.4); border-bottom: 0; border-radius: 18px 18px 0 0; padding-top: 16px; padding-bottom: 14px; text-align: center; z-index: 5; touch-action: pan-y; }
.klpanel.on { display: flex; animation: klup .4s ease; }
.klpanel > * { flex: none; }
.klpanel h2 { margin: 0; font-size: 21px; line-height: 1.2; color: #fff3a0; }
.klpanel h2.klend { font-family: Cinzel, serif; font-size: 23px; }
.klsub { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--mute); font-weight: 700; }
.klmore { margin: 2px 0; font-size: 12.5px; color: var(--mute); }
.klq { margin: 2px 0 0; font-size: 17px; font-weight: 900; color: var(--gold); }
.klgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.kltile { background: linear-gradient(180deg, #4f4759, #2c2734); border: 1.5px solid rgba(231,199,7,.35); border-radius: 12px; padding: 9px 4px 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; min-width: 0; }
.kltile .e { font-size: 18px; white-space: nowrap; height: 24px; display: flex; align-items: center; max-width: 100%; overflow: hidden; }
.kltile .e i { font-style: normal; color: var(--gold); font-weight: 900; margin: 0 3px; font-size: 15px; }
.kltile b { font-size: 12.5px; }
.kltile small { font-size: 10.5px; color: var(--gold); font-weight: 800; }
.kltile.done { border-color: #3fbf86; background: linear-gradient(180deg, #24493a, #18302a); }
.kltile.done small { color: #8fe6bf; }
.kltile.done.some { border-color: var(--gold); background: linear-gradient(180deg, #4e4520, #2f2a14); }
.kltile.done.some small { color: var(--gold); }
.klvs { display: flex; align-items: stretch; gap: 6px; position: relative; }
.klvs > div { flex: 1; min-width: 0; border-radius: 12px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.klvs .k { background: linear-gradient(180deg, #14553c, #0c3b2a); border: 1.5px solid var(--k); }
.klvs .t { background: linear-gradient(180deg, #1c3f7c, #11264d); border: 1.5px solid var(--t); }
.klvs b { font-size: 10px; letter-spacing: .16em; opacity: .8; }
.klvs span { font-size: 24px; line-height: 1.2; white-space: nowrap; }
.klvs strong { font-size: 14px; }
.klvs small { font-size: 10.5px; opacity: .75; }
.klvs > em { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--gold); color: #141414; font-style: normal; font-weight: 900; display: grid; place-items: center; }
.klchips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.klchip { display: flex; align-items: center; gap: 6px; text-align: left; padding: 9px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.18); color: #fff; font-weight: 800; font-size: 12.5px; line-height: 1.15; min-width: 0; }
.klchip span { font-size: 18px; flex: none; }
.klchip.on { background: rgba(231,199,7,.2); border-color: var(--gold); color: #fff3a0; }
.kltest { margin: 0; min-height: 2.6em; font-size: 13px; line-height: 1.35; color: #e9e2d0; font-weight: 700; }
.kltest b { color: var(--gold); }
.klacts { display: flex; flex-direction: column; gap: 8px; }
.klacts.two { flex-direction: row; }
.klacts.two .btn { padding: 13px 8px; font-size: 14.5px; }
.klpanel .btn:disabled { opacity: .45; box-shadow: none; }
.klrol { background: linear-gradient(180deg, #f8efd6, #e6d3a3); color: #2a1c0c; border-radius: 10px; padding: 8px 10px 10px; box-shadow: inset 0 0 0 2px rgba(120,84,30,.35); }
.klrol small { font-size: 10px; letter-spacing: .18em; font-weight: 900; color: #8a6a2a; }
.klrol p { margin: 4px 0 0; font-family: Caveat, cursive; font-size: 28px; line-height: 1.15; }
.klw { font: inherit; color: inherit; padding: 2px 5px; border-radius: 8px; border-bottom: 2px dashed rgba(120,84,30,.5); }
.klw.ok { background: #e7c707; border-bottom-color: transparent; }
.klw.mis { animation: shake .35s; }
.klmot { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.klmot > div { display: flex; gap: 9px; align-items: center; background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 10px; animation: klup .45s ease both; }
.klmot span { font-size: 22px; flex: none; }
.klmot p { margin: 0; font-size: 13px; line-height: 1.3; font-weight: 700; }
.klmot b { color: var(--gold); }

/* de haak in de Leeszaal en in de hal */
.fkast { width: 100%; margin-top: 6px; padding: 12px; border-radius: 16px; border: 1.5px dashed rgba(231,199,7,.55); background: rgba(231,199,7,.07); display: flex; flex-direction: column; gap: 9px; }
.fkast p { font-size: 14.5px; font-style: italic; }

/* de kaartenkamer */
.klquote { margin: 0; font-size: 16.5px; line-height: 1.45; font-weight: 700; color: #fff; text-align: left; border-left: 3px solid var(--gold); padding: 2px 0 2px 12px; }
.klbron { margin: 0; font-size: 12px; color: var(--gold); font-weight: 800; text-align: left; padding-left: 15px; }
.klwis { text-align: center; padding: 12px 10px; touch-action: none; }
.klwis i { display: block; font-style: normal; color: rgba(120,84,30,.45); letter-spacing: .2em; font-size: 15px; }
.klwis p { margin: 6px 0; padding: 10px 4px; font-size: 25px; line-height: 1.15; touch-action: none; cursor: grab; transition: opacity .12s; }
.klladen { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.klladen .klla:last-child { grid-column: 1 / -1; }
.klla { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: linear-gradient(180deg, #4b3320, #2c1d11); border: 1.5px solid rgba(231,199,7,.4); color: #fff; text-align: left; min-width: 0; }
.klla span { font-size: 20px; flex: none; } .klla b { flex: 1; font-size: 13px; line-height: 1.15; } .klla small { font-size: 12px; font-weight: 900; color: var(--gold); }
.klla.leeg { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); color: var(--mute); } .klla.leeg small { color: #ff9b8a; }
.klstrook { border-radius: 12px; padding: 9px 12px 10px; text-align: center; animation: klup .5s ease; }
.klstrook[hidden] { display: none; }
.klstrook small { display: block; font-size: 10px; letter-spacing: .16em; font-weight: 900; margin-bottom: 3px; }
.klstrook p { margin: 0; font-size: 15.5px; line-height: 1.3; font-weight: 800; } .klstrook i { display: block; font-style: normal; font-size: 11px; opacity: .75; margin-top: 2px; }
.klstrook.s0 { background: linear-gradient(180deg, #14553c, #0c3b2a); border: 1.5px solid var(--k); }
.klstrook.s1 { background: linear-gradient(180deg, #f8efd6, #e6d3a3); color: #2a1c0c; box-shadow: inset 0 0 0 2px rgba(120,84,30,.35); }
.klstrook.s1 small { color: #8a6a2a; } .klstrook.s2 { background: linear-gradient(180deg, #1c3f7c, #11264d); border: 1.5px solid var(--t); }
.klhebr { display: block; font-size: 25px; line-height: 1.3; font-weight: 700; font-family: "Times New Roman", "Noto Serif Hebrew", serif; }
.klscen { display: flex; flex-direction: column; gap: 8px; }
.klsc { display: flex; gap: 10px; align-items: center; text-align: left; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1.5px solid rgba(231,199,7,.4); color: #fff; }
.klsc b { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #141414; display: grid; place-items: center; font-size: 15px; }
.klsc span { font-size: 14px; line-height: 1.35; font-weight: 700; }
.klbronnen { margin: 0; padding: 0; list-style: none; text-align: left; display: flex; flex-direction: column; gap: 5px; }
.klbronnen li { font-size: 13px; line-height: 1.3; font-weight: 700; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.06); }
