@keyframes blink{50%{opacity:0}}body{background:#f5f7fa;color:#1a1a2e;font-family:-apple-system,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;height:100vh;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;overscroll-behavior:none;height:100dvh;display:flex;flex-direction:column;overflow:hidden}#conv-selector-wrap,header{display:flex;align-items:center}header{padding:.9rem 1.5rem;background:#fff;border-bottom:1px solid #e8eaf0;gap:.6rem;flex-shrink:0;z-index:10}.header-dot{width:8px;height:8px;border-radius:50%;background:linear-gradient(135deg,#6c8ef7,#4fc3f7);flex-shrink:0}header h1{font-size:1.05rem;font-weight:600;color:#2d3a4a;letter-spacing:.01em}#conv-selector-wrap{margin-left:auto;gap:.5rem;position:relative}#conv-dropdown-wrap{position:relative}#conv-dropdown-btn{background:#f5f7fa;border:1.5px solid #e0e4ed;border-radius:1rem;color:#2d3a4a;padding:.28rem .9rem;font-size:.82rem;font-family:inherit;cursor:pointer;outline:0;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:.3rem}#conv-dropdown-btn:focus,#conv-dropdown-btn:hover{border-color:#6c8ef7}#conv-dropdown-menu{display:none;position:absolute;top:calc(100% + 6px);right:0;background:#fff;border:1px solid #e8eaf0;border-radius:.9rem;box-shadow:0 8px 24px rgba(0,0,0,.08),0 2px 8px rgba(0,0,0,.04);min-width:220px;max-width:280px;z-index:200;overflow:hidden;padding:.4rem}#conv-dropdown-menu.open{display:block;max-height:60vh;overflow-y:auto}#conv-search-input{width:100%;padding:6px 10px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;margin-bottom:4px;box-sizing:border-box;outline:0}#conv-search-input:focus,.login-field input:focus{border-color:#6c8ef7}#conv-search-input::placeholder{color:#bbb}.conv-item,.conv-item-icon{display:flex;align-items:center}.conv-item{padding:.5rem .65rem;cursor:pointer;border-radius:.6rem;transition:background .12s;gap:.5rem;position:relative}.conv-item:hover{background:#f5f7fa}.conv-item.active{background:#eef1fe}.conv-item-icon{flex-shrink:0;width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,#e8edf8,#dce4f5);justify-content:center;font-size:.65rem;color:#6c8ef7}.conv-item.active .conv-item-icon{background:linear-gradient(135deg,#d0d9f5,#bdd0f5)}.conv-item-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.1rem}.conv-item-title{font-size:.85rem;color:#2d3a4a;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:none}.conv-item.active .conv-item-title{color:#4a72d9}.conv-item-time{font-size:.71rem;color:#b0b8c8;white-space:nowrap}.conv-item-title-input{font-size:.85rem;font-family:inherit;color:#2d3a4a;background:#fff;border:1.5px solid #6c8ef7;border-radius:.35rem;padding:.1rem .4rem;outline:0;width:100%;box-sizing:border-box}.conv-item-actions{flex-shrink:0;display:flex;align-items:center;gap:.1rem;opacity:0;transition:opacity .15s}.conv-item:hover .conv-item-actions{opacity:1}.conv-action-btn{background:0 0;border:0;color:#b0b8c8;cursor:pointer;padding:.22rem;border-radius:.3rem;line-height:1;display:flex;align-items:center;transition:color .15s,background .15s}.conv-action-btn:hover{color:#6b7280;background:#e8eaf0}.conv-action-btn.delete:hover,.memory-del-btn:hover{color:#e05a5a;background:#fef0f0}#conv-select{display:none}#new-chat-btn{background:0 0;border:1.5px solid #e0e4ed;border-radius:1rem;color:#7a8fa8;padding:.3rem .8rem;font-size:.82rem;font-family:inherit;cursor:pointer;transition:border-color .15s,color .15s;white-space:nowrap}#new-chat-btn:hover{border-color:#6c8ef7;color:#6c8ef7}#user-info{display:flex;align-items:center;gap:.5rem;margin-left:.5rem}#username-label{font-size:.82rem;color:#5a6a80;font-weight:500}#logout-btn,#memory-btn{background:0 0;border:1.5px solid #e0e4ed;border-radius:1rem;color:#7a8fa8;padding:.28rem .75rem;font-size:.82rem;font-family:inherit;cursor:pointer;transition:border-color .15s,color .15s;white-space:nowrap}#logout-btn:hover{border-color:#e05a5a;color:#e05a5a}#memory-btn:hover{border-color:#6c8ef7;color:#6c8ef7}#memory-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.25);z-index:5000;align-items:center;justify-content:center}#memory-box,#memory-overlay.open{display:flex}#memory-box{background:#fff;border-radius:1.2rem;box-shadow:0 8px 32px rgba(0,0,0,.12);width:480px;max-width:95vw;max-height:80vh;flex-direction:column;overflow:hidden}#memory-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.2rem;border-bottom:1px solid #e8eaf0}#memory-header h3,#new-chat-header h3{font-size:1rem;font-weight:600;color:#2d3a4a}#memory-close{background:0 0;border:0;font-size:1.2rem;color:#b0b8c8;cursor:pointer;padding:.2rem .4rem;border-radius:.4rem;line-height:1}#memory-close:hover{color:#6b7280;background:#f0f0f0}#memory-body{flex:1;overflow-y:auto;padding:1rem 1.2rem}#memory-body::-webkit-scrollbar{width:4px}#memory-body::-webkit-scrollbar-thumb{background:#d0d5e0;border-radius:2px}.memory-empty{color:#b0b8c8;font-size:.9rem;text-align:center;padding:2rem 0}.memory-group{margin-bottom:1rem}.memory-group-label{font-size:.75rem;font-weight:600;color:#7a8fa8;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.4rem}.memory-item{display:flex;align-items:center;gap:.5rem;padding:.45rem .6rem;border-radius:.6rem;background:#f5f7fa;margin-bottom:.3rem}.memory-item-text{flex:1;font-size:.88rem;color:#2d3a4a;line-height:1.5}.memory-del-btn{flex-shrink:0;background:0 0;border:0;color:#c8cdd8;cursor:pointer;padding:.15rem .25rem;border-radius:.3rem;line-height:1;font-size:.8rem}#new-chat-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.25);z-index:5000;align-items:center;justify-content:center;padding:1rem}#new-chat-overlay.open{display:flex}#new-chat-box{background:#fff;border-radius:1.2rem;box-shadow:0 8px 32px rgba(0,0,0,.12);width:520px;max-width:100%;max-height:85vh;display:flex;flex-direction:column;overflow:hidden}#new-chat-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.2rem;border-bottom:1px solid #e8eaf0}#new-chat-close{background:0 0;border:0;font-size:1.2rem;color:#b0b8c8;cursor:pointer;padding:.2rem .4rem;border-radius:.4rem;line-height:1}#new-chat-close:hover{color:#6b7280;background:#f0f0f0}#new-chat-body{padding:1rem 1.2rem 1.2rem;display:flex;flex-direction:column;gap:.85rem;overflow-y:auto}.new-chat-option{width:100%;display:flex;align-items:flex-start;gap:.9rem;text-align:left;background:#f7f9fc;border:1px solid #e8eaf0;border-radius:1rem;padding:1rem;cursor:pointer;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,background .14s ease}.new-chat-option:hover{transform:translateY(-1px);border-color:#cfd9f6;background:#f3f6ff;box-shadow:0 8px 24px rgba(108,142,247,.12)}.new-chat-option:active{transform:translateY(0)}#login-overlay,.new-chat-option-icon{display:flex;align-items:center;justify-content:center}.new-chat-option-icon{flex-shrink:0;width:2.5rem;height:2.5rem;border-radius:.85rem;background:linear-gradient(135deg,#eef2ff,#e7f4ff);font-size:1.2rem}.new-chat-option-body{flex:1;min-width:0}#login-box h2,.new-chat-option-title{font-size:.96rem;font-weight:600;color:#2d3a4a;margin-bottom:.22rem}.new-chat-option-desc{font-size:.86rem;color:#6b7280;line-height:1.6}#login-overlay{position:fixed;inset:0;background:#f5f7fa;z-index:9999}#login-box{background:#fff;border:1px solid #e8eaf0;border-radius:1.2rem;padding:2rem 2.2rem;width:320px;box-shadow:0 8px 32px rgba(0,0,0,.08)}#login-box h2{font-size:1.1rem;margin-bottom:1.4rem;text-align:center}.login-field{margin-bottom:.9rem}.login-field label{display:block;font-size:.8rem;color:#7a8fa8;margin-bottom:.3rem}.login-field input{box-sizing:border-box;padding:.5rem .8rem;border:1.5px solid #e0e4ed;border-radius:.6rem;outline:0;transition:border-color .15s}#login-error{color:#e05a5a;font-size:.8rem;min-height:1.2em;margin-bottom:.6rem;text-align:center}#login-submit,.login-field input{width:100%;font-size:.9rem;font-family:inherit}#login-submit{padding:.55rem;background:linear-gradient(135deg,#6c8ef7,#4fc3f7);border:0;border-radius:.7rem;color:#fff;font-weight:600;cursor:pointer;transition:opacity .15s}#login-submit:hover{opacity:.88}#login-toggle{text-align:center;margin-top:.9rem;font-size:.8rem;color:#7a8fa8}#login-toggle a{color:#6c8ef7;cursor:pointer;text-decoration:none}#login-toggle a:hover{text-decoration:underline}#main{flex:1;display:flex;overflow:hidden;position:relative}#preview-pane{flex:0 0 62%;display:none;background:#eef1f8;border-right:1px solid #e0e4ed;position:relative;flex-direction:column}#preview-pane.visible{display:flex}#preview-header{display:flex;align-items:center;justify-content:flex-end;padding:.45rem .75rem;background:#f5f7fa;border-bottom:1px solid #e0e4ed;flex-shrink:0}#chat-toggle{display:flex;background:0 0}#chat-toggle:hover{border-color:#6c8ef7;color:#6c8ef7;background:#f0f3ff}#preview-iframe{flex:1;border:0;background:#fff;transition:opacity .3s ease}.preview-loading #preview-iframe{opacity:0}#resize-handle{width:5px;background:0 0;cursor:col-resize;flex-shrink:0;position:relative;z-index:10;display:none}#resize-handle::after{content:"";position:absolute;left:1px;top:20%;bottom:20%;width:3px;background:#e0e4ed;border-radius:3px;transition:background .15s}#resize-handle.dragging::after,#resize-handle:hover::after{background:#6c8ef7}#preview-pane.visible+#resize-handle{display:block}#chat-container,#chat-pane{flex:1;display:flex;flex-direction:column}#chat-pane{overflow:hidden;transition:flex .25s ease;min-width:300px}#chat-pane.collapsed{flex:0 0 0;min-width:0;overflow:hidden}#chat-container{overflow-y:auto;padding:1.5rem 1.25rem;gap:1rem;scroll-behavior:smooth}#chat-container::-webkit-scrollbar{width:5px}#chat-container::-webkit-scrollbar-track{background:0 0}#chat-container::-webkit-scrollbar-thumb{background:#d0d5e0;border-radius:3px}.message-row{display:flex;align-items:flex-end;gap:.5rem}.message-row.user{flex-direction:row-reverse}#input-area,.avatar{display:flex;flex-shrink:0}.avatar{width:30px;height:30px;border-radius:50%;align-items:center;justify-content:center;font-size:.7rem;font-weight:600}.avatar.ai{background:linear-gradient(135deg,#6c8ef7,#4fc3f7);color:#fff}.avatar.user{background:#e8eaf0;color:#6b7280}.message{max-width:88%;padding:.7rem 1rem;border-radius:1.1rem;line-height:1.65;word-break:break-word;font-size:.93rem}.message-row.user .message{white-space:pre-wrap;background:linear-gradient(135deg,#6c8ef7,#5ba4f5);color:#fff;border-bottom-right-radius:.3rem}.message-row.assistant .message{background:#fff;color:#2d3a4a;border-bottom-left-radius:.3rem;box-shadow:0 1px 4px rgba(0,0,0,.06)}.message.error{background:#fff0f0;color:#c0392b;box-shadow:0 1px 4px rgba(0,0,0,.06)}.message.streaming::after{content:"▋";animation:blink .65s step-end infinite;color:#6c8ef7}.ui-badge,.ui-generating{display:inline-block;margin-top:.4rem;padding:.2rem .55rem;border-radius:.5rem;font-size:.78rem;font-weight:500}.ui-badge{background:#e8f0fe;color:#4a72d9}.ui-generating{background:#f0f0f0;color:#888}#input-area{padding:.9rem 1.25rem 1rem;background:#fff;border-top:1px solid #e8eaf0;gap:.6rem;align-items:flex-end}#user-input{flex:1;background:#f5f7fa;border:1.5px solid #e8eaf0;border-radius:1.1rem;color:#2d3a4a;padding:.65rem 1rem;font-size:.93rem;font-family:inherit;resize:none;outline:0;max-height:140px;line-height:1.55;transition:border-color .15s}#user-input::placeholder{color:#b0b8c8}#user-input:focus{border-color:#6c8ef7;background:#fff}#send-btn{background:linear-gradient(135deg,#6c8ef7,#5ba4f5);border:0;border-radius:50%;color:#fff;width:40px;height:40px;flex-shrink:0;font-size:1.1rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity .2s,transform .1s}#send-btn:disabled{opacity:.45;cursor:not-allowed}#send-btn:not(:disabled):hover{opacity:.88}#send-btn:not(:disabled):active{transform:scale(.93)}#chat-toggle{position:fixed;bottom:1.5rem;right:1.5rem;z-index:100;display:none;background:linear-gradient(135deg,#6c8ef7,#5ba4f5);color:#fff;border:0;border-radius:2rem;padding:.6rem 1.1rem;font-size:.88rem;font-family:inherit;font-weight:500;cursor:pointer;box-shadow:0 4px 16px rgba(108,142,247,.35);transition:opacity .2s,transform .1s;gap:.4rem;align-items:center}#chat-toggle.visible{display:flex}#chat-toggle:hover{opacity:.88}#chat-toggle:active{transform:scale(.96)}.welcome{text-align:center;color:#c8ced8;font-size:.88rem;margin:auto;padding:2rem 0;line-height:2}.welcome strong{display:block;font-size:1.05rem;color:#7a8fa8;margin-bottom:.25rem}.thinking-box{margin-bottom:8px;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden;background:#fafafa}.thinking-box.thinking{border-color:#f0c060;background:#fffdf5}.thinking-header{display:flex;align-items:center;padding:8px 12px;cursor:pointer;user-select:none;gap:6px;font-size:14px;color:#666}.thinking-header:hover{background:#f0f0f0}.thinking-icon{font-size:16px}.thinking-label{font-weight:500;color:#333}.message pre,.thinking-time{color:#999;font-size:13px}.thinking-toggle{margin-left:auto;color:#999;font-size:12px}.thinking-content{padding:0 12px 10px;font-size:13px;color:#666;line-height:1.6;white-space:pre-wrap;word-break:break-word;max-height:300px;overflow-y:auto;border-top:1px solid #e8e8e8}.waiting-hint{color:#b0b8c8;font-style:italic;font-size:.88rem}.message pre{background:#1e1e1e;color:#d4d4d4;padding:12px;border-radius:8px;overflow-x:auto;margin:8px 0}.message code{background:rgba(0,0,0,.06);padding:2px 5px;border-radius:3px;font-size:13px}.message pre code{background:0 0;padding:0}.message ol,.message ul{padding-left:20px;margin:6px 0}.message li{margin:2px 0}.message p{margin:6px 0}.message h1,.message h2,.message h3{margin:10px 0 6px}.message blockquote{border-left:3px solid #ccc;margin:8px 0;padding:4px 12px;color:#666}.message table{border-collapse:collapse;margin:8px 0;width:100%}.message td,.message th{border:1px solid #ddd;padding:6px 10px;text-align:left}.message th{background:#f5f5f5}.message a{color:#4a9eff}.message-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:6px;opacity:.4;transition:opacity .2s}.message-row:hover .message-actions{opacity:1}.msg-action-btn{background:0 0;border:0;color:#888;font-size:12px;cursor:pointer;padding:2px 6px;border-radius:4px}.msg-action-btn:hover{background:rgba(0,0,0,.06);color:#333}.edit-textarea{width:100%;min-height:60px;border:1px solid #ddd;border-radius:6px;padding:8px;font-size:14px;resize:vertical;font-family:inherit;box-sizing:border-box}.edit-actions{display:flex;gap:8px;margin-top:6px;justify-content:flex-end}.edit-cancel,.edit-confirm{padding:4px 12px;border-radius:4px;border:0;cursor:pointer;font-size:13px}.edit-confirm{background:#4a9eff;color:#fff}.edit-cancel{background:#eee;color:#666}@media (max-width:768px){body{padding:0}header{padding:calc(.6rem + env(safe-area-inset-top)) .85rem .6rem;padding-left:calc(.85rem + env(safe-area-inset-left));padding-right:calc(.85rem + env(safe-area-inset-right));gap:.4rem;flex-wrap:nowrap}header h1{font-size:.95rem}#conv-selector-wrap{gap:.3rem}#conv-dropdown-btn{max-width:100px;padding:.22rem .6rem;font-size:.78rem}#new-chat-btn{padding:.22rem .55rem;font-size:.78rem}#user-info{gap:.3rem;margin-left:.3rem}#username-label{display:none}#logout-btn,#memory-btn{padding:.22rem .55rem;font-size:.78rem}#main{flex-direction:column!important}#preview-pane.visible{position:fixed;top:0;left:0;right:0;bottom:0;z-index:100;flex:none!important;width:100%!important;height:100%!important;border-right:none;padding-top:env(safe-area-inset-top)}#resize-handle{display:none!important}#chat-pane{flex:1;min-width:0}#chat-pane.collapsed{flex:0 0 0;min-height:0}#input-area{padding:.7rem .85rem .85rem;position:sticky;bottom:0;background:#fff;z-index:10;padding-bottom:calc(.85rem + env(safe-area-inset-bottom))}#chat-container{padding:1rem .85rem}#user-input{font-size:.9rem}.msg-action-btn{min-height:36px;min-width:36px;display:flex;align-items:center;justify-content:center}.message-actions{opacity:.6!important}#memory-box{width:95vw;max-height:85vh}#new-chat-box{width:95vw;max-height:90vh}#login-box{width:90vw;padding:1.5rem 1.2rem}#conv-dropdown-menu.open{position:fixed;top:calc(50px + env(safe-area-inset-top));left:0;right:0;bottom:0;max-height:none;max-width:none;border-radius:0;box-shadow:none;border:none}.mobile-preview-back{position:absolute;top:calc(8px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left));z-index:101;background:rgba(0,0,0,.6);color:#fff;padding:6px 14px;border-radius:20px;font-size:13px;cursor:pointer;border:0}}#ui-history-btn{background:linear-gradient(135deg,#6c8ef7,#4fc3f7);color:#fff;border:none;border-radius:.6rem;padding:.28rem .65rem;font-size:.8rem;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap}#ui-history-btn:hover{opacity:.88}#ui-history-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:8000;align-items:center;justify-content:center}#ui-history-overlay.open{display:flex}#ui-history-box{background:#fff;border-radius:1.2rem;width:520px;max-width:95vw;max-height:85vh;display:flex;flex-direction:column;box-shadow:0 8px 40px rgba(0,0,0,.18);overflow:hidden}#ui-history-header{display:flex;align-items:center;gap:.6rem;padding:1.1rem 1.4rem .9rem;border-bottom:1px solid #f0f2f7;flex-shrink:0}#ui-history-header h3{margin:0;font-size:1rem;font-weight:700;color:#2d3a4a;flex:1}.ui-history-header-actions{display:flex;gap:.4rem}.ui-filter-btn{background:#f5f7fa;border:1.5px solid #e0e4ed;border-radius:.5rem;padding:.22rem .7rem;font-size:.8rem;cursor:pointer;color:#7a8fa8;font-weight:500;transition:all .15s}.ui-filter-btn.active{background:linear-gradient(135deg,#6c8ef7,#4fc3f7);color:#fff;border-color:transparent}#ui-history-close{background:none;border:none;font-size:1.3rem;cursor:pointer;color:#b0b8c8;line-height:1;padding:.2rem .4rem;border-radius:.4rem}#ui-history-close:hover{background:#f5f7fa;color:#7a8fa8}#ui-history-body{overflow-y:auto;padding:1rem 1.2rem;display:flex;flex-direction:column;gap:.6rem;flex:1}.ui-snapshot-item{display:flex;align-items:center;gap:.7rem;padding:.75rem 1rem;background:#f8faff;border-radius:.8rem;border:1.5px solid #e8eaf0;transition:border-color .15s;cursor:pointer}.ui-snapshot-item:hover{border-color:#6c8ef7}.ui-snapshot-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:.2rem}.ui-snapshot-title{font-size:.9rem;font-weight:600;color:#2d3a4a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-snapshot-time{font-size:.75rem;color:#b0b8c8}.ui-snapshot-actions{display:flex;gap:.3rem;flex-shrink:0}.ui-snap-btn{background:none;border:1px solid #e0e4ed;border-radius:.45rem;padding:.2rem .45rem;font-size:.85rem;cursor:pointer;color:#7a8fa8;transition:all .15s}.ui-snap-btn:hover{background:#f0f2ff;border-color:#6c8ef7;color:#6c8ef7}.ui-snap-btn.active{color:#f5c000;border-color:#f5c000}.ui-snap-btn.delete:hover{background:#fff0f0;border-color:#e05a5a;color:#e05a5a}.ui-snap-btn.preview-btn:hover{background:#f0fff4;border-color:#34c78a;color:#34c78a}@media (max-width:768px){#ui-history-box{width:95vw;max-height:90vh}#ui-history-btn{padding:.22rem .5rem;font-size:.78rem}}
/* 按钮渐显动画 */
#memory-btn, #ui-history-btn {
    transition: opacity 0.6s ease, transform 0.4s ease;
}

