:root{color-scheme:light;--brand: #1a8cff;--brand-hover: #0d7aeb;--brand-soft: #e8f3ff;--panel: #ffffff;--text: #1f2329;--muted: #8f959e;--line: #eef0f3;--input-bg: #f4f5f7;--page-bg: #e8eef5;--chat-bg: #fafbfc;--danger: #e54d42;--ok: #07c160;--radius: 10px;--shadow: 0 12px 40px rgba(15, 35, 60, .14);font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif}*{box-sizing:border-box}html,body,#app{margin:0;height:100%;color:var(--text);background:var(--page-bg)}button,textarea,input{font:inherit}button{cursor:pointer}.page{height:100%;max-height:100dvh;display:flex;align-items:stretch;justify-content:center;overflow:hidden}.widget{width:100%;height:100%;max-height:100dvh;background:var(--panel);display:flex;flex-direction:column;overflow:hidden;min-height:0}.widget-header{flex-shrink:0;padding:12px 14px 14px;background:var(--brand);color:#fff}.widget-header-row{display:flex;align-items:flex-start;gap:6px}.widget-header-text{flex:1;min-width:0}.widget-header h1{margin:0;font-size:1rem;font-weight:600;line-height:1.35;letter-spacing:.01em}.widget-header p{margin:4px 0 0;font-size:.75rem;line-height:1.4;opacity:.88;font-weight:400}.toolbar{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-bottom:1px solid var(--line);background:#fff;flex:0 0 auto}.toolbar strong{font-size:.875rem;font-weight:600}.back-btn{border:0;background:transparent;color:inherit;padding:2px 4px 0 0;font-size:.8125rem;display:inline-flex;align-items:center;gap:2px;flex-shrink:0;line-height:1.35;opacity:.92}.back-btn svg{display:block;flex-shrink:0}.back-btn:hover{opacity:1}.toolbar .back-btn{color:var(--brand);opacity:1;padding:6px 4px}.bubble.bot.categories,.bubble.bot.guide{max-width:100%;width:100%;padding:0;background:transparent;border:none;box-shadow:none;color:inherit}.guide-panel{width:100%;display:flex;flex-direction:column;gap:12px}.guide-panel-head{display:flex;flex-direction:column;gap:6px;padding:0 2px}.guide-panel-label{display:inline-flex;align-self:flex-start;padding:2px 8px;border-radius:999px;background:var(--brand-soft);color:var(--brand);font-size:.6875rem;font-weight:600;letter-spacing:.04em;line-height:1.5}.guide-panel-title{margin:0;color:var(--text);font-size:.9375rem;font-weight:600;line-height:1.4}.guide-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:28px 18px 26px;border-radius:14px;background:#fff;border:1px solid var(--line);text-align:center}.guide-empty--compact{padding:18px 16px}.guide-empty-icon{width:44px;height:44px;margin-bottom:6px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--brand-soft);color:var(--brand)}.guide-empty-icon svg{width:28px;height:28px}.guide-empty-title{margin:0;color:var(--text);font-size:.875rem;font-weight:600;line-height:1.4}.guide-empty-desc{margin:0;color:var(--muted);font-size:.75rem;line-height:1.5}.category-list{display:flex;flex-direction:column;gap:8px}.category-card{display:flex;align-items:center;gap:10px;width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;text-align:left;color:inherit;transition:border-color .12s ease,background .12s ease,box-shadow .12s ease}.category-card:hover:not(:disabled){border-color:#cfe4ff;background:#f8fbff;box-shadow:0 2px 8px #1a8cff0f}.category-card:disabled{opacity:.55;cursor:not-allowed}.category-icon{flex-shrink:0;width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1rem;font-weight:700;line-height:1}.category-icon.tone-0{background:linear-gradient(135deg,#ff9a3d,#ff6b3d)}.category-icon.tone-1{background:linear-gradient(135deg,#3dd6a5,#1fbf8f)}.category-icon.tone-2{background:linear-gradient(135deg,#9b7bff,#6f5cff)}.category-icon.tone-3{background:linear-gradient(135deg,#4da3ff,#2f7dff)}.category-icon.tone-4{background:linear-gradient(135deg,#ff7eb3,#ff5c8a)}.category-icon.tone-5{background:linear-gradient(135deg,#45c2ff,#1ea7ff)}.category-icon.tone-6{background:linear-gradient(135deg,#9aa3af,#7b8491)}.category-meta{flex:1;min-width:0}.category-title{display:block;font-size:.875rem;font-weight:600;color:var(--text);line-height:1.35}.category-desc{display:block;margin-top:2px;font-size:.75rem;color:var(--muted);line-height:1.4}.category-chevron{flex-shrink:0;color:#c5cad3;font-size:1.125rem;line-height:1}.msg-links{display:flex;flex-direction:column;align-items:stretch;gap:6px}.msg-link{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:#fff;color:var(--text);font-size:.8125rem;line-height:1.45;text-align:left;transition:border-color .12s ease,background .12s ease,color .12s ease}.msg-link:hover:not(:disabled){border-color:#cfe4ff;background:#f8fbff;color:var(--brand);text-decoration:none}.msg-link:disabled{opacity:.55;cursor:not-allowed}.bubble-muted{margin-top:6px;color:var(--muted);font-size:.8125rem;line-height:1.5}.guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.guide-actions .action-btn:only-child{grid-column:1 / -1}.action-btn{border:0;padding:8px 12px;border-radius:var(--radius);font-size:.8125rem;font-weight:600}.action-btn.primary{background:var(--brand);color:#fff}.action-btn.primary:hover:not(:disabled){background:var(--brand-hover)}.action-btn.ghost{background:#fff;color:var(--brand);border:1px solid var(--brand)}.action-btn:disabled{opacity:.45;cursor:not-allowed}.state{padding:48px 12px;text-align:center;color:var(--muted);font-size:.875rem}.state.error{color:var(--danger)}.status-banner{flex:0 0 auto;padding:8px 14px;font-size:.75rem;text-align:center;background:#fff8e6;color:#b76e00;border-bottom:1px solid #f3e6c8}.status-banner.ok{background:#ecf9f2;color:#067647;border-bottom-color:#c6ead8}.chat-list{flex:1 1 0;min-height:0;overflow:auto;padding:14px 14px 10px;display:flex;flex-direction:column;gap:14px;background:var(--chat-bg);scrollbar-width:thin;scrollbar-color:#d0d5dd transparent}.chat-list::-webkit-scrollbar{width:4px}.chat-list::-webkit-scrollbar-thumb{background:#d0d5dd;border-radius:4px}.chat-list .state.tip{padding:8px 4px}.msg{display:flex;flex-direction:column;max-width:82%;min-width:0}.msg.me{align-self:flex-end;align-items:flex-end;max-width:92%}.msg.bot{align-self:flex-start;align-items:flex-start;max-width:92%}.msg.system{align-self:center;max-width:92%;align-items:center}.msg-row{display:flex;align-items:flex-start;gap:8px;max-width:100%;min-width:0}.msg-avatar{flex:0 0 32px;width:32px;height:32px;border-radius:50%;object-fit:cover;background:var(--brand-soft);box-shadow:0 0 0 1px #0f233c0a}.msg-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:flex-start}.msg-row--me .msg-main{align-items:flex-end}.msg-meta{margin:0 2px 5px;font-size:.6875rem;line-height:1;color:var(--muted);letter-spacing:.02em}.msg-system{padding:2px 10px;font-size:.75rem;line-height:1.45;color:var(--muted);text-align:center}.msg .bubble{max-width:100%;padding:10px 12px;border-radius:12px;line-height:1.55;font-size:.875rem;white-space:pre-wrap;word-break:break-word}.msg.bot .msg-main .bubble,.msg.me .msg-main .bubble{max-width:min(100%,280px)}.msg.me .bubble{background:var(--brand);color:#fff;border-bottom-right-radius:4px}.msg.bot .bubble{background:#fff;color:var(--text);border:1px solid var(--line);border-bottom-left-radius:4px}.msg.pending{opacity:.7}.msg.is-image .bubble{padding:0;background:transparent;border:none;box-shadow:none;color:inherit}.bubble{max-width:82%;padding:10px 12px;border-radius:12px;line-height:1.55;font-size:.875rem;white-space:pre-wrap;word-break:break-word}.bubble.me{align-self:flex-end;background:var(--brand);color:#fff;border-bottom-right-radius:4px}.bubble.bot{align-self:flex-start;background:#fff;color:var(--text);border:1px solid var(--line);border-bottom-left-radius:4px}.bubble.system{align-self:center;max-width:92%;background:transparent;border:none;color:var(--muted);font-size:.75rem;text-align:center;padding:2px 8px}.bubble-role{font-size:.6875rem;opacity:.7;margin-bottom:4px}.bubble.me .bubble-role{text-align:right}.bubble.is-image{padding:0;background:transparent;border:none;box-shadow:none;color:inherit}.bubble.me.is-image .bubble-role,.bubble.bot.is-image .bubble-role{color:var(--muted);padding:0 2px;margin-bottom:6px}.bubble.me.is-image .bubble-role{text-align:right}.msg .media,.bubble .media{margin-top:0}.msg .media img,.msg .media video,.bubble .media img,.bubble .media video{display:block;max-width:min(220px,70vw);max-height:220px;border-radius:10px}.msg.is-image .media img,.bubble.is-image .media img{background:transparent;border:none}.media-thumb{display:block;padding:0;margin:0;border:0;outline:none;background:transparent;box-shadow:none;appearance:none;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;cursor:zoom-in}.media-thumb:focus,.media-thumb:focus-visible,.media-thumb:active{border:0;outline:none;box-shadow:none}.media-thumb img{pointer-events:none;border:0;outline:none}.image-preview{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#000000db;overscroll-behavior:contain;touch-action:manipulation}.image-preview-img{display:block;max-width:min(100%,960px);max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.image-preview-close{position:absolute;top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:40px;height:40px;border:0;border-radius:999px;background:#ffffff29;color:#fff;font-size:1.5rem;line-height:1;display:flex;align-items:center;justify-content:center}.image-preview-close:hover{background:#ffffff47}.msg .file-card,.bubble .file-card{display:flex;flex-direction:column;gap:4px;margin-top:2px;padding:10px 12px;border-radius:8px;background:#0000000d;text-decoration:none;color:inherit;min-width:140px}.msg.me .file-card,.bubble.me .file-card{background:#ffffff2e}.msg .file-card strong,.bubble .file-card strong{font-size:.8125rem;word-break:break-all}.msg .file-card span,.bubble .file-card span{font-size:.75rem;opacity:.75}.bubble.pending{opacity:.7}.msg .bubble.typing,.bubble.typing{display:inline-flex;align-items:center;gap:5px;width:fit-content;padding:12px 14px}.msg .bubble.typing span,.bubble.typing span{width:5px;height:5px;border-radius:50%;background:#c0c4cc;animation:typing-dot 1.2s ease-in-out infinite}.msg .bubble.typing span:nth-child(2),.bubble.typing span:nth-child(2){animation-delay:.15s}.msg .bubble.typing span:nth-child(3),.bubble.typing span:nth-child(3){animation-delay:.3s}@keyframes typing-dot{0%,60%,to{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}.chat-actions{display:flex;gap:20px;justify-content:center;align-items:center;padding:6px 14px 2px;border-top:1px solid var(--line);background:#fff;flex:0 0 auto}.chat-actions .link-btn{border:0;background:transparent;color:var(--brand);font-size:.75rem;font-weight:500;padding:6px 2px;letter-spacing:.02em}.chat-actions .link-btn:hover:not(:disabled){opacity:.82}.chat-actions .link-btn:disabled{color:var(--muted);cursor:not-allowed}.composer{position:relative;flex:0 0 auto;padding:8px 12px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:#fff}.emoji-panel{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;margin-bottom:8px;padding:8px;border:1px solid var(--line);border-radius:10px;background:#fff;max-height:148px;overflow:auto}.emoji-panel button{border:0;background:transparent;font-size:1.25rem;line-height:1.4;padding:4px;border-radius:6px}.emoji-panel button:hover{background:var(--input-bg)}.composer-tools{display:flex;gap:2px;margin-bottom:8px}.composer-tools button{width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:#a0a6b0;display:inline-flex;align-items:center;justify-content:center;padding:0;transition:color .12s ease,background .12s ease}.composer-tools button:hover:not(:disabled),.composer-tools button.active{background:var(--brand-soft);color:var(--brand)}.composer-tools button:disabled{opacity:.35;cursor:not-allowed}.composer-tools svg{width:18px;height:18px}.composer-row{display:flex;align-items:center;gap:8px}.composer input{flex:1;height:38px;border:0;border-radius:10px;padding:0 14px;background:var(--input-bg);color:var(--text);outline:none}.composer input::placeholder{color:#b0b5bd}.composer input:disabled{opacity:.6}.composer .send-btn{flex-shrink:0;min-width:64px;height:38px;border:0;border-radius:10px;background:var(--brand);color:#fff;font-size:.875rem;font-weight:600;letter-spacing:.02em;transition:background .12s ease,opacity .12s ease}.composer .send-btn:hover:not(:disabled){background:var(--brand-hover)}.composer .send-btn:disabled{opacity:.4;cursor:not-allowed}.home-card{width:min(400px,calc(100% - 32px));margin:auto;padding:28px 24px;border-radius:12px;background:var(--panel);box-shadow:var(--shadow)}.home-card h1{margin:0 0 10px;font-size:1.125rem}.home-card p{margin:0;color:var(--muted);line-height:1.65;font-size:.875rem}.home-card code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.875em;color:var(--brand)}@media(min-width:768px){.page{height:100%;max-height:none;padding:28px 24px;align-items:center;justify-content:center;overflow:auto;background:radial-gradient(1200px 500px at 50% -10%,rgba(26,140,255,.14),transparent 60%),linear-gradient(180deg,#dfe8f3 0%,var(--page-bg) 48%,#e4ebf3 100%)}.widget{width:min(860px,100%);height:min(860px,calc(100dvh - 56px));max-height:min(860px,calc(100dvh - 56px));border-radius:12px;box-shadow:var(--shadow);border:1px solid rgba(15,35,60,.06)}.widget-header{padding:14px 18px 16px;border-radius:12px 12px 0 0}.widget-header h1{font-size:1.0625rem}.toolbar{min-height:44px;padding:0 18px}.chat-list{padding:18px 20px 12px;gap:16px}.msg{max-width:62%}.msg.system{max-width:80%}.msg .bubble,.bubble{max-width:100%;padding:11px 14px;font-size:.9375rem}.bubble{max-width:62%}.bubble.system{max-width:80%}.msg .media img,.msg .media video,.bubble .media img,.bubble .media video{max-width:min(380px,42vw);max-height:320px}.msg .file-card,.bubble .file-card{min-width:180px}.chat-actions{gap:28px;padding:8px 18px 4px}.chat-actions .link-btn{font-size:.8125rem}.composer{padding:10px 16px 14px}.emoji-panel{grid-template-columns:repeat(12,1fr);max-height:180px}.composer-tools button{width:34px;height:34px}.composer input{height:40px;padding:0 14px;font-size:.9375rem}.composer .send-btn{min-width:72px;height:40px}.guide-actions{max-width:320px}}@media(min-width:1200px){.widget{width:min(960px,100%)}.msg,.bubble{max-width:56%}.msg.system,.bubble.system{max-width:72%}}
