/* Het nep-Chromevenster op het podium en Katerns onderdelen (cursor, kaarten, popup, chat), nagebouwd uit
   pc-hud.js, popup.css en het chatvenster. Alles in podiummaten (1280 x 760). */
/* z-index 0 maakt van het venster een eigen laag: niets van een nepsite kan boven Katerns cursor en kaarten komen. */
.t-window { position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column; background: #fff; color: #1b1b1f; font: 15px/1.45 "Segoe UI", system-ui, sans-serif; color-scheme: light; }
.t-window.dark, .k-pop.dark, .k-chatbox, .k-ask, .k-hud, .k-login, .k-toast { color-scheme: dark; }
.k-pop.light { color-scheme: light; }
.t-tabs { flex: none; height: 38px; display: flex; align-items: flex-end; padding: 0 10px; background: #dfe1e5; }
.t-tab { display: flex; align-items: center; gap: 8px; height: 32px; width: 250px; padding: 0 12px; border-radius: 9px 9px 0 0; background: #fff; font-size: 13px; color: #202124; white-space: nowrap; overflow: hidden; }
.t-tab span { overflow: hidden; text-overflow: ellipsis; }
#tabFav { display: inline-flex; align-items: center; }
.k-fav-ico { width: 15px; height: 15px; fill: none; stroke: #5f6368; stroke-width: 2; flex: none; }
.k-fav { width: 15px; height: 15px; border-radius: 4px; flex: none; background: #5f6368; }
.t-bar { flex: none; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 10px; background: #fff; border-bottom: 1px solid #e3e3e8; }
.t-nav { display: flex; gap: 6px; color: #5f6368; }
.t-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.t-url { flex: 1; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 16px; background: #f1f3f4; font-size: 14px; color: #202124; overflow: hidden; white-space: nowrap; }
.t-url svg { width: 14px; height: 14px; fill: none; stroke: #5f6368; stroke-width: 2; flex: none; }
.t-exts { display: flex; align-items: center; gap: 6px; }
.t-ext { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; padding: 0; }
.t-ext img { width: 20px; height: 20px; border-radius: 5px; }
.t-ext.on { background: #e8eaed; }
.t-ext-puzzle svg { width: 18px; height: 18px; fill: none; stroke: #5f6368; stroke-width: 2; }
.t-page { position: relative; flex: 1; overflow: hidden; background: #fff; }
.t-window.dark .t-tabs { background: #202124; } .t-window.dark .t-tab { background: #35363a; color: #e8eaed; }
.t-window.dark .t-bar { background: #35363a; border-color: #2a2a2e; } .t-window.dark .t-url { background: #202124; color: #e8eaed; }
.t-window.dark .t-page { background: #0d0d10; color: #ececf1; }
.t-window.bare .t-tabs, .t-window.bare .t-bar { display: none; }
.t-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.t-overlay > * { pointer-events: auto; }
.t-overlay > .k-cur, .t-overlay > .k-ring, .t-overlay > .k-mark, .t-overlay > .k-edge { pointer-events: none; }
.t-label { position: absolute; right: 14px; top: 8px; z-index: 9; padding: 4px 10px; border-radius: 999px; background: rgba(17, 17, 20, .82); color: #fff; font: 700 12px/1.3 "Segoe UI", system-ui, sans-serif; letter-spacing: .02em; }
.k-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Cursors */
.k-cur { position: absolute; left: 0; top: 0; z-index: 30; will-change: transform; transition: opacity .3s; }
.k-cur.away { opacity: 0; }
.k-arrow { display: block; width: 28px; height: 32px; transform-origin: 5px 4px; transition: transform .12s; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); }
.k-cur.press .k-arrow { transform: scale(.8); }
.k-tag { position: absolute; left: 22px; top: 24px; padding: 3px 10px; border-radius: 999px; background: #ffe14a; color: #17130b; font: 800 11.5px/1.3 "Segoe UI", system-ui, sans-serif; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .32); }
.k-cur.leerling .k-tag { background: #fff; color: #111; box-shadow: 0 4px 14px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .12); }
.k-bub { position: absolute; left: 28px; top: 50px; width: max-content; max-width: 260px; padding: 8px 12px; border-radius: 4px 15px 15px 15px; background: rgba(17, 15, 28, .93); color: #f6f4ff; font: 600 13px/1.38 "Segoe UI", system-ui, sans-serif; box-shadow: 0 8px 26px rgba(0, 0, 0, .38); animation: kPop .28s cubic-bezier(.3, 1.5, .6, 1); }
.k-dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.k-dots u { width: 6px; height: 6px; border-radius: 50%; background: #ffe14a; animation: kDot 1s infinite; }
.k-dots u:nth-child(2) { animation-delay: .15s; } .k-dots u:nth-child(3) { animation-delay: .3s; }
.k-ring { position: absolute; z-index: 29; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid #ffe14a; animation: kRing .55s ease-out forwards; }
.k-ring.leerling { border-color: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.k-mark { position: absolute; z-index: 6; border-radius: 9px; border: 3px solid #ffe14a; background: rgba(255, 225, 74, .12); animation: kPop .3s ease; }
.k-mark.groen { border-color: #22d36b; background: rgba(34, 211, 107, .1); }
.k-mark.rood { border-color: #ff5a6e; background: rgba(255, 90, 110, .1); }
.k-focus { outline: 2px solid #ffe14a !important; outline-offset: 1px; }
.k-edge { position: absolute; left: 0; right: 0; top: 82px; bottom: 0; z-index: 4; border: 3px solid #ffe14a; }
.k-drive { position: absolute; left: 50%; top: 92px; z-index: 8; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(17, 15, 28, .86); color: #f4f2ff; font: 700 12px/1.3 "Segoe UI", system-ui, sans-serif; white-space: nowrap; }
.k-drive i { width: 8px; height: 8px; border-radius: 50%; background: #ff4d6d; animation: kRec 1.6s infinite; }

/* "Mag ik?" en vraagkaarten */
.k-ask { position: absolute; left: 50%; top: 128px; z-index: 20; transform: translateX(-50%); width: 400px; padding: 14px 16px; border-radius: 18px; background: rgba(16, 14, 26, .96); color: #fff; font: 14px/1.4 "Segoe UI", system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .1); animation: kPopC .35s cubic-bezier(.3, 1.5, .6, 1); }
.k-ask b { display: block; font-size: 14.5px; font-weight: 800; }
.k-ask span { display: block; margin-top: 3px; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.k-ask ol { margin: 8px 0 2px; padding-left: 22px; font-size: 13px; line-height: 1.5; }
.k-ask-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.k-ask button { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #fff; font: 800 13px/1 "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.k-ask button.main { background: #ffe14a; border-color: #ffe14a; color: #16130a; }
.k-ask-form { display: flex; gap: 8px; margin-top: 10px; }
.k-ask-form input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; font: 13px/1.2 "Segoe UI", system-ui, sans-serif; }

.k-login { position: absolute; left: 50%; top: 128px; z-index: 20; transform: translateX(-50%); width: 380px; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: rgba(16, 14, 26, .95); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .1); font: 14px/1.4 "Segoe UI", system-ui, sans-serif; animation: kPopC .35s cubic-bezier(.3, 1.5, .6, 1); }
.k-login-ico { flex: none; color: #ffe14a; }
.k-login-ico .k-ico { width: 24px; height: 24px; }
.k-login b { display: block; font-size: 14.5px; font-weight: 800; }
.k-login span { display: block; margin-top: 3px; font-size: 12.5px; color: rgba(255, 255, 255, .75); }

/* Taakkaart (linksonder) */
.k-hud { position: absolute; left: 16px; bottom: 16px; z-index: 18; width: 318px; max-height: 470px; display: flex; flex-direction: column; border-radius: 20px; background: rgba(16, 14, 26, .95); color: #f4f2ff; box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); overflow: hidden; font-family: "Segoe UI", system-ui, sans-serif; animation: kPop .3s ease; }
.k-hud.right { left: auto; right: 16px; }
.k-hud-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 8px; }
.k-av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #ffe14a; color: #17130b; font-weight: 800; font-size: 18px; }
.k-av::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: #ffe14a; animation: kSpin 1.1s linear infinite; }
.k-hud.fin .k-av::after { display: none; }
.k-who b { display: block; font-size: 14.5px; font-weight: 800; }
.k-who span { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255, 225, 74, .28); color: #fff; }
.k-hud.fin .k-who span { background: rgba(34, 211, 107, .25); }
.k-goal { padding: 0 14px 8px; font-size: 12.5px; line-height: 1.4; color: rgba(244, 242, 255, .72); }
.k-meter { display: flex; align-items: center; gap: 8px; padding: 0 14px 10px; font-size: 11px; font-weight: 700; color: rgba(244, 242, 255, .6); }
.k-meter em { font-style: normal; white-space: nowrap; }
.k-mbar { flex: 1; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.k-mbar u { display: block; height: 100%; width: 0; border-radius: 9px; background: #ffe14a; transition: width .6s ease; }
.k-steps { flex: 1; overflow: hidden; padding: 2px 8px 6px; }
.k-st { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 7px 6px; border-radius: 12px; }
.k-st.run { background: rgba(255, 225, 74, .14); }
.k-st i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .25); }
.k-st i .k-ico { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; }
.k-st.run i { border-color: transparent; border-top-color: #ffe14a; border-left-color: #ffe14a; animation: kSpin .8s linear infinite; }
.k-st.ok i { border: 0; background: #22d36b; }
.k-st.no i { border: 0; background: #ff5a6e; }
.k-st.skip i { border: 0; background: rgba(255, 255, 255, .18); }
.k-st b { display: block; font-size: 13px; font-weight: 700; color: #fff; }
.k-st.wait b { color: rgba(255, 255, 255, .55); }
.k-st span { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.35; color: rgba(244, 242, 255, .62); }
.k-st span:empty { display: none; }
.k-foot { display: flex; gap: 8px; padding: 8px 12px 12px; }
.k-foot button { flex: 1; height: 36px; border-radius: 12px; border: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font: 800 13px/1 "Segoe UI", system-ui, sans-serif; color: #fff; background: rgba(255, 255, 255, .1); }
.k-foot .k-stopbtn { background: #ff4d5e; }
.k-foot .k-ico { width: 14px; height: 14px; fill: currentColor; stroke: none; }

/* Melding van Windows */
.k-toast { position: absolute; right: 18px; bottom: 48px; z-index: 25; width: 360px; display: grid; gap: 4px; padding: 14px 16px; border-radius: 10px; background: #202020; color: #fff; font: 14px/1.4 "Segoe UI", system-ui, sans-serif; box-shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); animation: kToast .45s cubic-bezier(.2, 1, .3, 1); }
.k-toast.out { opacity: 0; transform: translateX(30px); transition: all .35s; }
.k-toast-app { display: flex; align-items: center; gap: 8px; color: #c9c9c9; font-size: 12px; }
.k-toast-app img { width: 16px; height: 16px; border-radius: 4px; }
.k-toast b { font-size: 14px; }
.k-toast span { color: #d4d4d4; font-size: 13px; }

/* Katerns popup onder het icoon */
.k-pop { position: absolute; top: 84px; right: 10px; z-index: 16; width: 400px; overflow: hidden; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .12); font: 15px/1.35 "Segoe UI", system-ui, sans-serif; animation: kPop .25s ease; display: flex; flex-direction: column; }
.k-pop.light { background: #fffaf1; color: #1c140c; }
.k-pop.dark { background: #0d0d10; color: #ececf1; }
.k-pop.light::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: #ff5a36; }
.k-ph-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px 28px; }
.k-ph-top img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 2px 2px 0 #1a140c; }
.k-ph-top b { font-size: 17px; }
.k-ph-gear { margin-left: auto; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #1a140c; border-radius: 999px; background: #fff; box-shadow: 2px 2px 0 #1a140c; }
.k-ph-title { margin: 8px 18px 10px 28px; font: 800 24px/1.15 "Segoe UI", system-ui, sans-serif; letter-spacing: -.03em; }
.k-ph-box { display: flex; align-items: center; gap: 8px; margin: 0 18px 0 28px; padding: 10px; border: 2px solid #1a140c; border-radius: 18px; background: #fff; box-shadow: 3px 3px 0 #1a140c; }
.k-ph-box button { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid #1a140c; border-radius: 50%; background: #fff; }
.k-ph-box .k-ph-send { background: #ffe14a; }
.k-ph-in { flex: 1; min-width: 0; border: 0; resize: none; background: transparent; font: 600 14px/1.35 "Segoe UI", system-ui, sans-serif; color: #1c140c; outline: none; }
.k-ph-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 18px 0 28px; }
.k-ph-card { display: grid; gap: 8px; justify-items: start; min-height: 84px; padding: 10px 12px; border: 2px solid #1a140c; border-radius: 14px; background: #fff; box-shadow: 3px 3px 0 #1a140c; text-align: left; font: 800 13.5px/1.25 "Segoe UI", system-ui, sans-serif; color: #1c140c; }
.k-ph-card i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #ffe14a; border: 2px solid #1a140c; }
.k-ph-card .k-ico { width: 16px; height: 16px; }
.k-ph-row { display: flex; align-items: center; gap: 8px; margin: 14px 18px 0 28px; font-size: 12.5px; font-weight: 700; }
.k-ph-plan { padding: 2px 8px; border: 2px solid #1a140c; border-radius: 999px; background: #c9f0d3; font-size: 11px; }
.k-ph-left { text-decoration: underline; }
.k-ph-gal { margin-left: auto; padding: 5px 10px; border: 2px solid #1a140c; border-radius: 999px; background: #fff; }

/* Chat van de agent (donker) */
.k-chatbox { display: flex; flex-direction: column; background: #0d0d10; color: #ececf1; }
.k-chat-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.k-chat-top img { width: 28px; height: 28px; border-radius: 8px; }
.k-chat-top > div > b { display: block; font-size: 15px; }
.k-chat-top > div > span { display: block; font-size: 12px; color: #9a9aa6; }
.k-chat-log { flex: 1; min-height: 0; overflow: hidden; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.k-msg { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; animation: kPop .2s ease; }
.k-msg.me { align-self: flex-end; background: #2a2a33; border-bottom-right-radius: 5px; }
.k-msg.kat { align-self: flex-start; background: transparent; padding-left: 0; padding-right: 0; max-width: 100%; }
.k-chat-bar { flex: none; display: flex; align-items: flex-end; gap: 8px; margin: 10px 12px 12px; padding: 8px; border-radius: 18px; border: 1px solid rgba(255, 225, 74, .55); background: #16161b; }
.k-chat-bar button { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #24242b; color: #ececf1; }
.k-chat-bar .k-chat-send { background: #ffe14a; color: #16130a; }
.k-chat-bar .k-chat-mic.on { background: #ff4d5e; color: #fff; }
.k-chat-bar .press { transform: scale(.88); }
.k-chat-in { flex: 1; min-width: 0; min-height: 34px; padding: 7px 4px; border: 0; resize: none; background: transparent; color: #ececf1; font: 14px/1.4 "Segoe UI", system-ui, sans-serif; outline: none; }
.k-task { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #16161b; border: 1px solid rgba(255, 255, 255, .07); }
.k-task b { font-size: 13.5px; }
.k-task-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.k-task-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c9c9d3; }
.k-task-steps li i { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .25); }
.k-task-steps li.run i { border-color: transparent; border-top-color: #ffe14a; border-left-color: #ffe14a; animation: kSpin .8s linear infinite; }
.k-task-steps li.ok i { border: 0; background: #22d36b; }
.k-task-steps li.ok { color: #ececf1; }
.k-task-steps li i .k-ico { width: 11px; height: 11px; stroke: #fff; stroke-width: 3; }

@keyframes kPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes kPopC { from { opacity: 0; transform: translateX(-50%) scale(.85); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes kDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes kRing { from { opacity: .95; transform: scale(.35); } to { opacity: 0; transform: scale(1.35); } }
@keyframes kSpin { to { transform: rotate(360deg); } }
@keyframes kRec { 50% { opacity: .35; } }
@keyframes kToast { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .k-cur, .k-ask, .k-hud, .k-toast, .k-pop, .k-msg, .k-mark, .t-sub.in { animation: none !important; transition: none !important; } }
