/* 生成物 —— 勿手改，勿提交（static/bundles/ 已 gitignore）。
   真源与顺序：app/static_bundles.py::BUNDLES['shell-head.css']（5 个源文件）
   再生：重启进程（main.py 导入期自动）或
   PYTHONPATH=. .venv/bin/python scripts/build_static_bundles.py
   来源：
     - css/messages.css
     - css/items.css
     - css/my.css
     - runtime/shell/app-shell.css
     - runtime/shared/pullsearch.css
*/

/* ---- css/messages.css ---- */
                                             
                           --border*）见 mobile-shell.css :root。 */
                                                                  
                                                                
                                                       
                                                
                                                           
                                           
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

                                            
                                                        
                                           
.msg-header {
    height: 48px;
    background: var(--neu-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: sticky;
    top: 0;
                                                         
                                               
                               
                                                             
    z-index: 40;
}
.msg-header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.06rem;
    font-weight: 600;
    color: var(--text-1);
}
.msg-add-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
                                                           
                                          
    min-height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.msg-add-btn:hover { background: var(--primary-2); }
.msg-add-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
                                   
                                         
.msg-header-left-btn {
    width: 36px;
    height: 36px;
                                                       
    min-height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.msg-header-left-btn:hover { background: rgba(0, 0, 0, 0.06); }
.msg-header-left-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.msg-header-left-btn[hidden] { display: none; }
                                             
                                                        

                             
                                                     
                                             
                           
                                                  
                                          
                       
.msg-list-wrap {
    min-height: calc(100dvh - 48px - 52px - var(--tab-h) - env(safe-area-inset-bottom, 0px) + 1px);
}

                                                       
                                                     

                      
                                                  
                                                
                                                   
                                                                  
                               

                                                                
                                                       
                                                     
                                
.item-card.conv-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 3px 12px;
    min-height: 0;                                            
    padding: 10px 12px;
}

                                                         
.conv-card .item-cover-wrap.conv-avatar {
    width: 48px;
    height: 48px;
    grid-row: 1 / 3;
    align-self: center;
    border-radius: 50%;
    border: none;
    background: var(--primary-tint);
    overflow: hidden;
}
                                
.conv-card .conv-avatar-inner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-tint);
}
              
.conv-card .conv-avatar-inner.avatar-emoji {
    font-size: 1.75rem;
}

                                           
                       
.conv-card .item-info {
    grid-row: 1;
    grid-column: 2;
    padding-right: 56px;
}
                                     
.conv-card .item-info-top {
    display: flex;
    align-items: center;
    min-width: 0;
}
.conv-card .item-info-top .item-name {
    flex: 0 1 auto;
    min-width: 0;
}

                            
.conv-card .conv-name {
    color: var(--text-1);
}

          
.conv-card .msg-pin-tag {
    flex: none;
    font-size: 0.66rem;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 4px;
    padding: 0 4px;
    line-height: 1.4;
    margin-left: 8px;
}

                                                      
                                                      
                                                     
                                                           
                                                            
.conv-card .conv-agent-dot {
    display: inline-block;
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 6px;
    background: var(--text-muted);
}
.conv-card .conv-agent-dot[data-state="online"] {
    background: var(--ok);
}
.conv-card .conv-agent-dot[data-state="offline"] {
    background: var(--danger);
    box-shadow: 0 0 0 2px rgba(229, 62, 62, .25);
}

                                          
                                             
                                         
.conv-card .conv-footer {
    grid-row: 2;
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}
.conv-card .conv-footer-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
            
