#ks-support, #ks-support * {
    box-sizing: border-box;
}
#ks-support {
    font-family: -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
    font-size: 14px;
    color: #edf5ff;
    position: fixed;
    z-index: 99999;
    right: 22px;
    bottom: 22px;
}
#ks-support button {
    font: inherit;
    cursor: pointer;
}
.ks-launch {
    width: 60px;
    height: 60px;
    border: 1px solid #69baff55;
    border-radius: 21px;
    background: linear-gradient(145deg,#36a5ff,#1262d8);
    color: white;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 35px #007bff45;
    transition: transform .2s;
    margin-left: auto;
    position: relative;
}
.ks-launch:hover {
    transform: translateY(-3px);
}
.ks-launch svg {
    width: 28px;
    height: 28px;
}
.ks-badge {
    position: absolute;
    right: -5px;
    top: -5px;
    background: #ff4d62;
    color: white;
    border-radius: 20px;
    padding: 3px 7px;
    font-size: 11px;
}
.ks-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 385px;
    height: 570px;
    max-height: calc(100dvh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0d1929;
    border: 1px solid #29425e;
    border-radius: 24px;
    box-shadow: 0 20px 80px #0008;
    animation: ks-enter .2s ease;
}
#ks-support [hidden] {
    display: none !important;
}
@keyframes ks-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.ks-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px;
    background: linear-gradient(120deg,#1b3550,#12253c);
    border-bottom: 1px solid #2c4259;
}
.ks-avatar {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: #2989ff24;
    border: 1px solid #2989ff55;
    border-radius: 14px;
    color: #75c5ff;
}
.ks-avatar svg {
    width: 25px;
    height: 25px;
}
.ks-heading {
    flex: 1;
    min-width: 0;
}
.ks-heading strong {
    font-size: 16px;
    color: #fff;
}
.ks-status {
    color: #9db6ce;
    font-size: 11px;
    margin-top: 4px;
}
.ks-close {
    border: 0;
    background: #ffffff0b;
    color: #b5c9de;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
}
.ks-close svg {
    width: 18px;
}
.ks-tabs {
    display: flex;
    gap: 5px;
    margin: 12px;
    padding: 4px;
    border-radius: 13px;
    background: #07111e;
}
.ks-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    color: #8ca5be;
    border-radius: 10px;
    padding: 10px 5px;
    font-size: 12px !important;
}
.ks-tabs button.active {
    background: #203b58;
    color: #fff;
}
.ks-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #36516d transparent;
}
.ks-message {
    align-self: flex-start;
    max-width: 91%;
    padding: 12px 14px;
    border-radius: 15px 15px 15px 4px;
    background: #1a3048;
    color: #e4effa;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.ks-message.mine {
    align-self: flex-end;
    background: #176bd5;
    color: #fff;
    border-radius: 15px 15px 4px 15px;
}
.ks-time {
    font-size: 10px;
    opacity: .65;
    text-align: right;
    margin-top: 5px;
}
.ks-quick {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ks-quick button {
    background: #13263b;
    color: #b9dbff;
    border: 1px solid #315578;
    border-radius: 11px;
    padding: 11px 13px;
    text-align: left;
    font-size: 13px !important;
}
.ks-quick button:hover {
    background: #203e5b;
}
.ks-ticket {
    color: #8faac4;
    font-size: 11px;
    text-align: center;
    padding: 5px 10px 10px;
}
.ks-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #243a51;
}
.ks-form input {
    flex: 1;
    min-width: 0;
    background: #081421;
    border: 1px solid #2c425c;
    border-radius: 12px;
    color: #fff;
    padding: 12px;
    outline: none;
    font: inherit;
    font-size: 16px;
}
.ks-form input:focus {
    border-color: #409bff;
}
.ks-send {
    flex-shrink: 0;
    width: 44px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: #2184ed;
    display: grid;
    place-items: center;
}
.ks-send:disabled {
    opacity: .5;
}
.ks-send svg {
    width: 21px;
    height: 21px;
}
.ks-footer {
    text-align: center;
    color: #718ba6;
    font-size: 10px;
    padding: 0 10px 11px;
}
@media(max-width: 600px) {
    #ks-support {
        right: 14px;
        bottom: max(16px,env(safe-area-inset-bottom));
    }
    .ks-launch {
        width: 55px;
        height: 55px;
        border-radius: 18px;
    }
    .ks-panel {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: max(8px,env(safe-area-inset-bottom));
        width: auto;
        height: 650px;
        max-height: calc(100dvh - 20px);
        border-radius: 21px;
    }
}
