.assistant-launch{position:static;z-index:auto;display:inline-grid;place-items:center;width:42px;height:42px;min-height:42px;padding:0;border:0;border-radius:50%;background:transparent;color:#fff;box-shadow:none;cursor:pointer;white-space:nowrap;transition:transform .2s ease,filter .2s ease}
.assistant-launch::before{content:"✦";font-size:24px;line-height:1;background:linear-gradient(135deg,#fff 2%,#f9a8d4 28%,#c4b5fd 55%,#7dd3fc 78%,#86efac 100%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 0 5px #ffffff99);animation:assistant-sparkle 2.8s ease-in-out infinite}.assistant-launch:hover{background:transparent;transform:scale(1.12);filter:brightness(1.12)}.assistant-launch[hidden]{display:none}
@keyframes assistant-sparkle{0%,100%{transform:scale(.94) rotate(-7deg);filter:drop-shadow(0 0 3px #ffffff70)}50%{transform:scale(1.12) rotate(7deg);filter:drop-shadow(0 0 8px #ffffffbb)}}
dialog.assistant-dialog{width:min(520px,calc(100vw - 32px));height:min(680px,calc(100dvh - 48px));max-width:none;max-height:none;margin:auto 24px 24px auto;padding:0;border:1px solid var(--line);border-radius:18px;background:var(--panel,#fff);color:var(--ink);box-shadow:0 24px 80px #0c173233;overflow:hidden}
dialog.assistant-dialog::backdrop{background:#10182866;backdrop-filter:blur(2px)}.assistant-panel{height:100%;display:flex;flex-direction:column;min-height:0}
.assistant-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px 14px;border-bottom:1px solid var(--line)}.assistant-header h2{margin:0;font-size:17px}.assistant-header p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5;max-width:365px}.assistant-header>div:last-child{display:flex;gap:6px}.assistant-close,.assistant-clear{border:0;background:transparent;color:var(--muted);padding:7px 9px;border-radius:8px;cursor:pointer}.assistant-close:hover,.assistant-clear:hover{background:var(--surface,#f4f6fa);color:var(--ink)}
.assistant-thread{flex:1;min-height:0;overflow:auto;list-style:none;margin:0;padding:18px;display:flex;flex-direction:column;gap:14px}.assistant-turn{display:flex;max-width:90%}.assistant-turn.user{align-self:flex-end}.assistant-turn.assistant{align-self:flex-start}.assistant-bubble{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:14px;padding:11px 14px;border-radius:15px;background:var(--surface,#f2f4f8)}.assistant-turn.user .assistant-bubble{background:#315ce8;color:#fff;border-bottom-right-radius:5px}.assistant-turn.assistant .assistant-bubble{border-bottom-left-radius:5px}
.assistant-form{display:flex;align-items:flex-end;gap:10px;padding:14px 16px 16px;border-top:1px solid var(--line)}.assistant-form textarea{flex:1;min-width:0;resize:vertical;min-height:44px;max-height:140px;border:1px solid var(--line);border-radius:12px;background:var(--bg,#fff);color:var(--ink);padding:11px 12px;font:inherit;font-size:14px}.assistant-form button{min-height:44px}.assistant-form button:disabled{opacity:.65}
@media(max-width:600px){.assistant-launch{width:40px;height:40px;min-height:40px}.assistant-launch::before{font-size:22px}dialog.assistant-dialog,dialog.assistant-dialog[open]{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;margin:0;border:0;border-radius:0}.assistant-header{padding-top:max(16px,env(safe-area-inset-top))}.assistant-form{padding-bottom:max(14px,env(safe-area-inset-bottom))}}
html[data-theme=dark] dialog.assistant-dialog{background:#141d2d;color:#edf2fa;border-color:#2e3d56}html[data-theme=dark] .assistant-bubble{background:#1d2a40}html[data-theme=dark] .assistant-form textarea{background:#111a2a;color:#edf2fa;border-color:#35445d}html[data-theme=dark] .assistant-close:hover,html[data-theme=dark] .assistant-clear:hover{background:#24324a;color:#edf2fa}
.assistant-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}.assistant-clear{white-space:nowrap}.assistant-close{font-size:20px;line-height:1;padding:4px 10px}
.assistant-launch:focus-visible,.assistant-close:focus-visible,.assistant-clear:focus-visible,.assistant-suggestions button:focus-visible{outline:2px solid var(--blue,#315ce8);outline-offset:3px}
.assistant-bubble p{margin:0}.assistant-bubble p+p,.assistant-bubble p+ul,.assistant-bubble p+ol,.assistant-bubble ul+p,.assistant-bubble ol+p,.assistant-bubble pre+p,.assistant-bubble p+pre{margin-top:8px}
.assistant-bubble ul,.assistant-bubble ol{margin:6px 0 0;padding-left:20px}.assistant-bubble li+li{margin-top:3px}
.assistant-bubble code{font-size:12.5px;background:#0b142b14;padding:1px 5px;border-radius:5px}.assistant-turn.user .assistant-bubble code{background:#ffffff2e}
.assistant-bubble pre{margin:8px 0 0;padding:10px 12px;border-radius:10px;background:#0b142b0f;overflow:auto;white-space:pre}.assistant-bubble pre code{background:none;padding:0}
.assistant-bubble a{color:var(--blue,#315ce8);text-decoration:underline;text-underline-offset:3px}
.assistant-turn.assistant.is-waiting .assistant-bubble{color:var(--muted)}.assistant-turn.assistant.is-notice .assistant-bubble{background:transparent;border:1px dashed var(--line);color:var(--muted)}
.assistant-turn .assistant-bubble{white-space:normal}.assistant-turn.user .assistant-bubble,.assistant-turn.is-notice .assistant-bubble,.assistant-turn.is-waiting .assistant-bubble{white-space:pre-wrap}
.assistant-turn.assistant:has(.assistant-suggestions){flex-direction:column;align-items:flex-start;gap:10px}
.assistant-suggestions{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.assistant-suggestions button{border:1px solid var(--line);background:var(--surface,#f4f6fa);color:var(--ink);border-radius:999px;padding:6px 12px;font:inherit;font-size:13px;text-align:left;cursor:pointer}.assistant-suggestions button:hover{border-color:#315ce8;color:#315ce8}
.assistant-form{flex-wrap:wrap}.assistant-hint{flex-basis:100%;color:var(--muted);font-size:11px}
html[data-theme=dark] .assistant-bubble code,html[data-theme=dark] .assistant-bubble pre{background:#ffffff14}html[data-theme=dark] .assistant-suggestions button{border-color:#35445d;background:#1d2a40;color:#edf2fa}
@media(prefers-reduced-motion:reduce){.assistant-launch,.assistant-launch::before{transition:none;animation:none}.assistant-launch:hover{transform:none}}
/* A code block must scroll inside the bubble, not widen it past the dialog. */
.assistant-turn{min-width:0}.assistant-bubble{min-width:0;max-width:100%}
.assistant-key{display:flex;flex-direction:column;gap:6px;padding:12px 16px 0;border-top:1px solid var(--line)}.assistant-key[hidden]{display:none}
.assistant-key label{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600}.assistant-key select{flex:1;min-width:0;min-height:36px;border:1px solid var(--line);border-radius:10px;background:var(--bg,#fff);color:var(--ink);padding:0 10px;font:inherit;font-size:13px}
.assistant-key small,.assistant-key p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.assistant-key a{color:var(--blue,#315ce8);text-decoration:underline;text-underline-offset:3px}
.assistant-key+.assistant-form{border-top:0}
html[data-theme=dark] .assistant-key select{background:#111a2a;color:#edf2fa;border-color:#35445d}