.conv-card .conv-preview {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
           
.conv-card .conv-preview.conv-preview-empty {
    color: var(--text-muted);
    font-style: italic;
}
                         
.conv-card .conv-footer-right {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
                                                         
                                                  
.conv-card .conv-time {
    position: absolute;
    top: 10px;
    right: 12px;
    flex: none;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

                                                            
                                                
                                            
.conv-card .item-menu-trigger {
    width: 22px;
    height: 22px;
    min-height: 22px;
    font-size: 1rem;
}
          
.conv-card .conv-unread {
    flex: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #fa5151;
    color: #fff;
    font-size: 0.66rem;
    line-height: 18px;
    text-align: center;
    font-weight: 600;
}

              
.conv-card.conv-card-pinned {
    background: var(--pin-wash);
}
.conv-card.conv-card-pinned:hover {
    background: var(--hairline);
}

                                             
                                                             
                                  

                               
.msg-actions { display: flex; flex-direction: column; gap: 8px; }
.msg-action-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--neu-bg);
    color: var(--text-1);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.1s;
}
.msg-action-btn:hover { background: var(--neu-bg); }
.msg-action-btn:active { background: var(--neu-inset); }
.msg-action-btn.danger { color: var(--danger); }

                                          
                                                        

                                                 
                                                              
                               

.msg-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}
.msg-empty-text { line-height: 1.8; color: var(--text-2); }
.msg-empty-text a { color: var(--primary); text-decoration: none; font-weight: 600; }
.msg-empty-sub { margin-top: 4px; font-size: 0.78rem; color: var(--text-muted); }
.msg-empty-sub strong { color: var(--primary); font-weight: 600; }
                                      
.msg-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 24px;
    font-size: 0.88rem;
}

