/* SWEN V4.8.1 — compact floating controls, keep clear of fixed header/footer. */
body.nkbt-v4 {--swen-float-size:40px;--swen-ai-width:48px;--swen-ai-height:42px;--swen-float-gap:7px;--swen-float-right:max(12px,env(safe-area-inset-right,0px));}
.nkbt-v4 .nkbt-ai-widget {right:var(--swen-float-right);bottom:calc(var(--nkbt44-footer-height,62px) + 8px);}
.nkbt-v4 .nkbt-ai-toggle {width:var(--swen-ai-width);height:var(--swen-ai-height);min-width:0;padding:0;gap:3px;font-size:11px;line-height:1;box-shadow:0 4px 14px #1454b833;}
.nkbt-v4 .nkbt-ai-toggle svg {width:19px;height:19px;flex:none;}
.nkbt-v4 .nkbt-ai-panel {bottom:calc(var(--swen-ai-height) + 8px);height:min(620px,calc(100vh - var(--nkbt44-header-height,108px) - var(--nkbt44-footer-height,62px) - var(--swen-ai-height) - 24px));height:min(620px,calc(100dvh - var(--nkbt44-header-height,108px) - var(--nkbt44-footer-height,62px) - var(--swen-ai-height) - 24px));}
.nkbt-v4 .floating-buttons {right:calc(var(--swen-float-right) + (var(--swen-ai-width) - var(--swen-float-size))/2)!important;bottom:calc(var(--nkbt44-footer-height,62px) + var(--swen-ai-height) + 8px + var(--swen-float-gap))!important;gap:var(--swen-float-gap);width:var(--swen-float-size);align-items:center;z-index:1150;}
.nkbt-v4 .floating-buttons .float-btn {box-sizing:border-box;width:var(--swen-float-size);height:var(--swen-float-size);min-width:0;min-height:0;flex:0 0 var(--swen-float-size);padding:0;margin:0;font-size:17px;line-height:1;box-shadow:0 3px 12px #24496325;transition:background-color .2s,box-shadow .2s;}
.nkbt-v4 .floating-buttons .float-btn i1,.nkbt-v4 .floating-buttons .float-btn i {font-size:17px;line-height:1;}
.nkbt-v4 .floating-buttons .float-btn svg {width:21px;height:21px;}
.nkbt-v4 .floating-buttons .float-btn:hover {transform:none;box-shadow:0 3px 12px #24496340;}
/* Until JS enhances the group, do not reserve space for hidden links. */
.nkbt-v4 .floating-buttons:not(.active) > .sosmed {display:none;}
.nkbt-v4 .floating-buttons.active:not(.swen-float-ready) {max-height:calc(100vh - var(--nkbt44-header-height,108px) - var(--nkbt44-footer-height,62px) - var(--swen-ai-height) - 28px);overflow-y:auto;}
.nkbt-v4 .floating-buttons .swen-social-group[hidden] {display:none!important;}
.nkbt-v4 .floating-buttons .swen-social-group {position:absolute;bottom:calc(100% + var(--swen-float-gap));right:-5px;display:flex;flex-direction:column;align-items:center;gap:var(--swen-float-gap);padding:5px;max-height:var(--swen-social-room,240px);max-width:calc(100vw - 24px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;background:#f5faff;border:1px solid #c5dce8;border-radius:24px;box-shadow:0 4px 18px #24496317;}
.nkbt-v4 .floating-buttons .swen-social-group .sosmed {opacity:1;pointer-events:auto;transform:none;transition:none;flex-shrink:0;}
.nkbt-v4 .floating-buttons.swen-social-side .swen-social-group {bottom:0;right:calc(100% + 9px);display:grid;grid-template-columns:repeat(3,var(--swen-float-size));align-content:start;max-height:var(--swen-social-side-room,160px);border-radius:14px;padding:7px;gap:var(--swen-float-gap);}
.nkbt-v4 .floating-buttons .float-btn:focus-visible {outline:2px solid #087e9e;outline-offset:2px;}
html[data-theme="dark"] .nkbt-v4 .floating-buttons .swen-social-group {background:#20303c;border-color:#3c586b;}
@media(max-width:720px){body.nkbt-v4 {--swen-float-size:36px;--swen-ai-width:44px;--swen-ai-height:38px;--swen-float-gap:6px;--swen-float-right:max(9px,env(safe-area-inset-right,0px));}}
@media(max-height:460px){body.nkbt-v4 {--swen-float-size:34px;--swen-ai-width:44px;--swen-ai-height:36px;--swen-float-gap:5px;}}

/* SWEN 4.8.2: compact dock + movable circular chat bubble. */
.nkbt-v4 .floating-buttons.swen-float-ready {right:var(--swen-float-right)!important;bottom:calc(var(--nkbt44-footer-height,62px) + 8px)!important;}
.nkbt-v4 .floating-buttons.swen-float-ready .swen-social-group .wa-btn {opacity:1;pointer-events:auto;transform:none;color:#fff;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable {position:fixed;inset:auto;left:var(--swen-ai-x,0px);top:var(--swen-ai-y,0px);width:var(--swen-bubble-size,44px);height:var(--swen-bubble-size,44px);}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-toggle {float:none;width:100%;height:100%;border-radius:50%;display:flex;flex-direction:column;gap:0;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;box-shadow:0 3px 14px #1454b83b;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-toggle svg {width:21px;height:21px;pointer-events:none;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-toggle span {font-size:9px;line-height:10px;pointer-events:none;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-dragging .nkbt-ai-toggle {cursor:grabbing;box-shadow:0 5px 18px #1454b866;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-panel {position:fixed;inset:auto;left:var(--swen-panel-x,8px);top:var(--swen-panel-y,8px);width:var(--swen-panel-w, min(420px,calc(100vw - 16px)));height:var(--swen-panel-h,300px);min-height:0;max-height:none;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-head {flex-wrap:wrap;gap:4px 8px;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-head strong {font-size:13px;}
.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-head button {margin-left:auto;}
@media(max-height:420px){.nkbt-v4 .nkbt-ai-widget.swen-ai-movable .nkbt-ai-note {display:none;}}

.nkbt-v4 .swen52-global-dock{position:fixed;display:flex;flex-direction:column;align-items:center;gap:var(--swen-float-gap);overflow:visible}.nkbt-v4 .swen52-global-dock .float-btn{display:flex;align-items:center;justify-content:center;border:1px solid #d1e5ef;border-radius:50%;background:#fff;color:#087e9e;font-weight:700;text-decoration:none;cursor:pointer}.nkbt-v4 .swen52-global-dock .swen-social-group .float-btn{color:white}.nkbt-v4 .swen52-global-dock #socialToggle{color:#7776ce;font-size:25px}.nkbt-v4 .swen52-global-dock #themeToggle{color:#dba135}.nkbt-v4 .swen52-global-dock .wa-btn{color:white}
