.custom-shan-editor-page{max-width:860px;margin:0 auto;padding:2rem 1.25rem 3rem}.custom-shan-editor-state{justify-content:center;align-items:center;min-height:calc(100vh - 120px);display:flex}.custom-shan-editor-state-card,.custom-shan-editor-card{background:#fffffff5;border:1px solid #0000000f;border-radius:22px;box-shadow:0 18px 48px -28px #0f172a52}.custom-shan-editor-state-card{text-align:center;width:min(100%,720px);padding:2rem}.custom-shan-editor-spinner{border:3px solid #e86e3a2e;border-top-color:#e86e3a;border-radius:999px;width:2rem;height:2rem;margin:0 auto 1rem;animation:.8s linear infinite custom-shan-editor-spin}.custom-shan-editor-header{margin-bottom:1.25rem}.custom-shan-editor-back-link{color:#6b7280;align-items:center;gap:.5rem;margin-bottom:.9rem;font-weight:600;text-decoration:none;display:inline-flex}.custom-shan-editor-back-link:hover{color:#111827}.custom-shan-editor-back-link svg{width:1.1rem;height:1.1rem}.custom-shan-editor-page-title{color:#111827;letter-spacing:-.04em;margin:0;font-size:clamp(1.85rem,4vw,2.5rem);line-height:1.05}.custom-shan-editor-page-subtitle{color:#6b7280;margin:.55rem 0 0;line-height:1.6}.custom-shan-editor-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-bottom:1rem;display:grid}.custom-shan-editor-tab{color:#6b7280;min-height:48px;font:inherit;cursor:pointer;background:#ffffffeb;border:1px solid #00000014;border-radius:16px;font-weight:700;transition:transform .18s,box-shadow .18s,border-color .18s}.custom-shan-editor-tab.is-active{color:#d35f2d;background:linear-gradient(135deg,#fff6f1 0%,#fff1ea 100%);border-color:#e86e3a47;box-shadow:0 10px 24px -18px #d35f2dcc}.custom-shan-editor-card{padding:1.5rem}.custom-shan-editor-section+.custom-shan-editor-section{margin-top:2rem}.custom-shan-editor-section-title{color:#111827;margin:0 0 1rem;font-size:1.15rem}.custom-shan-editor-field+.custom-shan-editor-field{margin-top:1.1rem}.custom-shan-editor-field-label,.custom-shan-editor-knowledge-name,.custom-shan-preview-title{color:#111827;margin:0;font-weight:700}.custom-shan-editor-field-helper,.custom-shan-editor-knowledge-meta,.custom-shan-preview-subtitle{color:#6b7280;margin:.35rem 0 0;line-height:1.55}.custom-shan-editor-input,.custom-shan-editor-textarea{box-sizing:border-box;color:#111827;width:100%;font:inherit;resize:vertical;background:#fffffff5;border:1px solid #0000001f;border-radius:14px;padding:.9rem 1rem}.custom-shan-editor-textarea{min-height:9rem}.custom-shan-editor-textarea--compact{min-height:6rem}.custom-shan-editor-textarea--preview{resize:none;min-height:4rem}.custom-shan-editor-input:focus,.custom-shan-editor-textarea:focus{border-color:#e86e3a;outline:none;box-shadow:0 0 0 4px #e86e3a1f}.custom-shan-editor-icon-section{background:linear-gradient(135deg,#fff9f5 0%,#fff4ed 100%);border:1px dashed #e86e3a3d;border-radius:18px;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1rem;margin-bottom:1.25rem;padding:1rem;display:grid}.custom-shan-editor-icon-preview-wrap{width:84px;height:84px;position:relative}.custom-shan-editor-icon-preview,.custom-shan-preview-avatar{-o-object-fit:cover;object-fit:cover;background:#fff;border:2px solid #e86e3a29;border-radius:18px;width:100%;height:100%}.custom-shan-editor-icon-placeholder,.custom-shan-preview-avatar-fallback,.custom-shan-preview-message-avatar{color:#d35f2d;letter-spacing:.08em;background:linear-gradient(135deg,#fff1ea 0%,#ffe3d5 100%);border-radius:18px;justify-content:center;align-items:center;font-weight:800;display:inline-flex}.custom-shan-editor-icon-placeholder{cursor:pointer;width:84px;height:84px;font:inherit;border:2px dashed #e86e3a52;position:relative}.custom-shan-editor-icon-placeholder-main{font-size:1.2rem}.custom-shan-editor-icon-placeholder-badge{color:#fff;background:#e86e3a;border-radius:999px;justify-content:center;align-items:center;width:28px;height:28px;font-size:1rem;display:inline-flex;position:absolute;bottom:-6px;right:-6px;box-shadow:0 10px 20px -12px #e86e3acc}.custom-shan-editor-icon-remove{color:#b91c1c;width:28px;height:28px;font:inherit;cursor:pointer;background:#fff;border:1px solid #00000014;border-radius:999px;font-size:1.1rem;position:absolute;top:-8px;right:-8px}.custom-shan-editor-icon-copy{gap:.35rem;display:grid}.custom-shan-editor-knowledge-row{background:#f8fafceb;border:1px solid #0f172a0f;border-radius:16px;justify-content:space-between;align-items:center;gap:1rem;padding:.9rem 1rem;display:flex}.custom-shan-editor-knowledge-file{align-items:center;gap:.85rem;min-width:0;display:flex}.custom-shan-editor-knowledge-badge{color:#d35f2d;letter-spacing:.08em;background:#e86e3a1f;border-radius:14px;flex-shrink:0;justify-content:center;align-items:center;width:2.75rem;height:2.75rem;font-size:.72rem;font-weight:800;display:inline-flex}.custom-shan-editor-inline-actions,.custom-shan-editor-actions{flex-wrap:wrap;gap:.75rem;display:flex}.custom-shan-editor-actions{justify-content:flex-end;margin-top:1.75rem}.custom-shan-editor-actions--auth{justify-content:center;margin-top:1.5rem}.custom-shan-editor-primary-button,.custom-shan-editor-secondary-button,.custom-shan-editor-secondary-link,.custom-shan-editor-danger-button,.custom-shan-editor-ghost-button{min-height:44px;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:12px;justify-content:center;align-items:center;padding:.75rem 1.1rem;font-weight:700;text-decoration:none;transition:transform .18s,box-shadow .18s,border-color .18s;display:inline-flex}.custom-shan-editor-primary-button{color:#fff;background:linear-gradient(135deg,#e86e3a 0%,#d35f2d 100%);box-shadow:0 18px 28px -20px #d35f2dcc}.custom-shan-editor-secondary-button,.custom-shan-editor-secondary-link,.custom-shan-editor-ghost-button{color:#374151;background:#fff;border-color:#0000001a}.custom-shan-editor-danger-button{color:#fff;background:#dc2626}.custom-shan-editor-danger-button--ghost{color:#b91c1c;background:#dc262614}.custom-shan-editor-primary-button:hover,.custom-shan-editor-secondary-button:hover,.custom-shan-editor-secondary-link:hover,.custom-shan-editor-danger-button:hover,.custom-shan-editor-ghost-button:hover,.custom-shan-editor-tab:hover{transform:translateY(-1px)}.custom-shan-editor-primary-button:disabled,.custom-shan-editor-secondary-button:disabled,.custom-shan-editor-danger-button:disabled,.custom-shan-editor-ghost-button:disabled{opacity:.72;cursor:wait;transform:none}.custom-shan-editor-alert{border-radius:14px;margin-bottom:1rem;padding:.95rem 1rem;line-height:1.5}.custom-shan-editor-alert--error{color:#b91c1c;background:#dc262614;border:1px solid #dc262629}.custom-shan-editor-alert--info{color:#0369a1;background:#0ea5e914;border:1px solid #0ea5e929;margin:1rem 0 0}.custom-shan-preview{background:linear-gradient(#fefdfb 0%,#faf8f5 100%);border-radius:18px;flex-direction:column;min-height:620px;display:flex;overflow:hidden}.custom-shan-preview-header,.custom-shan-preview-input-row{background:#ffffffeb;border-bottom:1px solid #0000000f;justify-content:space-between;align-items:center;gap:.85rem;padding:1rem 1.25rem;display:flex}.custom-shan-preview-input-row{border-top:1px solid #0000000f;border-bottom:0;align-items:flex-end}.custom-shan-preview-heading{align-items:center;gap:.8rem;min-width:0;display:flex}.custom-shan-preview-avatar,.custom-shan-preview-avatar-fallback{flex-shrink:0;width:44px;height:44px}.custom-shan-preview-title{line-height:1.2}.custom-shan-preview-subtitle{margin-top:.2rem}.custom-shan-preview-messages{flex-direction:column;flex:1;gap:.9rem;padding:1rem 1.25rem;display:flex;overflow-y:auto}.custom-shan-preview-message{gap:.75rem;max-width:88%;display:flex}.custom-shan-preview-message.is-user{flex-direction:row-reverse;align-self:flex-end}.custom-shan-preview-message.is-assistant{align-self:flex-start}.custom-shan-preview-message.is-user .custom-shan-preview-message-body{color:#fff;background:linear-gradient(135deg,#e86e3a 0%,#d35f2d 100%);border-bottom-right-radius:6px}.custom-shan-preview-message.is-assistant .custom-shan-preview-message-body{color:#111827;background:#fffffff5;border:1px solid #0000000f;border-bottom-left-radius:6px}.custom-shan-preview-message.is-error .custom-shan-preview-message-body{color:#b91c1c;background:#fef2f2;border-color:#fecaca}.custom-shan-preview-message-avatar{flex-shrink:0;width:32px;height:32px}.custom-shan-preview-message-body{border-radius:16px;padding:.8rem 1rem}.custom-shan-preview-message-copy{white-space:pre-wrap;margin:0;line-height:1.6}.custom-shan-preview-streaming:after{content:"";vertical-align:text-bottom;background:currentColor;width:2px;height:1em;margin-left:.25rem;animation:1s infinite custom-shan-editor-blink;display:inline-block}.custom-shan-editor-hidden-input{display:none}@keyframes custom-shan-editor-spin{to{transform:rotate(360deg)}}@keyframes custom-shan-editor-blink{0%,50%{opacity:1}51%,to{opacity:0}}@media (width<=768px){.custom-shan-editor-page{padding:1.25rem 1rem 2.5rem}.custom-shan-editor-tabs,.custom-shan-editor-icon-section,.custom-shan-editor-knowledge-row,.custom-shan-preview-header,.custom-shan-preview-input-row,.custom-shan-editor-inline-actions,.custom-shan-editor-actions{flex-direction:column;grid-template-columns:1fr;align-items:stretch}.custom-shan-editor-primary-button,.custom-shan-editor-secondary-button,.custom-shan-editor-danger-button,.custom-shan-editor-ghost-button,.custom-shan-editor-secondary-link{width:100%}.custom-shan-preview-message{max-width:100%}}
