        /* ========== 🎨 样式模块 开始 ========== */
        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, system-ui, sans-serif;
            background: #f5f7fb;
            color: #1a1a2e;
            min-width: 1400px;
            overflow-x: auto;
        }

        .container { max-width: 1500px; margin: 0 auto; padding: 24px 28px 40px; }

        .settings-btn {
            position: fixed;
            top: 24px;
            right: 32px;
            background: white;
            border-radius: 40px;
            padding: 8px 20px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            z-index: 100;
            border: 1px solid #e2e8f0;
        }
        .settings-btn:hover { background: #f8fafc; }

        .header { text-align: center; margin-bottom: 20px; }
        .header h1 {
            font-size: 36px;
            font-weight: 700;
            background: linear-gradient(135deg, #1a1a2e, #3b82f6);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: 2px;
        }
        .header p { font-size: 16px; color: #64748b; letter-spacing: 1px; margin-top: 12px; }

        .two-col {
            display: flex;
            gap: 28px;
            flex-wrap: nowrap;
        }
        .left-col {
            flex: 1.2;
            min-width: 480px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        .right-col {
            flex: 1.5;
            min-width: 520px;
            display: flex;
            flex-direction: column;
        }

        .card {
            background: white;
            border-radius: 24px;
            border: 1px solid #e9ecf0;
            overflow: hidden;
        }
        .card-header {
            padding: 16px 20px;
            border-bottom: 1px solid #f0f2f5;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
            font-size: 16px;
            flex-wrap: wrap;
            gap: 12px;
        }
        .card-badge {
            background: #f1f5f9;
            border-radius: 20px;
            padding: 4px 12px;
            font-size: 12px;
            font-weight: 500;
        }
        .mode-switch {
            background: #f1f5f9;
            border-radius: 30px;
            padding: 6px 14px;
            font-size: 12px;
            cursor: pointer;
        }
        .mode-switch.active { background: #3b82f6; color: white; }

        .toolbar {
            padding: 12px 20px;
            background: #f8fafc;
            border-bottom: 1px solid #f0f2f5;
            display: flex;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }
        .select-all {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            cursor: pointer;
        }
        .select-all input { width: 18px; height: 18px; cursor: pointer; accent-color: #3b82f6; }
        .batch-download-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            background: #10b981;
            color: white;
            border: none;
            border-radius: 30px;
            padding: 6px 18px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            line-height: 1;
        }
        .batch-download-btn:hover { background: #059669; }

        /* 标准换装模式：商品平铺图网格 */
        .flat-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            padding: 20px;
        }
        /* 智能裁切模式：左侧垫图专用布局 */
        .crop-layout {
            display: flex;
            gap: 24px;
            padding: 20px;
            align-items: stretch;
        }
        .preview-large {
            flex: 1.8;
            aspect-ratio: 3 / 4;
            background: #f8fafc;
            border-radius: 20px;
            border: 1px solid #e9ecf0;
            overflow: hidden;
            position: relative;
            cursor: pointer;
        }
        .preview-large img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .preview-large .placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
            color: #94a3b8;
        }
        .preview-large .preset-label {
            position: absolute;
            bottom: 12px;
            left: 0;
            right: 0;
            text-align: center;
            background: rgba(0,0,0,0.6);
            color: white;
            padding: 4px 8px;
            font-size: 12px;
            border-radius: 4px;
            margin: 0 12px;
        }
        .preset-grid {
            flex: 1.2;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }
        .preset-card {
            aspect-ratio: 3 / 4;
            background: #f8fafc;
            border-radius: 16px;
            border: 1px solid #e9ecf0;
            overflow: hidden;
            position: relative;
            cursor: pointer;
            transition: all 0.2s;
        }
        .preset-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
        .preset-card.selected { border: 2px solid #3b82f6; }
        .preset-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .preset-card .empty-preset {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: #f8fafc;
        }
        .preset-card .preset-label {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0,0,0,0.6);
            color: white;
            text-align: center;
            padding: 4px;
            font-size: 10px;
        }
        .preset-card .delete-preset {
            position: absolute;
            top: 6px;
            right: 6px;
            background: rgba(0,0,0,0.6);
            border: none;
            border-radius: 20px;
            width: 24px;
            height: 24px;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            z-index: 5;
        }
        .preset-card .delete-preset:hover { background: #dc2626; }

        /* 右侧姿势图网格 */
        .pose-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            padding: 20px;
            min-height: 300px;
        }
        .grid-item { width: 100%; aspect-ratio: 3 / 4; }
        .add-card, .preview-card, .pose-card {
            width: 100%;
            height: 100%;
            border-radius: 20px;
            overflow: hidden;
            position: relative;
            transition: all 0.2s;
            cursor: pointer;
        }
        .preview-card, .pose-card {
            background: #fff;
            border: 1px solid #e9ecf0;
        }
        .preview-card:hover, .pose-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.1); }
        .preview-card.selected, .pose-card.selected { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); }
        .preview-card.selected::after, .pose-card.selected::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(59, 130, 246, 0.1); pointer-events: none; border-radius: inherit; }
        .preview-card img, .pose-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .add-card {
            background: #f8fafc;
            border: 2px dashed #e2e8f0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        .add-card:hover { border-color: #3b82f6; background: #f0f9ff; }
        .add-card .plus-icon {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            color: #94a3b8;
        }
        .add-card:hover .plus-icon { background: #3b82f6; color: white; }

        .checkbox-area {
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 10;
        }
        .checkbox-area input { width: 18px; height: 18px; cursor: pointer; accent-color: #3b82f6; }
        .delete-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,0.65);
            border: none;
            border-radius: 20px;
            width: 26px;
            height: 26px;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            z-index: 10;
        }
        .delete-btn:hover { background: #dc2626; }
        .status-badge {
            position: absolute;
            top: 10px;
            left: 48px;
            background: rgba(0,0,0,0.7);
            border-radius: 20px;
            padding: 4px 12px;
            font-size: 11px;
            font-weight: 600;
            color: white;
            z-index: 10;
        }
        .duration-badge {
            position: absolute;
            bottom: 12px;
            right: 12px;
            background: rgba(0,0,0,0.65);
            border-radius: 20px;
            padding: 4px 10px;
            font-size: 11px;
            font-family: monospace;
            color: #4ade80;
            z-index: 10;
        }
        .progress-timer {
            position: absolute;
            bottom: 12px;
            left: 10px;
            background: rgba(0,0,0,0.65);
            border-radius: 20px;
            padding: 4px 10px;
            font-size: 11px;
            font-family: monospace;
            color: white;
            z-index: 10;
        }
        .card-actions {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0,0,0,0.8);
            display: flex;
            justify-content: center;
            gap: 16px;
            padding: 10px;
            transform: translateY(100%);
            transition: transform 0.2s;
            z-index: 15;
        }
        .pose-card:hover .card-actions { transform: translateY(0); }
        .detail-material-card:hover .card-actions { transform: translateY(0); }
        .action-btn {
            background: transparent;
            border: none;
            color: white;
            font-size: 12px;
            font-weight: 500;
            padding: 5px 16px;
            border-radius: 25px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            line-height: 1;
        }
        .action-btn:hover { background: rgba(255,255,255,0.2); }

        .control-area {
            background: white;
            border-radius: 24px;
            border: 1px solid #e9ecf0;
            padding: 20px;
        }
        .mode-selector {
            display: flex;
            gap: 16px;
            margin-top: 16px;
            margin-bottom: 0;
            justify-content: center;
        }
        .mode-btn {
            padding: 8px 24px;
            border-radius: 40px;
            border: 1px solid #cbd5e1;
            background: white;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
        }
        .mode-btn.active {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
        }
        .btn-primary {
            background: linear-gradient(135deg, #1a1a2e, #3b82f6);
            color: white;
            border: none;
            padding: 12px;
            font-size: 15px;
            font-weight: 600;
            width: 100%;
            border-radius: 40px;
            cursor: pointer;
            margin-bottom: 16px;
        }
        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        .flex-buttons { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
        .btn-secondary {
            background: #f1f5f9;
            border: none;
            padding: 8px 20px;
            border-radius: 40px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
        }
        .btn-secondary:hover { background: #e2e8f0; }
        .btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
        .stats { text-align: center; font-size: 13px; color: #64748b; margin-bottom: 16px; }
        .log-wrapper { margin-top: 16px; border-top: 1px solid #f0f2f5; padding-top: 12px; }
        .log-header {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-size: 12px;
            color: #94a3b8;
        }
        .log-header:hover { color: #3b82f6; }
        .log-header .arrow { transition: transform 0.2s; font-size: 10px; }
        .log-header.open .arrow { transform: rotate(90deg); }
        .log-area {
            background: #f8fafc;
            border-radius: 16px;
            padding: 12px;
            max-height: 0;
            overflow-y: auto;
            font-size: 11px;
            font-family: monospace;
            transition: max-height 0.3s;
        }
        .log-area.open { max-height: 180px; margin-top: 10px; }
        .log-item { padding: 4px 8px; border-left: 2px solid #cbd5e1; margin-bottom: 4px; }

        .modal-mask {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }
        .modal-mask.show { display: flex; }
        .modal-container {
            background: white;
            border-radius: 28px;
            width: 540px;
            max-width: 90%;
            padding: 28px;
            max-height: 80vh;
            overflow-y: auto;
        }
        .modal-container h3 { margin-bottom: 20px; font-size: 20px; }
        .param-item { margin-bottom: 16px; }
        .param-item label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 6px; color: #475569; }
        .param-item select, .param-item input, .param-item textarea {
            width: 100%;
            padding: 8px 14px;
            border-radius: 40px;
            border: 1px solid #cbd5e1;
            background: white;
            font-size: 13px;
        }
        .param-item textarea { border-radius: 20px; resize: vertical; }
        .image-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.95);
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 3000;
        }
        .image-modal.show { display: flex; }
        .image-modal img { max-width: 90%; max-height: 90%; object-fit: contain; }
        .toast {
            position: fixed;
            bottom: 24px;
            right: 24px;
            background: #1a2c3e;
            color: white;
            padding: 8px 18px;
            border-radius: 40px;
            font-size: 12px;
            opacity: 0;
            transition: opacity 0.2s;
            pointer-events: none;
            z-index: 1100;
        }
        footer { text-align: center; font-size: 11px; color: #94a3b8; margin-top: 20px; }



        /* ========== 详情页素材卡片样式 ========== */

        /* 详情页素材卡片 */
        .detail-material-card {
            width: 100%;
            height: 100%;
            border-radius: 16px;
            overflow: hidden;
            position: relative;
            background: #fff;
            border: 2px solid transparent;
            transition: all 0.2s;
            cursor: pointer;
        }
        .detail-material-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        }
        .detail-material-card.selected {
            border-color: #3b82f6;
        }
        .detail-material-card.multi-selected {
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
        }
        .detail-material-card.multi-selected::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(59, 130, 246, 0.1);
            pointer-events: none;
            border-radius: inherit;
        }
        .detail-material-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .detail-material-card .card-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0,0,0,0.75);
            padding: 8px 10px;
            font-size: 11px;
            color: white;
        }
        .detail-material-card .card-info .copy-text {
            font-weight: 500;
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .detail-material-card .card-info .layout-text {
            opacity: 0.8;
            font-size: 10px;
        }
        .detail-material-card .delete-btn {
            top: 6px;
            right: 6px;
            width: 22px;
            height: 22px;
            font-size: 12px;
        }
        .detail-material-card .status-indicator {
            position: absolute;
            top: 6px;
            left: 6px;
            background: rgba(0,0,0,0.7);
            border-radius: 20px;
            padding: 2px 8px;
            font-size: 10px;
            color: white;
        }
        .detail-material-card .status-indicator.success { background: #10b981; }
        .detail-material-card .status-indicator.progress { background: #f59e0b; }
        .detail-material-card .status-indicator.failed { background: #ef4444; }
        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

        /* 详情页编辑器弹窗 */
        .detail-editor-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            align-items: center;
            justify-content: center;
            z-index: 2500;
        }
        .detail-editor-modal.show { display: flex; }
        .detail-editor-container {
            background: white;
            border-radius: 24px;
            width: 90%;
            max-width: 1200px;
            max-height: 90vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .detail-editor-header {
            padding: 16px 24px;
            border-bottom: 1px solid #e9ecf0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .detail-editor-header h3 { font-size: 18px; }
        .detail-editor-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #64748b;
        }
        .detail-editor-body {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        .detail-editor-canvas {
            flex: 1;
            padding: 24px;
            background: #f1f5f9;
            overflow: auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .detail-render-container {
            position: relative;
            background: white;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }
        .detail-render-container img.product-bg {
            display: block;
            width: 100%;
            height: auto;
        }
        .detail-text-layer {
            position: absolute;
            cursor: move;
            user-select: none;
            padding: 4px 8px;
            border: 2px dashed transparent;
            transition: border-color 0.2s;
        }
        .detail-text-layer:hover,
        .detail-text-layer.selected {
            border-color: #3b82f6;
        }
        .detail-text-layer .text-content {
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
            white-space: pre-wrap;
        }
        .detail-text-layer .highlight {
            color: inherit;
        }
        .detail-editor-sidebar {
            width: 320px;
            border-left: 1px solid #e9ecf0;
            padding: 20px;
            overflow-y: auto;
            background: #fafbfc;
        }
        .editor-section {
            margin-bottom: 20px;
        }
        .editor-section h4 {
            font-size: 13px;
            color: #475569;
            margin-bottom: 10px;
            padding-bottom: 6px;
            border-bottom: 1px solid #e2e8f0;
        }
        .editor-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }
        .editor-row label {
            font-size: 12px;
            color: #64748b;
            min-width: 60px;
        }
        .editor-row input[type="range"] {
            flex: 1;
        }
        .editor-row input[type="color"] {
            width: 36px;
            height: 36px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
        }
        .editor-row input[type="text"],
        .editor-row textarea {
            flex: 1;
            padding: 6px 10px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 12px;
        }
        .editor-row textarea {
            resize: vertical;
            min-height: 60px;
        }
        .editor-btn {
            padding: 8px 16px;
            border-radius: 20px;
            border: none;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            margin-right: 8px;
            margin-bottom: 8px;
        }
        .editor-btn-primary {
            background: #3b82f6;
            color: white;
        }
        .editor-btn-secondary {
            background: #f1f5f9;
            color: #475569;
        }
        .editor-btn-success {
            background: #10b981;
            color: white;
        }
        .editor-btn:hover { opacity: 0.9; }
        .detail-editor-footer {
            padding: 16px 24px;
            border-top: 1px solid #e9ecf0;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }
