.ntp-sac-root{position:fixed;right:20px;bottom:20px;z-index:900;font-family:inherit;color:#202124;line-height:1.45}
.ntp-sac-root *{box-sizing:border-box}
.ntp-sac-launcher{width:58px;height:58px;border:0;border-radius:50%;background:#1b5eaa;color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 14px rgba(0,0,0,.22);cursor:pointer;padding:15px}
.ntp-sac-launcher svg,.ntp-sac-form button svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ntp-sac-launcher.is-hidden{display:none}
.ntp-sac-panel{position:absolute;right:0;bottom:72px;width:min(360px,calc(100vw - 32px));height:min(500px,calc(100dvh - 110px));min-height:330px;background:#fff;border:1px solid #e5e7eb;border-radius:15px;box-shadow:0 8px 35px rgba(0,0,0,.2);display:flex;flex-direction:column;overflow:hidden}
.ntp-sac-panel[hidden]{display:none}
.ntp-sac-header{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;background:#1b5eaa;color:#fff;flex-shrink:0}
.ntp-sac-header strong{display:block;font-size:14px;font-weight:650}
.ntp-sac-header span{display:block;font-size:11px;opacity:.85;margin-top:2px}
.ntp-sac-close{border:0;background:transparent;color:#fff;font-size:27px;line-height:1;cursor:pointer;padding:2px 5px}
.ntp-sac-messages{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:9px;overscroll-behavior:contain}
.ntp-sac-message{max-width:88%;padding:9px 12px;border-radius:13px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
.ntp-sac-bot,.ntp-sac-typing{align-self:flex-start;background:#f1f3f5;border-bottom-left-radius:4px}
.ntp-sac-user{align-self:flex-end;background:#e8f1fb;color:#163d67;border-bottom-right-radius:4px}
.ntp-sac-typing{color:#6b7280;font-style:italic}
.ntp-sac-quick{display:flex;gap:6px;overflow-x:auto;padding:0 12px 10px;flex-shrink:0}
.ntp-sac-quick button{white-space:nowrap;border:1px solid #d7e2ef;background:#fff;color:#24527e;border-radius:18px;padding:6px 9px;font:inherit;font-size:11px;cursor:pointer}
.ntp-sac-quick button:disabled{opacity:.5}
.ntp-sac-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #edf0f2;flex-shrink:0}
.ntp-sac-form input{min-width:0;flex:1;height:40px;border:1px solid #d7dce1;border-radius:22px;padding:0 13px;font:inherit;font-size:13px;box-shadow:none}
.ntp-sac-form input:focus{outline:2px solid #9fc5ed;outline-offset:1px}
.ntp-sac-form button{width:40px;height:40px;flex:0 0 40px;border:0;border-radius:50%;background:#1b5eaa;color:#fff;padding:11px;cursor:pointer}
.ntp-sac-form button:disabled{opacity:.5;cursor:wait}
.ntp-sac-footnote{text-align:center;color:#7b8188;font-size:10px;padding:0 8px 8px;flex-shrink:0}
.ntp-sac-support-link{font-size:12px;padding-left:4px}
.ntp-sac-support-link a{color:#1b5eaa;text-decoration:underline}

/* Responsive fixed panel: use the browser's visible viewport, including when
   the on-screen keyboard is open. */
.ntp-sac-root{
  position:fixed;
  right:max(12px,env(safe-area-inset-right));
  bottom:max(12px,env(safe-area-inset-bottom));
  z-index:99990;
}
.ntp-sac-panel{
  position:fixed;
  right:max(12px,env(safe-area-inset-right));
  bottom:calc(82px + env(safe-area-inset-bottom));
  top:auto;
  width:min(360px,calc(100vw - 24px));
  height:min(500px,calc(100dvh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  min-height:250px;
  max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  border-radius:15px;
}
.ntp-sac-root.ntp-sac-keyboard-open .ntp-sac-panel{
  top:calc(var(--ntp-sac-vv-top, 0px) + 10px + env(safe-area-inset-top));
  bottom:auto;
  height:min(500px,calc(var(--ntp-sac-vv-height, 100dvh) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  min-height:0;
  max-height:calc(var(--ntp-sac-vv-height, 100dvh) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
@media(max-width:600px){
  .ntp-sac-launcher{width:48px;height:48px;padding:12px}
  .ntp-sac-panel{
    right:max(10px,env(safe-area-inset-right));
    bottom:calc(68px + env(safe-area-inset-bottom));
    width:min(340px,calc(100vw - 20px));
    height:min(420px,calc(100dvh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius:13px;
  }
  .ntp-sac-root.ntp-sac-keyboard-open .ntp-sac-panel{
    right:max(10px,env(safe-area-inset-right));
    width:min(340px,calc(100vw - 20px));
    height:min(500px,calc(var(--ntp-sac-vv-height, 100dvh) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    max-height:calc(var(--ntp-sac-vv-height, 100dvh) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  .ntp-sac-header{padding:10px 12px}
  .ntp-sac-messages{padding:10px;gap:7px}
  .ntp-sac-message{max-width:92%;padding:8px 10px;font-size:12px;line-height:1.4}
  .ntp-sac-quick{padding:0 10px 8px;gap:5px}
  .ntp-sac-form{padding:8px 10px;gap:7px}
  .ntp-sac-form input{height:40px;font-size:16px}
  .ntp-sac-form button{width:38px;height:38px;flex-basis:38px;padding:10px}
  .ntp-sac-footnote{font-size:9px;padding-bottom:6px}
}
@media(max-width:360px){
  .ntp-sac-panel{width:calc(100vw - 16px);right:8px}
  .ntp-sac-root{right:8px}
  .ntp-sac-root.ntp-sac-keyboard-open .ntp-sac-panel{width:calc(100vw - 16px);right:8px}
}
@media(prefers-reduced-motion:no-preference){.ntp-sac-launcher{transition:transform .15s ease}.ntp-sac-launcher:active{transform:scale(.96)}}
.ntp-sac-header-actions{display:flex;align-items:center;gap:5px}
.ntp-sac-new{width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:21px;line-height:1;cursor:pointer}
.ntp-sac-new:disabled{opacity:.55;cursor:wait}
.ntp-sac-quick[hidden]{display:none}
.ntp-sac-test-success{color:#087a35;font-weight:600}
.ntp-sac-test-error{color:#b42318;font-weight:600}
@media(prefers-reduced-motion:reduce){.ntp-sac-launcher{transition:none}}

.ntp-sac-handover{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid #e8e8e8;font-size:13px}
.ntp-sac-handover[hidden]{display:none}
.ntp-sac-handover span{font-weight:600}
.ntp-sac-handover a{display:inline-block;padding:6px 9px;border:1px solid #d5d5d5;border-radius:16px;text-decoration:none}