/* 对话列表中的新对话按钮 */
.conv-item.new-chat-item {
    color: #6c8ef7;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 10px 14px;
}
.conv-item.new-chat-item:hover {
    background: #f0f4ff;
}

/* 头像可点击 */
.avatar { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.avatar:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.avatar:active { transform: scale(0.95); }

/* === 大堂经理 AI === */
.avatar.concierge {
    background: linear-gradient(135deg, #6c8ef7, #a78bfa);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.concierge-msg {
    background: #f0f4ff !important;
    border: 1px solid #e0e8ff;
}
.concierge-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.concierge-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: 1px solid #e0e8ff;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}
.concierge-btn:hover {
    background: #f0f4ff;
    border-color: #6c8ef7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108,142,247,0.12);
}
.concierge-btn:active {
    transform: translateY(0);
}
.concierge-btn-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    color: #1a1a2e;
}
.concierge-btn-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}
.concierge-btn.compact {
    display: inline-block;
    width: auto;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #6c8ef7;
    border-color: #6c8ef7;
}
.concierge-btn.compact:hover {
    background: #6c8ef7;
    color: #fff;
}
.concierge-btn.compact.secondary {
    color: #999;
    border-color: #ddd;
}
.concierge-btn.compact.secondary:hover {
    background: #f5f5f5;
    color: #666;
}

