/* =====================================================================
   Kweko 4.8 — Homescherm op de computer (layout F)
   ===================================================================== */
#kw-home{display:none}
@media (min-width:960px){
  #app-shell.visible:has(> #kw-home)::after{display:none}
  #app-shell.visible > #kw-home{display:flex;grid-column:3;grid-row:1/-1;position:relative;z-index:1;min-height:0;border-radius:34px;background:var(--spec),var(--card-bg);box-shadow:var(--rim),var(--drop);overflow:hidden}
  #app-shell.visible:has(> .mine-right.active) > #kw-home,#app-shell.visible:has(> #chat-thread-sheet.open) > #kw-home{display:none}
}
.kwh-scroll{flex:1;min-width:0;display:flex;flex-direction:column;gap:16px;padding:26px 28px 26px;overflow-y:auto}

/* grote kaart */
.kwh-hero{position:relative;overflow:hidden;display:flex;align-items:center;gap:24px;padding:30px 32px;border-radius:30px;color:#fff;
  background:radial-gradient(120% 140% at 100% 0%,rgba(124,240,176,.38),transparent 50%),linear-gradient(140deg,#1F9D55,#0E5F35);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3);animation:kwhIn .6s var(--ease,ease) both}
.kwh-hero::after{content:"";position:absolute;width:260px;height:260px;right:-70px;bottom:-120px;border-radius:50%;background:rgba(255,255,255,.08);pointer-events:none}
.kwh-hero-txt{position:relative;z-index:1;flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
.kwh-hero-txt small{font:700 14px var(--font);color:#D2F5E0}
.kwh-hero h1{margin:0;font:800 clamp(30px,3.2vw,44px)/1.04 var(--font-display,var(--font));letter-spacing:-.045em;color:#fff}
.kwh-hero-btns{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.kwh-hero-btns button{height:46px;padding:0 20px;border-radius:23px;font:700 15px var(--font);display:inline-flex;align-items:center;gap:8px;cursor:pointer;border:0;transition:transform .15s}
.kwh-hero-btns button:active{transform:scale(.97)}
.kwh-b1{background:#fff;color:#0E5F35}
.kwh-b2{background:rgba(255,255,255,.16);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}
.kwh-b2 .icon{width:18px;height:18px}
.kwh-stack{position:relative;z-index:1;display:flex;flex:none}
.kwh-stack .kwh-av + .kwh-av{margin-left:-18px}
.kwh-hero-ic{position:relative;z-index:1;width:84px;height:84px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.16)}
.kwh-hero-ic .icon{width:40px;height:40px}

/* avatars */
.kwh-av{width:44px;height:44px;flex:none;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;color:#fff;font:800 17px var(--font)}
.kwh-av.grp{border-radius:14px}
.kwh-av img{width:100%;height:100%;object-fit:cover}
.kwh-av.big{width:72px;height:72px;font-size:26px;border:4px solid #178A4A;box-sizing:border-box}
.kwh-av.big.grp{border-radius:22px}
.kwh-av.more{background:#0F3D25;font-size:20px}

/* snelknoppen */
.kwh-quick{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;animation:kwhIn .6s var(--ease,ease) .06s both}
.kwh-quick button{height:72px;display:flex;align-items:center;gap:12px;padding:0 18px;border:0;border-radius:22px;background:var(--fill-2,rgba(127,127,127,.08));color:var(--label);font:700 15px var(--font);cursor:pointer;transition:background .15s,transform .15s}
.kwh-quick button:hover{background:var(--fill,rgba(127,127,127,.14))}
.kwh-quick button:active{transform:scale(.98)}
.kwh-quick button > span{width:40px;height:40px;border-radius:13px;display:flex;align-items:center;justify-content:center;background:var(--tint);color:var(--accent-ink,var(--accent))}
.kwh-quick .icon{width:20px;height:20px}

/* kolommen */
.kwh-cols{flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-height:0;animation:kwhIn .6s var(--ease,ease) .12s both}
@media (max-width:1180px){.kwh-cols{grid-template-columns:minmax(0,1fr)}}
.kwh-card{display:flex;flex-direction:column;gap:2px;padding:16px;border-radius:26px;background:var(--fill-2,rgba(127,127,127,.06));min-width:0}
.kwh-ch{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 8px}
.kwh-ch b{font:700 16px var(--font)}
.kwh-link{border:0;background:none;color:var(--accent-ink,var(--accent));font:700 13.5px var(--font);cursor:pointer;padding:6px}
.kwh-row,.kwh-ev{display:flex;align-items:center;gap:12px;width:100%;padding:8px 6px;border:0;border-radius:16px;background:none;color:var(--label);text-align:left;cursor:pointer;font-family:var(--font)}
.kwh-row:hover,.kwh-ev:hover{background:var(--fill,rgba(127,127,127,.1))}
.kwh-rt,.kwh-evt{flex:1;min-width:0;display:flex;flex-direction:column}
.kwh-rt b,.kwh-evt b{font:700 14.5px var(--font);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kwh-rt small,.kwh-evt small{font-size:13px;color:var(--label-2)}
.kwh-rt small.new{color:var(--label);font-weight:600}
.kwh-rt small.on{color:var(--accent-ink,var(--accent));font-weight:600}
.kwh-badge{min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--accent);color:var(--on-accent,#fff);font:700 12px/22px var(--font);font-style:normal;text-align:center;box-sizing:border-box}
.kwh-date{width:50px;height:54px;flex:none;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--tint);color:var(--accent-ink,var(--accent))}
.kwh-date small{font:700 10.5px var(--font);text-transform:uppercase}
.kwh-date b{font:800 19px/1 var(--font)}
.kwh-date.c-purple{background:rgba(124,77,204,.14);color:#6B3FBF}
.kwh-date.c-blue{background:rgba(37,99,235,.13);color:#1E55C9}
.kwh-date.c-orange,.kwh-date.c-yellow{background:rgba(224,122,31,.15);color:#A8550E}
.kwh-date.c-red,.kwh-date.c-pink{background:rgba(229,72,77,.13);color:#B42C33}
body[data-dark="1"] .kwh-date.c-purple{color:#C9B4F5}
body[data-dark="1"] .kwh-date.c-blue{color:#9CC0FF}
body[data-dark="1"] .kwh-date.c-orange,body[data-dark="1"] .kwh-date.c-yellow{color:#FFC98A}
body[data-dark="1"] .kwh-date.c-red,body[data-dark="1"] .kwh-date.c-pink{color:#FFA9AC}
.kwh-empty{margin:0;padding:10px 6px;font-size:14px;line-height:1.45;color:var(--label-2)}
@keyframes kwhIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.kwh-hero,.kwh-quick,.kwh-cols{animation:none}}
.kwh-still .kwh-hero,.kwh-still .kwh-quick,.kwh-still .kwh-cols{animation:none}

/* =====================================================================
   4.8 · De Gluurder
   - In het gesprek, niet aan het typen: alleen de bovenkant van het hoofdje
     gluurt boven het invoerveld uit.
   - Aan het typen: het hoofdje komt verder omhoog en een pen schrijft.
   Het hoofdje zit altijd achter het invoerveld.
   ===================================================================== */
#thread-bottom.kg-on #chat-typing-indicator{position:relative;height:46px;min-height:46px;padding:0;overflow:visible}
#thread-bottom.kg-peek #chat-typing-indicator{position:relative;height:6px;min-height:6px;padding:0;overflow:visible}
#thread-bottom.kg-on .chat-input-row,#thread-bottom.kg-peek .chat-input-row{position:relative;z-index:1}
#thread-bottom.kg-on .chat-input-row::before{display:none}
.kg{position:absolute;inset:0;pointer-events:none}
.kg-head{position:absolute;left:72px;width:40px;height:40px;z-index:0}
.kg-av{display:flex;width:40px;height:40px;border-radius:50%;overflow:hidden;align-items:center;justify-content:center;color:#fff;font:800 16px var(--font);box-shadow:0 0 0 3px var(--bg,#fff),0 4px 10px -4px rgba(0,0,0,.35)}
.kg-av img{width:100%;height:100%;object-fit:cover}
/* gluren: alleen ~14px boven de rand */
.kg.peek .kg-head{bottom:-38px;animation:kgPeekIn .7s cubic-bezier(.34,1.56,.64,1) both}
.kg.peek .kg-av{animation:kgLook 4s ease-in-out .7s infinite}
/* typen: verder omhoog */
.kg.up .kg-head{bottom:-24px;animation:kgUp .5s cubic-bezier(.34,1.56,.64,1) both}
.kg.up .kg-av{animation:kgBob 1.6s ease-in-out .5s infinite}
/* de pen die schrijft */
.kg-write{position:absolute;left:122px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:10px;animation:kgFade .4s ease .2s both}
.kg-paper{width:92px;height:26px;padding:7px 10px;box-sizing:content-box;border-radius:18px 18px 18px 6px;background:var(--kw-theirs,var(--card-bg));box-shadow:var(--rim-soft,0 1px 4px rgba(0,0,0,.1));overflow:visible}
.kg.long .kg-paper{height:40px}
.kg-ln{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:100;animation:kgInk 2.4s linear infinite}
.kg-pen{animation:kgPen 2.4s linear infinite}
.kg-pen > g{animation:kgNib .3s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:50% 100%}
.kg.long .kg-ln.a{animation:kgInkA 4.4s linear infinite}
.kg.long .kg-ln.b{animation:kgInkB 4.4s linear infinite}
.kg.long .kg-pen{animation:kgPen2 4.4s linear infinite}
.kg.long .kg-ln{stroke:#D9821A}
.kg-write small{font-size:12.5px;color:var(--label-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40vw}
.kg.long .kg-write small{color:#A35A0A;font-weight:600}
body[data-dark="1"] .kg.long .kg-write small{color:#FFB869}
@keyframes kgPeekIn{from{transform:translateY(20px)}to{transform:none}}
@keyframes kgUp{from{transform:translateY(24px)}to{transform:none}}
@keyframes kgLook{0%,100%{transform:translate(0,0) rotate(0)}30%{transform:translate(-2px,-2px) rotate(-6deg)}60%{transform:translate(2px,-1px) rotate(5deg)}}
@keyframes kgBob{0%,100%{transform:translateY(1px)}50%{transform:translateY(-1px)}}
@keyframes kgInk{0%{stroke-dashoffset:100;opacity:1}75%{stroke-dashoffset:0;opacity:1}92%{stroke-dashoffset:0;opacity:0}100%{stroke-dashoffset:100;opacity:0}}
@keyframes kgPen{0%{transform:translate(8px,15px);opacity:1}75%{transform:translate(86px,15px);opacity:1}88%{transform:translate(86px,15px);opacity:0}100%{transform:translate(8px,15px);opacity:0}}
@keyframes kgInkA{0%{stroke-dashoffset:100;opacity:1}40%,85%{stroke-dashoffset:0;opacity:1}95%,100%{stroke-dashoffset:0;opacity:0}}
@keyframes kgInkB{0%,42%{stroke-dashoffset:100;opacity:1}82%,85%{stroke-dashoffset:0;opacity:1}95%,100%{stroke-dashoffset:0;opacity:0}}
@keyframes kgPen2{0%{transform:translate(8px,13px);opacity:1}40%{transform:translate(86px,13px)}41%{transform:translate(8px,30px)}82%{transform:translate(86px,30px);opacity:1}90%,100%{transform:translate(86px,30px);opacity:0}}
@keyframes kgNib{from{transform:translateY(0) rotate(0)}to{transform:translateY(-1.5px) rotate(-4deg)}}
@keyframes kgFade{from{opacity:0;transform:translate(-6px,-50%)}to{opacity:1;transform:translateY(-50%)}}
@media (prefers-reduced-motion:reduce){.kg *,.kg-head{animation:none !important}.kg-ln{stroke-dashoffset:0}}

/* ---------- AI-gesprekken (lijst, zoeken, hernoemen, verwijderen) ---------- */
#kai-hist{display:none;position:absolute;z-index:30;flex-direction:column;gap:10px;padding:16px;box-sizing:border-box;color:var(--label)}
#kai-hist.open{display:flex}
#chat-thread-sheet:not(.kai-dock) #kai-hist{inset:0;background:var(--card-solid,#fff);border-radius:inherit}
#chat-thread-sheet.kai-dock #kai-hist{top:0;right:0;bottom:0;width:300px;border-left:1px solid var(--sep,rgba(127,127,127,.22));padding-top:22px}
#chat-thread-sheet.kai-dock .sheet-body{padding-right:300px !important}
#chat-thread-sheet.kai-dock .kh-x{display:none}
#kai-hist .kh-head{display:flex;align-items:center;justify-content:space-between;font:700 16px var(--font)}
#kai-hist button{border:0;background:none;color:inherit;font:inherit;cursor:pointer}
#kai-hist .kh-x{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center}
#kai-hist .kh-new{height:44px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:8px;font:600 14.5px var(--font);color:var(--accent-ink);background:var(--tint)}
#kai-hist .icon{width:18px;height:18px}
#kai-hist .kh-search{display:flex;align-items:center;gap:8px;height:42px;padding:0 14px;border-radius:999px;background:var(--fill-2);color:var(--label-2)}
#kai-hist .kh-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--label);font:15px var(--font);outline:0}
#kai-hist .kh-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px;scrollbar-width:thin}
#kai-hist .kh-row{display:flex;align-items:center;border-radius:16px;background:var(--fill-2)}
#kai-hist .kh-row.on{box-shadow:inset 0 0 0 2px var(--accent,#2f9e5b)}
#kai-hist .kh-open{flex:1;min-width:0;min-height:48px;padding:8px 6px 8px 14px;text-align:left;display:flex;flex-direction:column;gap:2px}
#kai-hist .kh-open b{font:700 14px var(--font);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#kai-hist .kh-open small{font-size:12px;color:var(--label-2);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#kai-hist .kh-ic{width:40px;height:44px;flex:none;display:flex;align-items:center;justify-content:center;color:var(--label-2)}
#kai-hist .kh-empty{font-size:14px;color:var(--label-2);padding:8px 4px}

/* ---------- Agenda op telefoon: kaart "Straks" (D) + maandraster met gekozen dag (B) ---------- */
@media (max-width:959px){
  #ag-hero.ag-hero{display:flex !important;background:linear-gradient(160deg,var(--accent),color-mix(in srgb,var(--accent) 68%,#000)) !important;color:#fff;padding:18px;border-radius:24px;box-shadow:none !important}
  #ag-hero .ag-hero-date{background:rgba(255,255,255,.2) !important;color:#fff !important;box-shadow:none}
  #ag-hero .ag-hero-day{color:rgba(255,255,255,.85)}
  #ag-hero .ag-hero-line{color:#fff;font-size:20px}
  #ag-hero .ag-hero-next{color:#fff;white-space:normal;font-weight:600}
  #ag-hero .ag-hero-add{background:#fff !important;color:var(--accent-ink,#1d6f3e) !important;box-shadow:none !important}
  .ag-left,.ag-right{display:contents}
  .ag-layout > .ag-left > .ag-card{order:1}
  .ag-layout > .ag-right > .ag-quick{order:2}
  .ag-layout > .ag-right > #ag-day{order:3}
  .ag-layout > .ag-left > #ag-upcoming{order:4}
}

/* gesprekkenpaneel: theme-glass zet kinderen van .sheet-body op position:relative, dus hier met hogere specificiteit */
#chat-thread-sheet .sheet-body > #kai-hist{position:absolute !important;z-index:30 !important}

/* ---------- Tekst-effecten in chatberichten ---------- */
.kwfx-mark{background:#ffe14d;color:#1c1613;padding:0 .25em;border-radius:5px}
.kwfx-spoiler{filter:blur(6px);cursor:pointer;transition:filter .2s;background:rgba(127,127,127,.25);border-radius:5px;padding:0 .2em}.kwfx-spoiler.on{filter:none}
.kwfx-u{text-decoration:underline;text-underline-offset:3px}
.kwfx-big{font-size:1.6em;line-height:1.1}.kwfx-small{font-size:.75em;opacity:.75}
.kwfx-title{font-size:1.4em;font-weight:800;letter-spacing:-.01em}
.kwfx-warn{background:rgba(229,72,77,.18);color:#e5484d;font-weight:700;padding:0 .35em;border-radius:5px}
.kwfx-tag{background:rgba(127,127,127,.2);border:1px solid rgba(127,127,127,.35);padding:0 .55em;border-radius:999px;font-size:.85em;font-weight:600}
.kwfx-quote{display:inline-block;border-left:3px solid var(--accent,#2f9e5b);padding-left:.6em;opacity:.9}
sup,sub{line-height:0}
.kwfx-rb{background:linear-gradient(90deg,#ff3b30,#ff9500,#ffcc00,#34c759,#2f8be0,#af52de,#ff3b30);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:700;animation:kfx-rb 4s linear infinite}
@keyframes kfx-rb{to{background-position:-200% 0}}
.kwfx-wl{display:inline-block;animation:kfx-wv 1.1s ease-in-out infinite;animation-delay:calc(var(--i)*.08s)}
@keyframes kfx-wv{50%{transform:translateY(-.35em)}}
.kwfx-shake,.kwfx-yell{display:inline-block;animation:kfx-sh .35s linear infinite}
@keyframes kfx-sh{0%,100%{transform:translate(0)}20%{transform:translate(-2px,1px) rotate(-1deg)}40%{transform:translate(2px,-1px) rotate(1deg)}60%{transform:translate(-1px,-1px)}80%{transform:translate(1px,1px) rotate(1deg)}}
.kwfx-glow{font-weight:700;color:var(--accent,#2f9e5b);text-shadow:0 0 6px var(--accent,#2f9e5b),0 0 16px var(--accent,#2f9e5b);animation:kfx-gl 2s ease-in-out infinite alternate}
@keyframes kfx-gl{from{text-shadow:0 0 4px var(--accent,#2f9e5b)}to{text-shadow:0 0 8px var(--accent,#2f9e5b),0 0 20px var(--accent,#2f9e5b)}}
.kwfx-typ{font-family:ui-monospace,Menlo,Consolas,monospace;display:inline-block;max-width:100%;overflow:hidden;white-space:nowrap;vertical-align:bottom;border-right:2px solid currentColor;animation:kfx-ty 4s steps(var(--n)) infinite}
@keyframes kfx-ty{0%{width:0}60%,100%{width:calc(var(--n)*1ch)}}
.kwfx-glit{position:relative;font-weight:700;padding:0 .5em;background:linear-gradient(100deg,#e8ae33,#fff3b0,#e8ae33);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:kfx-rb 3s linear infinite}
.kwfx-glit::before,.kwfx-glit::after{content:"\2726";position:absolute;color:#e8ae33;-webkit-text-fill-color:#e8ae33;font-size:.6em;animation:kfx-tw 1.4s ease-in-out infinite}
.kwfx-glit::before{left:0;top:-.3em}.kwfx-glit::after{right:0;bottom:-.2em;animation-delay:.7s}
@keyframes kfx-tw{0%,100%{opacity:0;transform:scale(.4)}50%{opacity:1;transform:scale(1)}}
.kwfx-disco{font-weight:700;animation:kfx-dc 1.6s linear infinite}
@keyframes kfx-dc{0%,100%{color:#ff3b30}20%{color:#e8ae33}40%{color:#34c759}60%{color:#2f8be0}80%{color:#af52de}}
.kwfx-ice{font-weight:800;background:linear-gradient(100deg,#4aa8f0,#c9ecff,#4aa8f0,#c9ecff,#4aa8f0);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:kfx-rb 3s linear infinite}
.kwfx-blink{animation:kfx-bl 1s steps(2,start) infinite}@keyframes kfx-bl{to{visibility:hidden}}
.kwfx-ghost{display:inline-block;animation:kfx-gh 3s ease-in-out infinite}@keyframes kfx-gh{50%{opacity:.15;filter:blur(2px);transform:translateY(-3px)}}
.kwfx-bounce{display:inline-block;animation:kfx-bo .7s cubic-bezier(.3,0,.7,1) infinite}@keyframes kfx-bo{50%{transform:translateY(-.4em)}}
.kwfx-beat{display:inline-block;font-weight:700;animation:kfx-bt 1s ease-in-out infinite}@keyframes kfx-bt{0%,100%{transform:scale(1)}15%{transform:scale(1.18)}30%{transform:scale(1)}45%{transform:scale(1.12)}}
.kwfx-yell{font-weight:900;color:#e5484d;font-size:1.25em;letter-spacing:.02em;text-transform:uppercase}
.kwfx-fire{display:inline-block;padding-top:.5em;font-weight:900;color:#fff1b8;text-shadow:0 1px 1px #b45309,0 0 4px #fff,0 -4px 6px #ffdc50,2px -9px 9px #ff9d00,-2px -14px 12px #ff5a00,2px -20px 16px #e5242d;animation:kfx-fi .45s ease-in-out infinite alternate}
@keyframes kfx-fi{to{text-shadow:0 1px 1px #b45309,0 0 4px #fff,0 -6px 7px #ffdc50,-2px -12px 10px #ff9d00,2px -17px 14px #ff5a00,-2px -24px 20px #e5242d}}
.kwfx-d3{font-weight:900;color:#fff;-webkit-text-stroke:1px #1d6f3e;text-shadow:1px 1px 0 #2a8f50,2px 2px 0 #2a8f50,3px 3px 0 #2a8f50,4px 4px 0 #1d6f3e,5px 5px 0 #1d6f3e,6px 6px 6px rgba(0,0,0,.35)}
.kwfx-float{display:inline-block;animation:kfx-fl 2.4s ease-in-out infinite;text-shadow:0 .6em .3em rgba(0,0,0,.25)}
@keyframes kfx-fl{50%{transform:translateY(-.25em);text-shadow:0 .9em .4em rgba(0,0,0,.12)}}
.kwfx-retro{font-family:ui-monospace,Menlo,Consolas,monospace;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#ffd23f;-webkit-text-stroke:.6px #1c1613;text-shadow:2px 2px 0 #e5484d,4px 4px 0 #7b5cff}
.kwfx-flip{display:inline-block;animation:kfx-fp 2.6s ease-in-out infinite}@keyframes kfx-fp{0%,60%,100%{transform:rotateX(0)}80%{transform:rotateX(360deg)}}
.kwfx-stamp{display:inline-block;border:3px solid #e5484d;color:#e5484d;padding:.02em .4em;border-radius:6px;transform:rotate(-5deg);font-weight:900;text-transform:uppercase;letter-spacing:.06em}
@media (prefers-reduced-motion:reduce){[class*="kwfx-"]{animation:none !important;transition:none !important}.kwfx-rb,.kwfx-glit,.kwfx-ice{background-position:0 0}}

.kwfx-hr{display:inline-block;width:100%;height:1px;vertical-align:middle;background:rgba(127,127,127,.4)}

/* ---------- Knoppen onder een antwoord van Kweko AI ---------- */
.kai-acts{display:flex;gap:2px;margin:4px 0 2px 2px}
.kai-acts button{width:40px;height:40px;border:0;background:none;color:var(--label-2);border-radius:12px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.kai-acts button:hover{background:var(--fill-2);color:var(--label)}
.kai-acts button.on{color:var(--accent-ink,var(--accent))}
.kai-acts button.on .icon{fill:currentColor}
.kai-acts .icon{width:18px;height:18px}

/* ---------- Kweko AI startscherm: gloed + pillen ---------- */
.kai{position:relative;padding:34px 6px 10px}
.kai::before{content:"";position:absolute;left:50%;top:0;width:min(440px,100%);height:310px;transform:translateX(-50%);background:radial-gradient(closest-side,rgba(124,58,237,.30),rgba(37,99,235,.14) 55%,transparent);pointer-events:none}
body:not([data-dark="1"]) .kai::before{opacity:.55}
.kai > *{position:relative}
.kai-orb{width:116px;height:116px}
.kai-orb .icon{width:48px;height:48px}
.kai h3{margin:26px 0 8px;font-size:34px;line-height:1.1}
.kai p{max-width:340px;font-size:15px}
.kai-pills{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:24px}
.kai-pills button{height:46px;padding:0 18px 0 14px;display:flex;align-items:center;gap:10px;border-radius:999px;border:1px solid var(--sep,rgba(127,127,127,.3));background:var(--fill-2);color:var(--label);font:600 15px var(--font);cursor:pointer}
.kai-pills button:hover{background:var(--tint)}
.kai-pills .icon{width:20px;height:20px;color:var(--c)}
@media (prefers-reduced-motion:reduce){.kai-orb,.kai-orb .icon{animation:none}}

/* ---------- Kweko AI: limiet bereikt (slanke balk) ---------- */
.kai-left.low{color:#FFB454;animation:klLow 1.6s ease-in-out infinite}
@keyframes klLow{50%{opacity:.55}}
/* de invoerbalk gaat alleen in de AI-chat weg; andere chats worden nooit geraakt */
#chat-thread-sheet.k41-ai #thread-bottom.kl-on .chat-input-row,
#chat-thread-sheet.k41-ai #thread-bottom.kl-on .ai-suggestions{display:none !important}
.kl{--klr:#FF7A7E;margin:8px 12px 6px;padding:16px;border-radius:24px;background:var(--card-solid,#2a211c);color:var(--label);box-shadow:inset 0 0 0 1px rgba(229,72,77,.35);display:flex;flex-direction:column;gap:14px;animation:klIn .55s cubic-bezier(.2,.9,.3,1) both}
body:not([data-dark="1"]) .kl{--klr:#C0343A}
@keyframes klIn{from{opacity:0;transform:translateY(18px) scale(.97)}}
.kl-top{display:flex;align-items:center;gap:14px}
.kl-orb{position:relative;flex:none;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 32% 26%,#FF9F6E,#E5484D 60%,#9C2230);box-shadow:inset 0 -4px 8px rgba(0,0,0,.25),inset 0 3px 6px rgba(255,255,255,.2)}
.kl-orb::before{content:"";position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 200deg,#8FDB7C,#2563EB,#7C3AED,#8FDB7C);opacity:0;animation:klFade .6s ease .5s both}
@keyframes klFade{from{opacity:1}}
.kl-orb::after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid #E5484D;opacity:0;animation:klRip 1s ease-out .7s both;pointer-events:none}
@keyframes klRip{from{opacity:.75;transform:scale(1)}to{opacity:0;transform:scale(1.7)}}
.kl-orb svg{position:relative;width:22px;height:22px;animation:klLock .5s cubic-bezier(.3,1.6,.5,1) .65s both}
@keyframes klLock{from{transform:scale(0) rotate(-20deg);opacity:0}}
.kl-sh{animation:klSh .35s ease-out .75s both}
@keyframes klSh{from{transform:translateY(-3px)}}
.kl-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.kl-txt b{font:800 16px/1.2 var(--font)}
.kl-txt span{font-size:13px;color:var(--label-2)}
.kl-time{flex:none;height:32px;padding:0 12px;border-radius:999px;display:inline-flex;align-items:center;background:rgba(229,72,77,.18);color:var(--klr);font:700 13px var(--font);font-variant-numeric:tabular-nums}
.kl-segs{display:flex;gap:8px}
.kl-seg{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;font-size:11.5px;color:var(--label-2)}
.kl-b{height:6px;border-radius:99px;background:rgba(127,127,127,.25);overflow:hidden}
.kl-b i{display:block;height:100%;width:var(--w);border-radius:inherit;background:#8FDB7C;transform-origin:left;animation:klSeg .7s cubic-bezier(.3,.7,.2,1) .4s both}
@keyframes klSeg{from{transform:scaleX(0)}}
.kl-seg.full .kl-b i{background:#E5484D}
.kl-seg.full{color:var(--klr);font-weight:700}
@media (prefers-reduced-motion:reduce){.kl,.kl *{animation:none !important}}

/* ---------- Zoeken A ---------- */
.gs-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 4px;margin-top:10px;scrollbar-width:none}
.gs-tabs::-webkit-scrollbar{display:none}
.gs-tabs button{flex:none;height:38px;padding:0 15px;border:0;border-radius:999px;background:var(--fill-2);color:var(--label);font:700 13.5px var(--font);cursor:pointer}
.gs-tabs button.on{background:var(--accent);color:var(--on-accent,#fff)}
.gs-label{display:flex;justify-content:space-between;font:700 12px var(--font);letter-spacing:.08em;color:var(--label-2);margin:16px 4px 4px}
.gs-count{font-size:13.5px;color:var(--label-2);margin:4px 4px 0}
.gs-row{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:8px 6px;border:0;border-radius:14px;background:none;color:inherit;text-align:left;cursor:pointer;font:inherit}
.gs-row:hover,.gs-row:focus-visible{background:var(--fill-2)}
.gs-av{width:42px !important;height:42px !important;flex:none;font-size:17px !important}
.gs-file{width:42px;height:42px;flex:none;border-radius:12px;display:grid;place-items:center;background:var(--tint);color:var(--accent-ink,var(--accent))}
.gs-file .icon{width:20px;height:20px}
.gs-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.gs-main b{font:700 15px var(--font);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.gs-main small{font-size:13.5px;line-height:1.35;color:var(--label-2);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.gs-when{flex:none;align-self:flex-start;margin-top:4px;font-size:12px;color:var(--label-2)}
.kws-mark{background:rgba(255,210,63,.38);color:inherit;padding:0 2px;border-radius:3px}

/* ---------- Profielpagina A: handle + tellers ---------- */
.hero-handle{font-size:14px;color:var(--label-2);margin-top:2px}
.hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:16px;text-align:center}
.hero-stats > div{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 0;border-radius:18px;background:var(--fill-2)}
.hero-stats b{font:800 22px var(--font);font-variant-numeric:tabular-nums}
.hero-stats small{font-size:12.5px;color:var(--label-2)}


/* ---------- Spraakberichten Licht: dun voortgangslijntje met bolletje ---------- */
.kv-wave{gap:0;height:20px}
.kv-wave i{position:relative;height:4px !important;min-width:0;border-radius:0;opacity:1;background:rgba(127,127,127,.35)}
.kv-wave i:first-child{border-radius:99px 0 0 99px}
.kv-wave i:last-child{border-radius:0 99px 99px 0}
.kv-player:not(.mine) .kv-wave i.on{background:var(--accent,#1F9D55)}
.kv-player.mine .kv-wave i{background:rgba(255,255,255,.4)}
.kv-player.mine .kv-wave i.on{background:#fff}
.kv-wave i.on + i:not(.on)::before,.kv-wave i:first-child:not(.on)::before{content:"";position:absolute;left:-7px;top:50%;width:14px;height:14px;margin-top:-7px;border-radius:50%;background:var(--accent,#1F9D55)}
.kv-player.mine .kv-wave i.on + i:not(.on)::before,.kv-player.mine .kv-wave i:first-child:not(.on)::before{background:#fff}

/* ---------- Onderhoud-banner Licht ---------- */
.maint-banner{--mbi:#8a5a00;gap:10px;padding:6px 2px 6px 14px;border-radius:16px;background:#fff1d6;color:#4a3300;box-shadow:none;font-size:14px;font-weight:500;line-height:1.45}
.maint-banner[data-kind="busy"]{--mbi:#c0343a;background:#ffe3e3;color:#5a1114}
.maint-banner[data-kind="done"]{--mbi:#1e8a4c;background:#dff6e6;color:#0f3d1f}
body[data-dark="1"] .maint-banner{--mbi:#ffb454;background:rgba(255,180,84,.16);color:var(--label)}
body[data-dark="1"] .maint-banner[data-kind="busy"]{--mbi:#ff7a7e;background:rgba(229,72,77,.2)}
body[data-dark="1"] .maint-banner[data-kind="done"]{--mbi:#8FDB7C;background:rgba(52,199,89,.18)}
.maint-banner > span.mb-ic:first-child{flex:none;width:auto;height:auto;background:none !important;box-shadow:none !important;color:var(--mbi) !important}
.maint-banner .mb-ic .icon{width:22px;height:22px}
.maint-banner .mb-txt{flex:1;min-width:0;display:block}
.maint-banner .mb-txt b{font-weight:700}
.maint-banner .mb-txt b::after{content:". "}
.maint-banner .mb-txt small{font-size:inherit;color:inherit;opacity:.92}
.maint-banner .mb-chip{display:none}
.maint-banner button{flex:none;min-width:44px;min-height:44px;align-items:center;justify-content:center;color:inherit}

/* ---------- Op-slot-scherm Speels: plantje ---------- */
.mt-card{display:flex;flex-direction:column;align-items:center;gap:14px}
.mt-sprout{width:190px;height:190px;margin:6px 0 8px}
.mt-card .title{font-size:32px;line-height:1.1;margin:0}
.mt-card .subtitle{max-width:300px;margin:0 auto}
.mt-prog{width:100%;margin-top:6px}
.mt-bar{height:14px;border-radius:99px;background:rgba(127,127,127,.25);overflow:hidden}
.mt-bar i{display:block;height:100%;width:0;border-radius:inherit;background:#35E08A;transition:width .8s ease}
.mt-row{display:flex;justify-content:space-between;margin-top:8px;font-size:13px;color:var(--label-2)}
.mt-row b{font-weight:800;color:var(--label)}
.mt-steps{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.mt-step{display:flex;align-items:center;gap:6px;height:36px;padding:0 14px;border-radius:999px;font:800 13px var(--font);color:#2a1f00;background:#FF8FBF;box-shadow:0 3px 0 rgba(0,0,0,.35)}
.mt-step[data-s="1"]{background:#FFB454}
.mt-step[data-s="2"]{background:#35E08A}
.mt-step i{display:inline-flex}
.mt-step .icon{width:16px;height:16px}
.mt-retry{width:100%;height:54px;border:0 !important;border-radius:999px;background:#FFD23F !important;color:#2a1f00 !important;font-weight:800;font-size:16px;box-shadow:0 4px 0 rgba(0,0,0,.35) !important}
.mt-safe{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--label-2)}
.mt-safe .icon{width:18px;height:18px}
@media (prefers-reduced-motion:reduce){.mt-bar i{transition:none}}

/* ---------- Liggende foto's en video's volledig tonen ---------- */
.sl-media.is-land,.sv-media img.is-land,.sv-media video.is-land,.st-media img.is-land,.st-media video.is-land{object-fit:contain !important}
.sv-media,.st-media{background:#000}
.land-bg{position:absolute;inset:-30px;background-position:center;background-size:cover;filter:blur(34px) brightness(.55) saturate(1.3);pointer-events:none}

/* 4.9: balken boven en onder een gesprek krimpen niet meer mee (gaf een trillende zoekbalk als het plusmenu hoog werd) */
#chat-thread-sheet .thread-top,#chat-thread-sheet .thread-bottom{flex-shrink:0}
#chat-thread-sheet #chat-thread-messages{min-height:0}

/* 4.9: profiel: de tellers stonden dubbel (Vrienden twee keer). Boven: vrienden, groepen, stories. Onder: slides en likes. */
#k41-pf .kp-stats{grid-template-columns:1fr 1fr}
#k41-pf .kp-stats > div:first-child{display:none}
