.site-assistant { position:fixed; right:22px; bottom:max(22px,env(safe-area-inset-bottom)); z-index:89; }
.site-assistant [hidden] { display:none!important; }
.assistant-launcher { display:flex; align-items:center; gap:10px; min-height:54px; padding:14px 19px; color:#fff; background:var(--control-reflection),linear-gradient(140deg,#6b338d,#392566); border:0; border-radius:24px; box-shadow:0 8px 15px rgba(25,15,50,.2),0 17px 42px rgba(39,21,70,.25),inset 0 1px 0 rgba(255,255,255,.4); font-family:inherit; font-size:14px; font-weight:600; line-height:1.3; cursor:pointer; transition:transform .2s,box-shadow .2s; }
.assistant-launcher:hover { transform:translateY(-3px); box-shadow:0 12px 19px rgba(25,15,50,.24),0 22px 45px rgba(39,21,70,.28),inset 0 1px 0 rgba(255,255,255,.5); }
.assistant-panel { position:absolute; right:0; bottom:70px; width:min(390px,calc(100vw - 36px)); max-height:min(670px,calc(100dvh - 130px)); display:flex; flex-direction:column; overflow:hidden; border-radius:26px; color:var(--ink); background:rgba(245,238,252,.98); box-shadow:0 15px 30px rgba(25,15,50,.2),0 35px 80px rgba(39,21,70,.2),inset 0 1px 0 rgba(255,255,255,.8); backdrop-filter:blur(20px); animation:assistant-appear .25s ease both; }
:root[data-theme="dark"] .assistant-panel { background:rgba(35,27,48,.98); }
.assistant-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:20px 22px; background:linear-gradient(135deg,rgba(140,107,203,.2),rgba(25,155,178,.18)); }
.assistant-heading strong { display:block; font-size:18px; line-height:1.3; }
.assistant-heading span { display:block; font-size:12px; color:var(--muted); margin-top:3px; }
.assistant-close { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:44px; height:44px; background:var(--light); border:0; border-radius:50%; color:var(--ink); font-size:27px; cursor:pointer; }
.assistant-content { padding:20px 22px; overflow-y:auto; overscroll-behavior:contain; min-height:0; }
.assistant-welcome { margin:0 0 16px; font-size:15px; }
.assistant-topics { display:flex; flex-wrap:wrap; gap:7px; }
.assistant-topics button { border:0; padding:9px 12px; min-height:40px; border-radius:15px; background:rgba(106,63,151,.13); color:var(--ink); font-family:inherit; font-size:12px; cursor:pointer; }
:root[data-theme="dark"] .assistant-topics button { background:rgba(170,133,216,.18); }
.assistant-topics button:hover { background:rgba(106,63,151,.23); }
.assistant-search { margin-top:21px; }
.assistant-search label { display:block; font-size:13px; font-weight:600; margin-bottom:8px; }
.assistant-search > div { display:flex; gap:8px; }
.assistant-search input { min-width:0; width:100%; border:1px solid var(--line); padding:11px 12px; border-radius:13px; color:var(--ink); background:var(--paper); font:inherit; font-size:14px; }
.assistant-search button { display:flex; align-items:center; justify-content:center; width:44px; flex-shrink:0; border:0; border-radius:13px; color:#fff; background:#553276; cursor:pointer; }
.assistant-results { margin-top:18px; }
.assistant-results:empty { margin:0; }
.assistant-results p { font-size:13px; line-height:1.7; }
.assistant-result { padding:14px 0; border-top:1px solid var(--line); }
.assistant-result h3 { margin:0 0 7px; font-size:16px; line-height:1.4; }
.assistant-result p { margin:0 0 9px; }
.assistant-result-links { display:flex; flex-wrap:wrap; gap:10px 16px; }
.assistant-result-links a { font-size:12px; font-weight:600; padding-block:6px; color:var(--purple); text-decoration:underline; text-underline-offset:4px; }
.assistant-contact { padding:15px 22px; background:var(--light); }
.assistant-contact p { margin:0 0 8px; font-size:13px; }
.assistant-contact > div { display:flex; gap:16px; flex-wrap:wrap; }
.assistant-contact a { font-size:13px; font-weight:600; color:var(--purple); padding-block:5px; }
.assistant-contact small { display:block; margin-top:6px; font-size:11px; line-height:1.5; color:var(--muted); }
.assistant-ai-choice { margin:0 0 18px; }
.assistant-ai-choice button { font:inherit; font-size:12px; min-height:40px; padding:9px 13px; border:0; border-radius:12px; cursor:pointer; color:var(--purple); background:var(--light); }
.assistant-ai-choice p { font-size:12px; line-height:1.65; }
.assistant-ai-choice .assistant-ai-accept { background:#553276; color:white; }
.assistant-user-message { padding:10px 13px; border-radius:14px; background:var(--light); overflow-wrap:anywhere; }
.assistant-ai-answer { white-space:pre-line; overflow-wrap:anywhere; }
.assistant-fallback { font-weight:600; }
.assistant-search button:disabled { cursor:wait; opacity:.65; }
body.menu-open .site-assistant { visibility:hidden; pointer-events:none; }
@keyframes assistant-appear { from { opacity:0; transform:translateY(10px) scale(.98); } to { opacity:1; transform:none; } }
@media(max-width:800px) { .site-assistant { right:16px; bottom:max(20px,env(safe-area-inset-bottom)); } .assistant-launcher { width:54px; height:54px; padding:14px; justify-content:center; border-radius:50%; } .assistant-launcher span { display:none; } .assistant-panel { right:0; bottom:68px; width:min(390px,calc(100vw - 32px)); max-height:calc(100dvh - 118px); } }
@media(prefers-reduced-motion:reduce) { .assistant-panel { animation:none; } .assistant-launcher { transition:none; } }
@media print { .site-assistant { display:none!important; } }