/* 旧世代 AI 区域 */
.concierge-old-section { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e0e8ff; }
.concierge-old-label { font-size: 12px; color: #aaa; margin-bottom: 8px; text-align: center; }
.recall-btn { min-width: 48px; text-align: center; font-size: 15px; font-weight: 600; }
.memory-old-gen { margin: 4px 0; }
.memory-old-gen summary { cursor: pointer; font-size: 13px; color: #888; padding: 4px 0; }
.memory-old-gen summary:hover { color: #6c8ef7; }

/* === 深色模式 === */
body.dark { background: #1a1a2e; color: #e0e0e0; }
body.dark header { background: #252540; border-bottom-color: #3a3a5c; }
body.dark .message { background: #252540; color: #e0e0e0; }
body.dark .message-row.user .message { background: #2a3a6a; color: #fff; }
body.dark #user-input { background: #252540; color: #e0e0e0; border-color: #3a3a5c; }
body.dark .welcome { color: #8888aa; }
body.dark .welcome strong { color: #c8ced8; }
body.dark #chat-pane { background: #1a1a2e; }
body.dark .send-area { background: #1a1a2e; border-top-color: #3a3a5c; }
body.dark .conv-item { color: #c8ced8; }
body.dark .conv-item:hover { background: #2a2a4a; }
body.dark .conv-item.active { background: #2a3a6a; }
body.dark #conv-dropdown-menu { background: #252540; border-color: #3a3a5c; }
body.dark #conv-dropdown-btn { background: #252540; color: #c8ced8; border-color: #3a3a5c; }
body.dark #conv-search-input { background: #1a1a2e; color: #e0e0e0; border-color: #3a3a5c; }
body.dark .thinking-box { background: #252540; border-color: #3a3a5c; }
body.dark .thinking-content { color: #aaa; }
body.dark .concierge-msg { background: #1e2548 !important; border-color: #2a3a6a; }
body.dark .concierge-btn { background: #252540; border-color: #3a3a5c; }
body.dark .concierge-btn:hover { background: #2a3a6a; border-color: #6c8ef7; }
body.dark .concierge-btn-title { color: #e0e0e0; }
body.dark .memory-group-label { color: #8888aa; }
body.dark .memory-item { border-color: #3a3a5c; }

/* 字体大小变量 */
:root { --font-size: 15px; }
.message { font-size: var(--font-size); }
#user-input { font-size: var(--font-size); }

/* 头像编辑框 */
.avatar-edit-box {
  position: absolute;
  top: 0;
  left: 44px;
  z-index: 100;
  background: #fff;
  border: 1px solid #e0e4ed;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  display: flex;
  gap: 4px;
  align-items: center;
}
body.dark .avatar-edit-box { background: #252540; border-color: #3a3a5c; }
.avatar-edit-input {
  width: 48px;
  padding: 4px 6px;
  border: 1px solid #e0e4ed;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  outline: none;
}
body.dark .avatar-edit-input { background: #1a1a2e; color: #e0e0e0; border-color: #3a3a5c; }
.avatar-edit-actions { display: flex; gap: 2px; }
.avatar-edit-ok, .avatar-edit-cancel {
  padding: 3px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.avatar-edit-ok { background: #6c8ef7; color: #fff; }
.avatar-edit-cancel { background: #f0f0f0; color: #999; }
body.dark .avatar-edit-cancel { background: #3a3a5c; color: #aaa; }

/* 界面切换动画 */
#preview-pane {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#preview-pane:not(.visible) {
  opacity: 0;
  transform: translateX(20px);
}
#preview-pane.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 内联确认条 */
.inline-confirm {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 50;
  border-radius: inherit;
  backdrop-filter: blur(4px);
}
body.dark .inline-confirm { background: rgba(30,30,50,0.95); }
.inline-confirm-msg { font-size: 13px; color: #555; }
body.dark .inline-confirm-msg { color: #aaa; }
.inline-confirm-yes {
  padding: 4px 14px;
  background: #e05a5a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.inline-confirm-no {
  padding: 4px 14px;
  background: #f0f0f0;
  color: #666;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
body.dark .inline-confirm-no { background: #3a3a5c; color: #aaa; }

/* 移动端大堂经理适配 */
@media (max-width: 768px) {
  .concierge-msg {
    max-width: 95% !important;
    padding: 12px !important;
  }
  .concierge-btn {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }
  .concierge-btn-desc {
    font-size: 12px !important;
  }
  .avatar-edit-box {
    left: 36px;
  }
  .inline-confirm-msg {
    font-size: 12px;
  }
  /* 语音和图片按钮 */
  #voice-btn, #image-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* + 按钮 */
#plus-btn {
  background: none;
  border: 1.5px solid #e0e4ed;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: #7a8fa8;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
#plus-btn:hover { border-color: #6c8ef7; color: #6c8ef7; }
#plus-btn.open { transform: rotate(45deg); color: #6c8ef7; border-color: #6c8ef7; }
body.dark #plus-btn { border-color: #3a3a5c; color: #8888aa; }

/* + 展开面板 */
#plus-panel {
  padding: 8px 16px 12px;
  background: #f8faff;
  border-top: 1px solid #e8eaf0;
  display: flex;
  gap: 20px;
  justify-content: center;
  animation: slideUp .2s ease;
}
body.dark #plus-panel { background: #252540; border-top-color: #3a3a5c; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.plus-panel-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: #5a6a80;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 12px;
  transition: background .15s;
  white-space: nowrap;
}
.plus-panel-btn span { font-size: 13px; }
.plus-panel-btn:hover { background: #eef1fe; }
body.dark .plus-panel-btn { color: #aaa; }
body.dark .plus-panel-btn:hover { background: #2a2a4a; }
.plus-panel-btn.recording { color: #e05a5a; }

/* 消息入场动画 */
.message-row {
  animation: msgIn .25s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* typing indicator */
.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  background: #b0b8c8;
  border-radius: 50%;
  animation: dotBounce .6s ease infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* 时间分隔线 */
.time-separator {
  text-align: center;
  color: #b0b8c8;
  font-size: 11px;
  padding: 8px 0;
  user-select: none;
}
body.dark .time-separator { color: #666; }

/* 消息时间 tooltip */
.message[title] { cursor: default; }

/* 用户身份卡片 */
#user-card {
  position: absolute;
  top: calc(100% + 6px);
  right: 12px;
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  padding: 12px 16px;
  z-index: 300;
  min-width: 140px;
  animation: slideUp .15s ease;
}
body.dark #user-card { background: #252540; border-color: #3a3a5c; }
#user-card-name {
  font-weight: 600;
  font-size: 14px;
  color: #2d3a4a;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f2f7;
}
body.dark #user-card-name { color: #e0e0e0; border-color: #3a3a5c; }
#user-card-logout {
  background: none;
  border: none;
  color: #e05a5a;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  width: 100%;
  text-align: left;
}
#user-card-logout:hover { text-decoration: underline; }
#user-card-actions button {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
  width: 100%;
  text-align: left;
  color: #4a5a6a;
  font-family: inherit;
}
#user-card-actions button:hover { text-decoration: underline; }
body.dark #user-card-actions button { color: #b0b8c8; }
#user-card-change-pw { color: #4a72d9 !important; }
#user-card-delete-account { color: #e05a5a !important; }
#user-card-logout { color: #e05a5a !important; }

/* 移动端用户入口 - 点击 header 标题区域 */
@media (max-width: 768px) {
  header h1 { cursor: pointer; }
  #user-card {
    top: calc(100% + 4px);
    right: auto;
    left: 12px;
  }
}

/* 修复 header position */
header { position: relative; }

/* 用户名可点击提示 */
#username-label { cursor: pointer; transition: color .15s; }
#username-label:hover { color: #6c8ef7; }

/* Message skeleton placeholder */
.msg-skeleton{padding:4px 0}
.skel-line{height:12px;border-radius:6px;margin:8px 0;background:linear-gradient(90deg,#e8eaed 25%,#f0f2f5 50%,#e8eaed 75%);background-size:200% 100%;animation:skelShimmer 1.5s infinite}
@keyframes skelShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
body.dark .skel-line{background:linear-gradient(90deg,#2a2d35 25%,#363940 50%,#2a2d35 75%);background-size:200% 100%;animation:skelShimmer 1.5s infinite}
