/* Support chat widget */
.kcs { position: fixed; right: 22px; bottom: 22px; z-index: 90; font-family: var(--font); }
.kcs-fab { position: relative; width: 58px; height: 58px; border: 0; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 18px 40px -12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .35s cubic-bezier(.16,1.2,.3,1), border-radius .35s; animation: kcsFab .7s cubic-bezier(.16,1.2,.3,1) 1.2s both; }
@keyframes kcsFab { from { opacity: 0; transform: translateY(20px) scale(.6); } }
.kcs.open .kcs-fab { transform: scale(.92); }
.kcs-fab svg { transition: transform .4s cubic-bezier(.16,1.2,.3,1); }
.kcs.open .kcs-fab svg { transform: rotate(90deg); }
.kcs-fab:hover { transform: translateY(-3px) rotate(-4deg); }
.kcs-fab .i { width: 26px; height: 26px; stroke-width: 2; }
.kcs.open .kcs-fab { border-radius: 50%; }
.kcs-dot { position: absolute; right: -3px; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--bad); border: 3px solid var(--bg); display: none; }
.kcs.unread .kcs-dot { display: block; animation: pulse 2s infinite; }
.kcs-panel { position: absolute; right: 0; bottom: 74px; width: min(390px, calc(100vw - 28px)); height: min(600px, calc(100vh - 120px)); padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden; background: radial-gradient(90% 40% at 50% 0%, rgba(139,92,246,.22), transparent 70%), #0b0a10; box-shadow: 0 40px 100px -30px #000, 0 0 0 1px rgba(0,0,0,.5); transform-origin: bottom right;
  opacity: 0; transform: translateY(18px) scale(.92); filter: blur(4px); transition: opacity .42s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.16,1.12,.3,1), filter .42s ease; }
.kcs.open .kcs-panel { opacity: 1; transform: none; filter: none; }
.kcs-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.kcs-av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-a); border: 1px solid var(--accent-b); }
.kcs-av img { width: 28px; }
.kcs-head b { display: block; font-size: 15px; }
.kcs-head small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kcs-head small i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.kcs-x { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.kcs-x:hover { background: var(--card-2); color: var(--text); }
.kcs-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.kcs-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; animation: kcsMsg .45s cubic-bezier(.16,1.1,.3,1) both; overflow-wrap: anywhere; transform-origin: bottom left; }
.kcs-msg.me { transform-origin: bottom right; }
@keyframes kcsMsg { from { opacity: 0; transform: translateY(10px) scale(.94); } }
.kcs-msg.is-typing { padding: 12px 16px; transition: opacity .16s, transform .16s; }
.kcs-msg.is-typing.out { opacity: 0; transform: scale(.9); }
.kcs-msg a { color: var(--accent-2); text-decoration: underline; }
.kcs-msg.bot { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.kcs-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); font-weight: 500; border-bottom-right-radius: 5px; }
.kcs-msg.staff { align-self: flex-start; background: linear-gradient(rgba(110,231,168,.12), rgba(110,231,168,.05)); border: 1px solid rgba(110,231,168,.35); border-bottom-left-radius: 5px; }
.kcs-msg.staff b { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--good); margin-bottom: 3px; }
.kcs-msg.sys { align-self: center; max-width: 100%; display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: var(--card); border: 1px dashed var(--line-2); }
.kcs-msg.sys .i { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent-2); }
.kcs-msg.err { color: var(--bad); }
.kcs-msg.wide { max-width: 100%; width: 100%; }
.kcs-typing { display: inline-flex; align-items: center; gap: 5px; height: 14px; }
.kcs-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); opacity: .45; animation: kcsWave 1.15s cubic-bezier(.45,0,.55,1) infinite; }
.kcs-typing i:nth-child(2) { animation-delay: .16s; } .kcs-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes kcsWave { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-6px); opacity: 1; } }
.kcs-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.kcs-chips:empty { display: none; }
.kcs-chips button { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .45s cubic-bezier(.16,1.1,.3,1), background .2s, color .2s; border: 1px solid var(--accent-b); background: var(--accent-a); color: var(--accent-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.kcs-chips button:hover { background: var(--accent); color: var(--accent-ink); }
.kcs-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.kcs-input input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0,0,0,.35); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.kcs-input input:focus { border-color: var(--accent); }
.kcs-input button { width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.kcs-staff { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 12px 12px; height: 38px; border: 1px solid var(--line-2); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.kcs-staff:hover { color: var(--text); border-color: var(--line-3); }
.kcs-staff .i { width: 16px; height: 16px; }
.kcs-ticket { display: grid; gap: 10px; }
.kcs-ticket label { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); }
.kcs-ticket input, .kcs-ticket textarea { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.35); color: var(--text); font: inherit; font-size: 13.5px; resize: vertical; }
.kcs-ticket small { font-size: 11.5px; color: var(--faint); }
.kcs-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
/* Discord-Pill sitzt jetzt links vom Chat-Button */
.discord-pill { right: 94px; bottom: 30px; }
@media (max-width: 560px) {
  .kcs { right: 12px; bottom: 12px; }
  .kcs-panel { position: fixed; left: 8px; right: 8px; bottom: 82px; width: auto; height: calc(100vh - 110px); }
  .discord-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) { .kcs * { animation: none !important; } }

.kcs-chips.show button { opacity: 1; transform: none; }
.kcs-chips.show button:nth-child(1) { transition-delay: 0ms, 0ms, 0s, 0s; }
.kcs-chips.show button:nth-child(2) { transition-delay: 55ms, 55ms, 0s, 0s; }
.kcs-chips.show button:nth-child(3) { transition-delay: 110ms, 110ms, 0s, 0s; }
.kcs-chips.show button:nth-child(4) { transition-delay: 165ms, 165ms, 0s, 0s; }
.kcs-chips.show button:nth-child(5) { transition-delay: 220ms, 220ms, 0s, 0s; }
.kcs-chips.show button:nth-child(6) { transition-delay: 275ms, 275ms, 0s, 0s; }
.kcs-chips.show button:nth-child(7) { transition-delay: 330ms, 330ms, 0s, 0s; }
.kcs-chips.show button:nth-child(8) { transition-delay: 385ms, 385ms, 0s, 0s; }
.kcs-msg.typed { white-space: pre-wrap; }

.rate-stars { display: inline-flex; gap: 2px; margin-left: 4px; }
.rate-star { font-size: 20px; line-height: 1; color: rgba(255,255,255,.25); background: none; border: 0; cursor: pointer; transition: color .15s, transform .15s; padding: 0 1px; }
.rate-star:hover { transform: scale(1.18); }
.rate-star.on { color: #ffd54a; }