/* ---- css/items.css ---- */
                                               
                                                                  
                                                                  
                                                                            
                                                                           
                                                                
                                          
                                                                            
                                                                      
                                                
        .container {
            margin: 0 auto;
        }
        .community-publish-btn {
            margin-left: auto;
            min-height: 36px;
            padding: 0 14px;
            border: none;
            border-radius: 18px;
            background: var(--primary);
            color: #fff;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s;
        }
        .community-publish-btn:hover { background: var(--primary-2); }
                                                              
                                                                 
        .community-publish-btn[hidden] { display: none; }
        h1 {
            text-align: center;
            color: var(--text-1);
            margin-bottom: 12px;
            margin-top: 0;
            font-size: 1.15rem;
        }
                                                               
                                                                      
                        

                                                         
                                       
                                                        
                                               
                                                                       
                                                  
                                                         
                                                                  
        .message {
            padding: 8px 12px;
            border-radius: 6px;
            margin-bottom: 10px;
            font-size: 0.9rem;
        }
                                                                          
        .message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
                                                     
                                   
        #messageBox {
            position: fixed;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 200;
            width: min(720px, 92vw);
        }
        .modal-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

                                                                  
                                                          
                                                                          
                                                           
                                                        
        .community-zone-caret {
            display: inline-block;
            margin-left: 4px;
            font-size: 1em;                                                
            color: var(--primary);
            cursor: pointer;
            padding: 6px 8px;                                    
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            touch-action: manipulation;
        }
        .community-zone-menu {
            position: absolute;
            top: 48px;                                                       
            left: 50%;
            transform: translateX(-50%);
            z-index: 60;
            min-width: 168px;
            background: var(--neu-bg);
            border: 1px solid var(--border, #e2e8f0);
            border-radius: 10px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
            padding: 6px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .community-zone-menu[hidden] { display: none; }
        .community-zone-option {
            border: none;
            background: transparent;
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 0.9rem;
            color: var(--text-1);
            text-align: left;
            cursor: pointer;
            min-height: 0;                                                  
        }
        .community-zone-option:hover { background: var(--neu-bg); }
        .community-zone-option.is-current {
            background: var(--neu-inset);
            color: var(--primary);
            font-weight: 600;
        }

/* ---- css/my.css ---- */
                                 
                                              
                                               
                                              
                                                                            
                                                                 
                                                                       
                                                                     
                                                   
                                                                          
        h1 { text-align: center; margin: 0 0 10px; font-size: 1.2rem; }
        h2 { font-size: 1.05rem; margin: 18px 0 10px; color: var(--text-1); }
        h2 .count { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; margin-left: 6px; }
        .card {
            background: var(--neu-bg);
            border-radius: 10px;
            box-shadow: 0 1px 4px rgba(0,0,0,.08);
            padding: 12px;
        }
        .empty { text-align: center; color: var(--text-muted); padding: 26px 0; font-size: 0.92rem; }
        .login-tip { text-align: center; padding: 60px 0; color: var(--text-2); }
        .login-tip a { color: var(--primary); text-decoration: none; }
                                                                    
                                                      
                                            
                                   
                                                     
                                         
                                        
                                                 
        .profile-card { margin-bottom: 10px; }                                                
                                                          
        .acc-title {
            font-size: 0.85rem;
            color: var(--text-1);
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
                                                             
        .acc-title-text {
            min-width: 0;
            display: inline-block;
        }
                                                       
                                                         
                                                 
        .acc-cover .acc-emoji { font-size: 2.2rem; line-height: 1; }
        .acc-action:active { transform: scale(.94); }
                                            
                                                      
                     
        .logout-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            min-height: 44px;
            margin-bottom: 10px;
            padding: 12px 14px;
            border: none;
            cursor: pointer;
            font: inherit;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--danger);
            -webkit-tap-highlight-color: transparent;
            transition: background-color .15s;
        }
        .logout-bar:hover { background: var(--danger-tint); }
        .logout-bar:active { background: var(--danger-tint); }
        .logout-bar:focus-visible { outline: 2px solid var(--danger); outline-offset: 2px; }
                                                 
                                        
        .fav-name, .qe-label, .acc-name {
            font-size: 0.72rem;
            color: var(--text-1);
            line-height: 1.3;
            text-align: center;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            word-break: break-all;
        }
        .fav-name { margin-top: 4px; }
        .qe-label { margin-top: 6px; max-width: 100%; }
        .acc-name { margin-top: 4px; }
                                                                
                                        
        .acc-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
            gap: 12px 10px;
        }
        .acc-icon { text-align: center; }
                                               
        .acc-cover {
            display: flex; align-items: center; justify-content: center;
            width: 100%; aspect-ratio: 1 / 1;
            border-radius: 14px;
            overflow: hidden;
            background: linear-gradient(135deg, var(--neu-bg), var(--primary-tint));
            box-shadow: 0 1px 3px rgba(30, 60, 110, .12);
            cursor: pointer;
        }
        .acc-cover:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
                                                         
                                                      
                                                     
                                           
                               
        .acc-cover .avatar {
            width: 100%; height: 100%;
            background: transparent;
            font-size: 2.2rem;
        }
                                                   
                                                  
                                          
                                                                       
        .emoji-fs-overlay {
            position: fixed;
            inset: 0;
            z-index: 4100;
            display: none;
            overflow: hidden;
            background: #1f2430;
            touch-action: none;
            overscroll-behavior: contain;
            user-select: none;
            -webkit-user-select: none;
            cursor: grab;
        }
        .emoji-fs-overlay.active { display: block; }
                                                               
                                                        
                                                      
        .emoji-fs-board {
            position: absolute;
            left: 0;
            top: 0;
            transform-origin: 0 0;
            background: var(--neu-bg);
            border-radius: 14px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
            display: grid;
            grid-template-columns: repeat(32, 44px);
            grid-auto-rows: 44px;
            gap: 4px;
            padding: 6px;
            will-change: transform;
            touch-action: none;
        }
        .emoji-picker-cell {
            width: 44px; height: 44px; font-size: 1.55rem; line-height: 1;
            background: var(--neu-bg); border: none; border-radius: 10px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
        }
        .emoji-picker-cell:hover { background: var(--neu-inset); }
        .emoji-picker-cell:active { background: var(--neu-inset); }
                                                                
                                                              
                                                  
                                              
                                                           
                                                         
                                 
        .api-token-desc { font-size: 0.82rem; color: var(--text-3); margin-bottom: 10px; }
                                            
                                                            
                                      
        .settings-window { padding: 16px 14px 24px; }
        .settings-inline { display: flex; align-items: center; gap: 8px; }
        .settings-inline input { flex: 1; min-width: 0; }
        .settings-inline .link-btn { flex: 0 0 auto; }
        .settings-avatar { flex: 0 0 auto; line-height: 0; }
                                                        
                        
        .settings-avatar .avatar { width: 52px; height: 52px; border-radius: 12px; }
        .settings-avatar-row .set-push { margin-left: auto; }
                                                
                            
        .settings-row-btn { display: flex; justify-content: flex-end; margin-bottom: 12px; }
        .set-card .settings-row-btn { margin-bottom: 0; }
        .set-card .settings-row-btn .link-btn { flex: 1; }
        .api-token-result { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
        .api-token-result[hidden] { display: none; }
                                                       
                            
        .api-token-window { padding: 16px 14px 24px; }
        .api-token-result input {
            flex: 1;
            min-width: 0;
            font-family: monospace;
            font-size: 0.82rem;
            padding: 8px 10px;
            border: 1px solid var(--border-soft, #edf2f7);
            border-radius: 8px;
            background: var(--neu-inset);
            color: var(--text-1);
            outline: none;
        }
        .api-token-result input:focus { border-color: var(--primary); }
                                         
                                                  
        .favorites-card { margin-bottom: 10px; }
        .fav-title {
            font-size: 0.85rem;
            color: var(--text-1);
            font-weight: 600;
            margin-bottom: 8px;
                                                           
                                                                  
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .fav-title-text { min-width: 0; flex: 1 1 auto; }
        .fav-title .fav-count { color: var(--text-muted); font-weight: 400; font-size: 0.78rem; margin-left: 6px; }
                                           
                                                    
                        
        .my-window-subtitle { text-align: center; color: var(--text-muted); font-size: 0.78rem; padding: 4px 0 10px; }
                                    
                                                                   
        .fav-edit-toolbar {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: none;
        }
        .fav-edit-btn {
            flex: none;
            min-height: 28px;
            padding: 4px 14px;
            background: transparent;
            color: var(--primary);
            border: 1px solid var(--primary);
            border-radius: 14px;
            font-size: 0.78rem;
            font-weight: 600;
            line-height: 1;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: background-color .15s, color .15s;
        }
        .fav-edit-btn:hover { background: var(--primary-tint); }
        .fav-edit-btn:active { background: var(--primary-tint); }
        .fav-edit-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
        .fav-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
            gap: 12px 10px;
        }
        .fav-icon {
            cursor: pointer;
            text-align: center;
            position: relative;                                                  
            z-index: 1;
        }
                        
                                                                                   
                                                                     
                                                                          
                                                       
                                                                   
        .fav-icon:has(.item-menu-popup.open) { z-index: 1000; }
        .fav-icon .item-menu-popup { z-index: 100; }
                                                    
                                                                    
                                   
        .fav-cover .item-menu { display: none; }
        .fav-cover {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;
            border-radius: 14px;
                                                                            
                                                                        
                                                     
            background: linear-gradient(135deg, var(--neu-bg), var(--primary-tint));
            box-shadow: 0 1px 3px rgba(30, 60, 110, .12);
        }
        .fav-cover img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 14px; }
                                  
        .fav-ph {
            position: absolute; inset: 0;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.5rem; font-weight: 700; color: var(--text-muted);
            border-radius: 14px;
        }
                                                            
        .fav-ph.fav-emoji { font-size: 2.4rem; font-weight: 400; line-height: 1; }
                                                 
        .fav-cover .item-menu {
            position: absolute;
            bottom: 4px;
            right: 4px;
            margin: 0;
            z-index: 2;
        }
        .fav-cover .item-menu-trigger {
            background: rgba(255, 255, 255, .9);
            box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
        }
        .fav-cover .item-menu-trigger:hover {
            background: var(--neu-inset);
            color: var(--text-1);
        }
                                              
                                                           
                                                             
                                                
                                                   
        .fav-icon-editing {
            cursor: grab;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
        }
        .fav-icon-editing:active { cursor: grabbing; }
                                                                        
        .fav-icon-editing:hover .fav-cover,
        .fav-icon-editing:active .fav-cover {
            box-shadow: 0 1px 3px rgba(30, 60, 110, .12);
        }
                                                  
                                         
        .fav-grid-manage {
            padding: 16px 14px 24px;
        }
                                                         
                                                         
                        
                                      
                                                              
        .fav-icon-editing.fav-dragging {
            opacity: .92;
            z-index: 999;
            box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
        }
                                          
                                                
                                                            
                                                           
                                                   
                                                       
                                          
                                                             
                                                     
        .fav-delete-x {
            position: absolute;
            top: -6px;
            right: -6px;
            width: 22px;
            height: 22px;
            min-width: 22px;
            min-height: 22px;
            max-width: 22px;
            max-height: 22px;
            aspect-ratio: 1 / 1;
            background: var(--danger);
            color: #fff;
            border: 2px solid #fff;
            border-radius: 50%;
            -webkit-border-radius: 50%;
            box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
            cursor: pointer;
            padding: 0;
            margin: 0;
            font-size: 14px;
            line-height: 1;
            font-weight: 700;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            z-index: 3;
            -webkit-tap-highlight-color: transparent;
            -webkit-appearance: none;
            appearance: none;
            box-sizing: border-box;
            transition: background-color .15s;
        }
        .fav-delete-x:hover { background: #ff7875; }
        .fav-delete-x:active { background: #d9363e; }
        .fav-delete-x:focus-visible { outline: 2px solid #d9363e; outline-offset: 2px; }
                                      
        .fav-icon.skeleton { cursor: default; pointer-events: none; }
        .fav-icon.skeleton .sk-cover {
            width: 100%; aspect-ratio: 1 / 1; border-radius: 14px;
            background-color: var(--neu-inset);
            background-image: linear-gradient(90deg, var(--neu-inset) 0%, var(--neu-bg) 50%, var(--neu-inset) 100%);
            background-size: 200% 100%;
            animation: favSkShimmer 1.4s ease infinite;
        }
        .fav-icon.skeleton .sk-line {
            height: 8px; width: 70%; margin: 8px auto 0; border-radius: 4px;
            background-color: var(--neu-inset);
            background-image: linear-gradient(90deg, var(--neu-inset) 0%, var(--neu-bg) 50%, var(--neu-inset) 100%);
            background-size: 200% 100%;
            animation: favSkShimmer 1.4s ease infinite;
        }
        @keyframes favSkShimmer {
            0%   { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
                                   
        .fav-empty {
            display: flex; flex-direction: column; align-items: center; gap: 8px;
            padding: 30px 0 24px;
            color: var(--text-muted);
        }
                                                                                   
                                                            
        .fav-empty[hidden] { display: none; }
        .fav-empty-icon { font-size: 1.7rem; line-height: 1; color: var(--border); }
        .fav-empty-text { font-size: 0.85rem; }
        .btn { border: none; border-radius: 6px; padding: 0 16px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
        .btn-danger { background: var(--danger-tint); color: var(--danger); }
        .btn-danger:hover { background: var(--danger-tint); }
        .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
                                                            
                                                   
        .quick-entries { margin-bottom: 10px; }
        .qe-title {
            font-size: 0.85rem;
            color: var(--text-1);
            font-weight: 600;
            margin-bottom: 8px;
        }
        .qe-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
            gap: 12px 10px;
        }
        .qe-item {
                                                         
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 0;
            padding: 0;
            background: transparent;
            border: none;
            font: inherit;
            color: inherit;
            text-decoration: none;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .qe-item[hidden] { display: none; }
        .qe-emoji {
            width: 100%;
            aspect-ratio: 1 / 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.2rem;
            line-height: 1;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--neu-bg), var(--primary-tint));
            box-shadow: 0 1px 3px rgba(30, 60, 110, .12);
        }
        .qe-item:hover .qe-emoji { background: linear-gradient(135deg, var(--neu-bg), var(--tint-soak)); }
        .qe-item:active .qe-emoji { transform: scale(.97); }
        .qe-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }


                                             
                                                                                     
                                                                        
                                                                  
                                                                          
                                                           
                                                    
                                                        
        .fav-icon { position: relative; }
                                                      
                                                                                             


                                                               
                                                          
                                            
                   
                                                  
                                       
                                                         
                                               
                                             
.mcpx-body { padding: 12px; }
.mcpx-desc { font-size: 0.82rem; color: var(--text-3); line-height: 1.6; margin-bottom: 6px; }
.mcpx-status { font-size: 0.82rem; color: var(--text-3); margin: 6px 0; min-height: 1.2em; word-break: break-all; }
.mcpx-status.error { color: var(--danger); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.mcpx-status.ok { color: var(--ok); }
.mcpx-retry { margin: 0 0 8px; }
.mcpx-retry[hidden] { display: none; }                                             
.mcpx-tree { background: var(--neu-bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.mcpx-node { margin-left: 0; }
.mcpx-children { display: none; margin-left: 12px; border-left: 1px solid var(--hairline); padding-left: 6px; }
.mcpx-node.open > .mcpx-children { display: block; }
.mcpx-row { display: flex; align-items: baseline; gap: 6px; padding: 3px 4px; border-radius: 6px; }
.mcpx-branch { cursor: pointer; }
.mcpx-branch:hover { background: var(--primary-tint); }
.mcpx-caret { width: 12px; color: var(--text-muted); flex: none; transition: transform .12s; }
.mcpx-node.open > .mcpx-row .mcpx-caret { transform: rotate(90deg); }
.mcpx-badge { flex: none; font-size: 11px; padding: 0 7px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-3); }
.mcpx-badge.tools { color: var(--primary); border-color: #90cdf4; }
.mcpx-badge.resources { color: #276749; border-color: #9ae6b4; }
.mcpx-badge.prompts { color: #c05621; border-color: #f6ad55; }
.mcpx-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.mcpx-name.mcpx-dim { color: var(--text-3); font-family: inherit; }
.mcpx-leaf-desc { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.mcpx-count { color: var(--text-3); font-size: 12px; margin-left: auto; flex: none; }
.mcpx-detail-host { display: none; margin-left: calc(-2 * (12px + 6px + 1px)); }
                                                     
                                                         
                                    
                                
.mcpx-node.open > .mcpx-detail-host { display: block; }
.mcpx-detail { margin: 2px 0 6px; background: var(--neu-inset); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 12.5px; }
.mcpx-kv { color: var(--text-1); margin: 2px 0; overflow-wrap: anywhere; }
.mcpx-detail code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #276749; font-size: 12px; overflow-wrap: anywhere; }
.mcpx-detail pre, .mcpm-result pre { background: #1a202c; color: #e2e8f0; border-radius: 6px; padding: 6px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; max-height: 320px; margin: 6px 0 0; }
.mcpx-schema-line { white-space: pre-wrap; }
.mcpx-schema-line.req { color: #63b3ed; }
                                                       
                                                            
                                                                       
                                                
                                           
                                             
                                                   
                                                    
                                                                   
                                                    
.mcpx-detail .mcpm-form { margin-top: 6px; border-top: 1px dashed var(--hairline); padding-top: 6px; }
.mcpx-detail .mcpm-form-row { margin: 4px 0; }
.mcpx-detail .mcpm-kv { margin: 2px 0; }
.mcpx-detail .mcpm-run { margin-top: 6px; }
                                                 
.mcpx-token { margin-top: 14px; border-top: 1px solid var(--hairline); padding-top: 4px; }
.mcpx-token-title { font-size: 0.82rem; font-weight: 600; color: var(--text-1); padding: 8px 2px 0; }
.mcpx-token .api-token-window { padding: 10px 2px 0; }

                                                          
                                               
                                                  
                                      
                                                           
.myform-body { padding: 16px 14px 24px; }
.myform-actions { display: flex; gap: 10px; margin-bottom: 12px; }
.myform-actions .link-btn { flex: 1; }
                                                      
                                                        
.myform-reset {
    flex: 1; min-height: 44px; padding: 0 14px;
    font: inherit; font-size: 0.85rem;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.myform-reset:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.myform-md { min-height: 96px; }
.myform-md-empty { color: var(--text-3); font-size: 0.85rem; text-align: center; padding: 22px 0; }

                                                                   
                                                        
                                                                      
                                                       
                                               
                                             
.proxysvc-body { padding: 12px; }
                                               
.proxysvc-scope { background: transparent; padding: 0; }
                               
.proxysvc-scope .item-card[data-deprecated] .item-name { color: var(--text-muted); }
                               
.proxysvc-scope .proxysvc-acc { color: var(--text-1, #2d3748); }
                                                    
.pxv-body { padding: 12px; }
.pxv-search { margin-bottom: 10px; }
                                          
.pxv-search input { width: 100%; box-sizing: border-box; }

                                          
                                                                
                                                              
                                                       
                                                         
                                           
                                                       
                                                
                                                
                                                            
.mcpm-body { padding: 12px; }
                                             
                                              
.mcpm-scope { background: transparent; padding: 0; }
.mcpm-desc { font-size: 0.82rem; color: var(--text-3); line-height: 1.6; margin-bottom: 8px; }
                                         
.mcpm-scope .item-card.mcpm-card { cursor: pointer; }
                                     
.mcpm-detail-desc { font-size: 0.82rem; color: var(--text-3); line-height: 1.6; margin: 0 0 4px; }
.mcpm-detail-sec { font-size: 0.8rem; font-weight: 600; color: var(--text-1); margin: 14px 0 8px; }
.mcpm-kv { color: var(--text-1); font-size: 12.5px; margin: 4px 0; overflow-wrap: anywhere; }
                                               
.mcpm-form-row { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.mcpm-form-row label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-1); word-break: break-all; }
.mcpm-form-row label .mcpm-form-typ { color: #c05621; font-size: 11px; }
.mcpm-form-row input[type=text], .mcpm-form-row input[type=number], .mcpm-form-row select, .mcpm-form-row textarea {
    width: 100%; min-width: 0; box-sizing: border-box; background: var(--neu-inset); color: var(--text-1);
    border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; outline: none;
}
.mcpm-form-row input:focus, .mcpm-form-row textarea:focus, .mcpm-form-row select:focus { border-color: var(--primary); }
.mcpm-form-row textarea { min-height: 56px; resize: vertical; }
.mcpm-form-row input[type=checkbox] { width: auto; }
.mcpm-form-hint { color: var(--text-3); font-size: 11px; }
.mcpm-run {
    min-height: 32px; margin-top: 8px; padding: 7px 18px;
    background: var(--primary); color: #fff; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mcpm-run:hover { background: var(--primary-2); }
.mcpm-run:disabled { opacity: .5; cursor: not-allowed; }
.mcpm-result { margin-top: 8px; }
.mcpm-result .ok { color: var(--ok); font-size: 12px; margin-bottom: 4px; }
.mcpm-result .err { color: var(--danger); font-size: 12px; margin-bottom: 4px; word-break: break-all; }
                                                  
.mcpm-result pre { white-space: pre-wrap; word-break: break-all; }

/* ---- runtime/shell/app-shell.css ---- */
                                                               
                
                                                 
                                       
                                                               
                                              
                                                  
                                                             
                                           
                                               
                                                              
                              
                                                                  

                     
                                             
                                            
                                              
                                                  
                                                   
                                         
                                                       
                                            
body.app-shell-mode {
    overflow: hidden;
                                               
    overscroll-behavior: none;
}

                                        
                                                   
                                  
                                                      
                                       
                            
body.app-shell-mode .app-canvas {
    max-width: none;
}

.app-shell {
    position: relative;
    width: 100%;
                                                
                                              
                                                
                              
    height: calc(100vh - env(safe-area-inset-top, 0px));
    height: calc(100dvh - env(safe-area-inset-top, 0px));
    overflow: hidden;
                                                                 
                                                                
                                                     
                                              
    touch-action: pan-y;
}

.app-shell .embla__container,
.app-shell .app-view-community > .embla__container,
.app-shell .app-view-my > .embla__container {
    display: flex !important;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100%;
    will-change: transform;
}

.app-view {
    flex: 0 0 100%;
    flex-basis: 100%;
    min-width: 0;
    max-width: 100%;
    width: 100%;
                                                                        
    height: 100%;
    display: block;
    box-sizing: border-box;
                                        
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
                                      
    overscroll-behavior: contain;
}

                                            
.app-view[hidden] {
    display: block;
}

                                    
                                 
                                          
.app-view {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.app-view input,
.app-view textarea,
.app-view [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

                                       
                                         
                                                          
.app-view.shell-prewarm .item-card {
    content-visibility: visible;
}

                                                          
                                        
                                          
                                             
.app-shell.shell-dragging .app-view {
    pointer-events: none;
}

                       
                                        
                                                              
                                                 
                                              
                                            
                                     
                                                        
                                                              
                                                 
                                                
                                    
:root.keyboard-open .app-shell {
    touch-action: manipulation;
}

                             
                                     
                                            
.app-shell .app-view > .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

                                                              
.app-shell .app-view-messages {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    background: var(--neu-bg);
    color: var(--text-1);
}
.app-shell .app-view-messages > .container {
    padding: 0;
}

                                           
.app-shell .app-view-community {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    background: var(--neu-bg);
    color: var(--text-1);
    padding: 0;
    -webkit-tap-highlight-color: transparent;
                                                                  
                                                            
                                                  
                                                          
                                          
}
.app-shell .app-view-community > .container {
                                          
                                       
    max-width: none;
    margin: 0;
                                               
                                           
    padding: 0;
                                                 
                                                   
                                              
                                          
    height: 100%;
    display: flex;
    flex-direction: column;
}
.app-shell .app-view-community .msg-header {
    height: 48px;
                                            
    flex: none;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    z-index: 40;
}
.app-shell .app-view-community .community-publish-btn {
    margin-left: 0;
    flex: none;
}
.app-shell .app-view-community .community-search-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}
.app-shell .app-view-community .community-search-btn:hover {
    background: var(--primary-2);
}
.app-shell .app-view-community .community-search-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.community-search-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}
                                                  
                                                           
.app-shell .app-view-community #messageBox {
    flex: none;
}
.app-shell .app-view-community .community-feed-nav {
    flex: none;
    align-items: center;
}
.app-shell .app-view-community h1 {
    text-align: center;
    color: var(--text-1);
    margin: 0;
    font-size: 1.06rem;
    font-weight: 600;
}

                                      
                                                             
                                                     
                                         
                                              
                                              
                                      
.app-shell .app-view-community .community-layout {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
}
.community-feed-nav {
    position: sticky;
    top: 48px;                                                   
    display: flex;
    flex-direction: row;
    gap: 6px;
                                                          
    padding: 4px 10px;
    background: var(--neu-bg);
    z-index: 30;
    overflow-x: auto;
    scrollbar-width: none;
}
.community-feed-nav::-webkit-scrollbar { display: none; }
.app-shell .app-view-community .community-feed-option {
    flex: none;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--text-1);
    font: inherit;
    font-size: 0.85rem;
    line-height: 28px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.app-shell .app-view-community .community-feed-option:hover,
.app-shell .app-view-community .community-feed-option:focus-visible {
    background: var(--border-soft);
    outline: none;
}
.app-shell .app-view-community .community-feed-option.is-active {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
}
.app-shell .app-view-community .community-feed-option.is-active:hover,
.app-shell .app-view-community .community-feed-option.is-active:focus-visible {
    background: var(--primary);
    color: #fff;
}
.app-shell .app-view-community .community-feed-nav .community-publish-btn {
    flex: none;
    margin-left: auto;
    height: 28px;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 16px;
    font-size: 0.82rem;
}
                                 
                                                                 
                                                   
                                                   
.app-shell .app-view-community .community-views {
    position: relative;
    overflow: hidden;
    width: 100%;
                                                                 
                                      
    min-height: 0;
    flex: 1 1 auto;
}
.app-shell .app-view-community .community-views-container {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    will-change: transform;
}
.app-shell .app-view-community .community-feed-slide {
    flex: 0 0 100%;
    flex-basis: 100%;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
                                                           
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
                                                        
    touch-action: pan-y;
                                              
                                          
                                                    
                                                  
    padding: 0 10px;
}
.app-shell .app-view-community .community-feed-slide .items-grid {
                                                  
    margin: 0;
}

                                        

                                             
.app-shell .app-view-my {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    background: var(--neu-bg);
    color: var(--text-1);
    padding: 12px 10px;
    -webkit-tap-highlight-color: transparent;
}
.app-shell .app-view-my > .container {
    margin: 0 auto;
}
.app-shell .app-view-my h1 {
    text-align: center;
    margin: 0 0 10px;
    font-size: 1.2rem;
}
.app-shell .app-view-my h2 {
    font-size: 1.05rem;
    margin: 18px 0 10px;
    color: var(--text-1);
}
.app-shell .app-view-my h2 .count {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 6px;
}
.app-shell .app-view-my .card {
    background: var(--neu-bg);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    padding: 14px;
}
.app-shell .app-view-my .empty {
    text-align: center;
    color: var(--text-muted);
    padding: 26px 0;
    font-size: 0.92rem;
}

                                                                  
.app-shell .app-view-messages .msg-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 24px;
    font-size: 0.88rem;
}

                                                              
                                              

/* ---- runtime/shared/pullsearch.css ---- */
                                                               
                 
                                              
                                                               
                                               
                                                
                                                      
                                             
                                      
                                                      
                                    
                                                                  
.ps-overlay {
    position: fixed;
    inset: 0;
    z-index: 4500;                                                
    pointer-events: none;
}
                                               
                                             
.ps-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(560px, calc(100% - 24px));
    margin: calc(60px + env(safe-area-inset-top, 0px)) auto 0;
    pointer-events: auto;
    animation: ps-panel-in 0.15s ease-out;
}
@keyframes ps-panel-in {
    from { transform: translateY(-8px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
                   
.ps-overlay, .ps-overlay * { -webkit-tap-highlight-color: transparent; }
                                                 
                          
.ps-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}
                                       
.ps-cancel {
    flex: none;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
}
