.assistant-launch{position:fixed;right:22px;bottom:116px;z-index:65;width:54px;height:54px;border-radius:50%;border:1px solid #d6f8a3;background:linear-gradient(135deg,#c9f98d,#91c34e);color:#17230e;display:grid;place-items:center;box-shadow:0 6px 24px #0005;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.assistant-launch svg{width:28px;height:28px}
.assistant-launch:hover{transform:scale(1.08);box-shadow:0 8px 30px #0008}
.assistant-panel{position:fixed;right:22px;bottom:180px;width:min(390px,calc(100vw - 24px));height:min(600px,70dvh);z-index:1100;display:flex;flex-direction:column;background:linear-gradient(170deg,#1d2431,#161b25);color:#edf1f8;border:1px solid #ffffff14;border-radius:22px;box-shadow:0 20px 70px #000a;overflow:hidden;backdrop-filter:blur(20px)}
.assistant-panel[hidden]{display:none}
.assistant-panel header{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid #ffffff10;background:#ffffff08}
.assistant-brand{display:flex;align-items:center;gap:10px;margin-right:auto;min-width:0}
.assistant-brand-avatar{width:38px;height:38px;flex:none;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#c9f98d,#91c34e);color:#17230e;box-shadow:0 4px 14px #0006}
.assistant-brand-avatar svg{width:24px;height:24px}
.assistant-brand-text{min-width:0}
.assistant-brand-text strong{display:block;font-size:15px;font-weight:700}
.assistant-brand-text small{display:block;font-size:10px;color:#9aa7bc;margin-top:2px;letter-spacing:.4px}
.assistant-panel header>button{cursor:pointer;border:0;border-radius:10px;background:#ffffff12;color:#edf1f8;padding:7px 12px;font-size:12px}
.assistant-panel header>button:hover{background:#ffffff1e}
.assistant-log{flex:1;min-height:0;overflow:auto;padding:16px 14px;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px}
.assistant-row{display:flex;gap:8px;align-items:flex-end;max-width:92%}
.assistant-row.assistant{align-self:flex-start}
.assistant-row.user{align-self:flex-end;flex-direction:row-reverse}
.assistant-avatar{width:26px;height:26px;flex:none;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#c9f98d,#91c34e);color:#17230e}
.assistant-avatar svg{width:16px;height:16px}
.assistant-row.user .assistant-avatar{background:linear-gradient(135deg,#7bd6fa,#3b86c4);color:#07202e}
.assistant-message{font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;background:#262e3c;border-radius:14px 14px 14px 4px;padding:11px 14px;box-shadow:0 3px 12px #0003}
.assistant-message.user{background:linear-gradient(135deg,#3a4b2d,#2c3a20);border-radius:14px 14px 4px 14px}
.assistant-panel form{display:flex;gap:8px;padding:12px 14px;border-top:1px solid #ffffff0d}
.assistant-panel textarea{flex:1;min-width:0;height:56px;resize:none;border:1px solid #3a4356;border-radius:14px;background:#111620;color:#fff;font:inherit;font-size:13px;padding:12px;line-height:1.5}
.assistant-panel textarea:focus{outline:none;border-color:#c9f98d88;box-shadow:0 0 0 2px #c9f98d22}
.assistant-panel form>button[type=submit]{align-self:flex-end;min-width:64px;cursor:pointer;border:0;border-radius:14px;background:linear-gradient(135deg,#c9f98d,#91c34e);color:#17230e;font-weight:700;padding:12px 14px;box-shadow:0 4px 14px #0006}
.assistant-panel form>button[type=submit]:hover{filter:brightness(1.08)}
.assistant-note{padding:6px 16px 2px;color:#9aa7bc;font-size:10px;line-height:1.6}
.assistant-draft{margin-top:12px;border-top:1px solid #ffffff22;padding-top:10px;background:#ffffff0a;border-radius:10px;padding:10px 12px}
.assistant-draft p{margin:4px 0 10px;max-height:180px;overflow:auto;font-size:12px}
.assistant-draft small{display:block;color:#bdc5d5}
.assistant-draft button{margin-top:10px;background:#b9ec77;color:#14200c;cursor:pointer;border:0;border-radius:9px;padding:8px 12px;font-weight:600}
.assistant-panel button:disabled{opacity:.5}
@media(max-width:700px){
  .assistant-launch{right:14px;bottom:calc(150px + env(safe-area-inset-bottom));width:46px;height:46px}
  .assistant-launch svg{width:24px;height:24px}
  .assistant-panel{right:10px;left:10px;bottom:calc(148px + env(safe-area-inset-bottom));width:auto;height:min(560px,66dvh);border-radius:20px}
}
body[data-current-view=chat] .assistant-launch{bottom:180px}
@media(max-width:700px){body[data-current-view=chat] .assistant-launch{bottom:calc(190px + env(safe-area-inset-bottom))}}

/* AI 助手：萌妹形象 + 聊天窗口美化（web28） */
.girl .eyes{transform-origin:center;animation:girl-blink 4.6s ease-in-out infinite}
@keyframes girl-blink{0%,88%,100%{transform:scaleY(1)}93%{transform:scaleY(.08)}}
.girl .twin{transform-origin:50% 6%;animation:girl-twin 4s ease-in-out infinite}
.girl .twin-r{animation-delay:.5s}
@keyframes girl-twin{0%,100%{transform:rotate(0)}50%{transform:rotate(-5deg)}}
.assistant-launch{background:linear-gradient(135deg,#332a40,#221a2c);border:1.5px solid #d9f7a8;box-shadow:0 0 0 4px #c9f98d1f,0 6px 24px #0009;animation:launch-glow 3.6s ease-in-out infinite}
.assistant-launch svg{width:36px;height:36px;animation:girl-bob 3.2s ease-in-out infinite}
@keyframes girl-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2.6px)}}
@keyframes launch-glow{0%,100%{box-shadow:0 0 0 3px #c9f98d14,0 6px 24px #0009}50%{box-shadow:0 0 0 7px #c9f98d2b,0 10px 32px #000b}}
.assistant-panel{background:linear-gradient(175deg,#1e2634,#141a24)}
.assistant-panel::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#c9f98d,#7bd6fa,#ffb8e0);z-index:1}
.assistant-brand-avatar{position:relative;background:linear-gradient(135deg,#ffe6cf,#ffcfa8);color:#5a3317;box-shadow:0 4px 16px #0009,inset 0 0 0 1px #ffffff44}
.assistant-brand-avatar::after{content:'';position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:#b9ec77;border:2px solid #1a2130;box-shadow:0 0 6px #b9ec77}
.assistant-brand-avatar svg{width:28px;height:28px}
.assistant-brand-text small{display:flex;align-items:center;gap:4px}
.assistant-brand-text small::before{content:'';width:6px;height:6px;border-radius:50%;background:#b9ec77;box-shadow:0 0 6px #b9ec77aa}
.assistant-panel header{background:linear-gradient(180deg,#ffffff10,#ffffff04);border-bottom:1px solid #ffffff12}
.assistant-row.assistant .assistant-avatar{background:linear-gradient(135deg,#ffe6cf,#ffcfa8);box-shadow:0 2px 8px #0005}
.assistant-avatar svg{width:20px;height:20px}
.assistant-message{background:linear-gradient(160deg,#2b3446,#242c3a);border:1px solid #ffffff0c;border-radius:16px 16px 16px 6px}
.assistant-row.user .assistant-avatar{font-size:11px;font-weight:700}
.assistant-message.user{border-radius:16px 16px 6px 16px;border:1px solid #ffffff0c}
.assistant-panel textarea{border-radius:16px;background:#0e1420;border-color:#33405a}
.assistant-panel form>button[type=submit]{border-radius:16px;min-width:68px}
.assistant-log{scrollbar-width:thin;scrollbar-color:#3a4356 transparent}
.assistant-panel form{padding:12px 14px 14px}
.assistant-draft{border:1px solid #ffffff10}
@media(max-width:700px){.assistant-launch svg{width:28px;height:28px}.assistant-brand-avatar svg{width:22px;height:22px}.assistant-avatar svg{width:16px;height:16px}}
/* AI 助手：黄色圆脸表情版（web29） */
.smile .eyes{transform-origin:center;animation:girl-blink 4.6s ease-in-out infinite}
.assistant-launch{background:linear-gradient(135deg,#332a40,#221a2c)}
.assistant-launch svg{width:36px;height:36px;animation:girl-bob 3.2s ease-in-out infinite}
.assistant-brand-avatar{background:linear-gradient(135deg,#3b3247,#221c2c);color:#ffd94a}
.assistant-row.assistant .assistant-avatar{background:linear-gradient(135deg,#3b3247,#221c2c);color:#ffd94a}
.assistant-brand-avatar svg{width:30px;height:30px}
.assistant-avatar svg{width:22px;height:22px}
@media(max-width:700px){.assistant-launch svg{width:28px;height:28px}.assistant-brand-avatar svg{width:24px;height:24px}.assistant-avatar svg{width:17px;height:17px}}
/* AI 助手：引导聊天气泡 + 专业聊天窗口（web30） */
.assistant-bubble{position:fixed;right:86px;bottom:132px;z-index:64;max-width:236px;padding:11px 14px;background:linear-gradient(135deg,#fff7d6,#ffedb0);color:#5a3b00;font-size:13px;line-height:1.5;border-radius:14px 14px 4px 14px;box-shadow:0 10px 30px #000a;border:1px solid #ffd94a66;cursor:pointer;animation:bubble-in .5s cubic-bezier(.2,.9,.3,1.2);transition:opacity .4s}
.assistant-bubble::after{content:'';position:absolute;right:-7px;bottom:15px;border:7px solid transparent;border-left-color:#ffedb0;border-right:0}
.assistant-bubble.out{opacity:0}
@keyframes bubble-in{from{opacity:0;transform:translateY(10px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}
.assistant-bubble:hover{filter:brightness(1.05)}
.assistant-panel{border-radius:18px}
.assistant-panel header{padding:12px 16px}
.assistant-panel header>button{border-radius:12px;padding:8px 14px;font-size:12px;background:#ffffff14}
.assistant-panel header>button:hover{background:#ffffff24}
.assistant-log{padding:18px 16px;gap:14px}
.assistant-row.assistant .assistant-message{position:relative;background:linear-gradient(165deg,#2c3550,#232b3d);border-radius:4px 16px 16px 16px}
.assistant-row.user .assistant-message{position:relative;background:linear-gradient(135deg,#3f5a2c,#2f4320);border-radius:16px 4px 16px 16px}
.assistant-row .assistant-avatar{border:2px solid #ffffff14}
.assistant-row.user .assistant-avatar{border-color:#7bd6fa55}
.assistant-panel form{padding:10px 14px 14px;background:#ffffff08;border-top:1px solid #ffffff0d}
.assistant-panel textarea{min-height:44px;height:auto;max-height:120px;padding:11px 14px;border-radius:16px}
.assistant-note{padding:4px 16px 0;font-size:10px}
@media(max-width:700px){.assistant-bubble{right:70px;bottom:calc(160px + env(safe-area-inset-bottom));max-width:190px}}
body[data-current-view=chat] .assistant-bubble{bottom:196px}
@media(max-width:700px){body[data-current-view=chat] .assistant-bubble{bottom:calc(206px + env(safe-area-inset-bottom))}}