/* Sparky chat widget */
.sparky{position:fixed;right:18px;bottom:18px;z-index:90;font-family:var(--font)}
.sparky-sr{position:absolute;left:-9999px}
.sparky-ico{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;
  background:var(--amber);color:var(--navy);flex:none}
.sparky-launch{display:flex;align-items:center;gap:10px;background:var(--navy);color:#fff;border:0;border-radius:99px;
  padding:8px 20px 8px 8px;font:inherit;font-weight:700;font-size:1rem;cursor:pointer;box-shadow:0 8px 24px rgba(8,20,36,.3)}
.sparky-launch:hover{background:var(--navy-2)}
.sparky-open .sparky-launch{display:none}
.sparky-panel{width:372px;max-width:calc(100vw - 24px);height:min(560px,calc(100vh - 36px));height:min(560px,calc(100dvh - 36px));
  background:#fff;border-radius:14px;box-shadow:0 16px 48px rgba(8,20,36,.35);display:flex;flex-direction:column;overflow:hidden;
  border:1px solid var(--line)}
.sparky-panel[hidden]{display:none}
.sparky-head{display:flex;align-items:center;gap:12px;background:var(--navy);color:#fff;padding:12px 14px}
.sparky-head div{flex:1;line-height:1.25}
.sparky-head strong{display:block;font-size:1.05rem}
.sparky-head small{color:#c5d0de;font-size:.8rem}
.sparky-close{background:none;border:0;color:#fff;font-size:1.7rem;line-height:1;cursor:pointer;padding:2px 8px;border-radius:6px}
.sparky-close:hover{background:rgba(255,255,255,.14)}
.sparky-warn{margin:0;padding:8px 14px;background:#fff4d1;border-bottom:1px solid #f0d98a;color:#4a3b00;font-size:.8rem;line-height:1.4}
.sparky-log{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--tint)}
.sparky-msg{max-width:86%;padding:10px 13px;border-radius:14px;font-size:.95rem;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.sparky-bot{background:#fff;border:1px solid var(--line);align-self:flex-start;border-bottom-left-radius:4px;color:var(--ink)}
.sparky-user{background:var(--navy);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.sparky-typing{color:var(--muted);font-style:italic}
.sparky-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 14px;background:var(--tint)}
.sparky-chips:not(:empty){padding-bottom:12px}
.sparky-chips button{background:#fff;border:1.5px solid var(--navy);color:var(--navy);border-radius:99px;padding:6px 12px;
  font:inherit;font-size:.86rem;font-weight:600;cursor:pointer}
.sparky-chips button:hover{background:var(--navy);color:#fff}
.sparky-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line);align-items:flex-end}
.sparky-form textarea{flex:1;resize:none;border:1.5px solid #c3ccd8;border-radius:10px;padding:10px 12px;font:inherit;font-size:16px;
  line-height:1.35;max-height:110px}
.sparky-form button{width:44px;height:44px;border-radius:10px;border:0;background:var(--amber);color:var(--navy);cursor:pointer;
  display:flex;align-items:center;justify-content:center;flex:none}
.sparky-form button:hover{background:var(--amber-d)}
.sparky-note{margin:0;padding:0 12px 10px;font-size:.72rem;line-height:1.4;color:var(--muted)}
.sparky button:focus-visible,.sparky textarea:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
@media (max-width:480px){
  .sparky{right:12px;bottom:12px}
  .sparky-open{right:0;bottom:0;left:0;top:0}
  .sparky-open .sparky-panel{width:100%;max-width:none;height:100%;border-radius:0;border:0}
}
