        /* 全局样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        
        /* 主容器 */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* 按钮样式 */
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        
        .btn-secondary {
            background: #f0f2f5;
            color: #333;
        }
        
        .btn-secondary:hover {
            background: #e4e6eb;
        }
        
        /* 筛选区域 */
        .filter-section {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 20px;
            margin-bottom: 20px;
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            align-items: center;
        }
        
        .filter-group {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .filter-label {
            font-weight: 500;
            color: #666;
        }
        
        .filter-input, .filter-select {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 0.9rem;
        }
        
        /* 图片库 */
        .gallery-section {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 20px;
            overflow: hidden;
        }
        
        .gallery-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .gallery-title {
            font-size: 1.2rem;
        }
        
        .gallery-info {
            font-size: 0.9rem;
            color: #666;
        }
        
        /* 图片网格 */
        .gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
        
        /* 图片项 */
        .gallery-item {
            background: #fafafa;
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            position: relative;
        }
        
        .gallery-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        }
        
        .item-checkbox {
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 10;
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        .item-image-container {
            position: relative;
            width: 100%;
            aspect-ratio: 9 / 16;
            overflow: hidden;
            background: #f0f0f0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .item-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        
        .gallery-item:hover .item-image {
            transform: scale(1.05);
        }
        
        .item-info {
            padding: 15px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        .item-name {
            font-weight: 500;
            margin-bottom: 5px;
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .item-meta {
            font-size: 0.8rem;
            color: #666;
            margin-top: auto;
        }
        
        .item-actions {
            margin-top: 10px;
            display: flex;
            gap: 5px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        
        .gallery-item:hover .item-actions {
            opacity: 1;
        }
        
        .btn-small {
            padding: 4px 8px;
            font-size: 0.8rem;
        }
        
        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: 50px 20px;
            color: #999;
        }
        
        .empty-icon {
            font-size: 4rem;
            margin-bottom: 20px;
        }
        
        /* 底部操作栏 */
        .bottom-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 0;
            border-top: 1px solid #eee;
        }
        
        .selected-info {
            font-size: 0.9rem;
            color: #666;
        }
        
        /* 模态框 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 10px;
            width: 90%;
            max-width: 800px;
            max-height: 80vh;
            overflow-y: auto;
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .modal-title {
            font-size: 1.3rem;
        }
        
        .close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: #666;
        }
        
        .close-btn:hover {
            color: #333;
        }
        
        /* 预览模态框 */
        .preview-content {
            text-align: center;
        }
        
        .preview-image {
            max-width: 100%;
            max-height: 60vh;
            object-fit: contain;
            border-radius: 5px;
        }
        
        /* 加载状态 */
        .loading {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 40px;
            color: #667eea;
            font-size: 1.1rem;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .gallery {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
            }
            
            .filter-section {
                flex-direction: column;
                align-items: stretch;
            }
            
            .gallery-header {
                flex-direction: column;
                align-items: stretch;
                gap: 15px;
            }
            
            .gallery-header > div {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }
            
            .gallery-header > div > * {
                width: 100%;
            }
        }

/* Desktop result browser shared appearance. */
.results-workbench { min-width: 1000px; }
.results-workbench .container { padding: 0 0 28px; }
.results-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 26px 0 22px; }
.results-page-heading h1 { font-size: 26px; margin-bottom: 5px; }
.results-page-heading p { font-size: 13px; color: var(--muted); }
.results-page-links { display: flex; align-items: center; gap: 8px; }
.results-workbench .filter-section { padding: 14px 18px; box-shadow: none; border: 1px solid var(--line); border-radius: var(--radius); gap: 18px; }
.results-workbench .filter-label { font-size: 12px; color: var(--muted); }
.results-workbench .filter-input, .results-workbench .filter-select { height: 34px; font-size: 13px; }
.results-workbench .gallery-section { padding: 20px; border: 1px solid var(--line); box-shadow: none; border-radius: var(--radius); }
.results-workbench .gallery-header { padding-bottom: 16px; border-bottom: 1px solid var(--line); gap: 15px; }
.results-workbench .gallery-title { font-size: 16px; }
.results-workbench .gallery-info, .results-workbench .selected-info { font-size: 12px; color: var(--muted); }
.results-workbench .gallery { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; min-height: 220px; }
.results-workbench .gallery-item { background: #fff; border-color: var(--line); align-self: start; }
.results-workbench .gallery-item:hover { transform: none; box-shadow: none; border-color: #c4bde1; }
.results-workbench .gallery-item:has(.item-checkbox:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.results-workbench .gallery-item:hover .item-image { transform: none; }
.results-workbench .item-image-container { aspect-ratio: 3 / 4; background: #f7f8fa; }
.results-workbench .item-info { padding: 12px; }
.results-workbench .item-actions { opacity: 1; }
.results-workbench .item-actions button { color: #ab474d; }
.results-workbench .item-checkbox { accent-color: var(--accent); }
.results-workbench .empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 240px; padding: 28px; gap: 9px; color: var(--muted); background: #fafbfc; border: 1px dashed var(--line); border-radius: 8px; }
.results-workbench .empty-state strong { color: #535969; font-size: 14px; font-weight: 500; }
.results-workbench .empty-state p { font-size: 12px; }
.results-workbench .empty-state .btn { margin-top: 3px; }
.results-workbench .empty-icon { display: none; }
.results-workbench #bottom-delete-selected-btn { color: #ab474d; }
.results-workbench .bottom-actions { padding: 14px 0 0; border-color: var(--line); }

/* Result filters use the same left rail as the source-library categories. */
.results-workbench .wb-management-sidebar.filter-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    margin: 0;
    padding: 18px 16px;
    overflow-y: auto;
}
.results-workbench .wb-sidebar-heading {
    font-size: 14px;
    font-weight: 650;
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.results-workbench .filter-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    gap: 7px;
}
.results-workbench .filter-label {
    white-space: nowrap;
    font-size: 12px;
}
.results-workbench .filter-input,
.results-workbench .filter-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.results-workbench .wb-management-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}
.results-workbench .results-page-heading {
    margin: 0;
    padding-bottom: 18px;
    min-height: 76px;
}
.results-workbench .results-page-heading h1 {
    font-size: 24px;
    line-height: 1.3;
}
.results-workbench .results-page-heading p {
    font-size: 12px;
    line-height: 1.6;
    margin-top: 7px;
}
.results-workbench .gallery-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
}
.results-workbench .gallery-header {
    padding: 16px 18px;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.results-workbench .gallery-header > div {
    justify-content: flex-end;
    margin-left: auto;
}
.results-workbench .gallery-title {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 650;
}
.results-workbench .gallery {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 16px;
    overflow-y: auto;
    align-content: start;
}
.results-workbench .gallery-info,
.results-workbench .selected-info {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.results-workbench .results-page-links {
    flex-shrink: 0;
}
.results-workbench .bottom-actions {
    margin: 0;
    padding: 12px 18px;
    flex-shrink: 0;
}
.results-workbench .item-actions .btn {
    min-height: 28px;
    line-height: 1.35;
}
.results-workbench .modal-title {
    overflow-wrap: anywhere;
    min-width: 0;
}
.results-workbench .modal-header .close-btn {
    flex-shrink: 0;
}
