.img-dropzone {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
    user-select: none;
}
.img-dropzone:hover,
.img-dropzone.dragover { border-color: #0d6efd; background: #eef6ff; }
.img-dropzone.dragover { transform: scale(1.005); }
.img-dropzone .dz-icon { font-size: 44px; line-height: 1; }

.workspace { display: none; }
.workspace.active { display: block; }

/* 预览区 */
.preview-wrap {
    background:
        linear-gradient(45deg, #e9ecef 25%, transparent 25%),
        linear-gradient(-45deg, #e9ecef 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e9ecef 75%),
        linear-gradient(-45deg, transparent 75%, #e9ecef 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-color: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    min-height: 320px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#previewCanvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

/* 面板 */
.panel-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.panel-head {
    padding: .5rem .85rem;
    border-bottom: 1px solid #eef0f3;
    font-size: .8rem;
    font-weight: 700;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-body {
    padding: .75rem .9rem;
    overflow-y: auto;
    max-height: 78vh;
    flex: 1;
}
.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* 图片列表 */
.list-body {
    overflow-y: auto;
    max-height: 78vh;
    padding: .5rem;
    flex: 1;
}
.list-body::-webkit-scrollbar { width: 6px; }
.list-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.list-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .5rem;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: background .15s, box-shadow .15s;
    margin-bottom: .25rem;
}
.list-item:hover { background: #f0f7ff; }
.list-item.active {
    background: #eef6ff;
    box-shadow: inset 0 0 0 2px #0d6efd;
}
.list-item .thumb-wrap {
    flex: 0 0 54px;
    width: 54px; height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f3f4f6;
    overflow: hidden;
}
.list-item .thumb-wrap canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}
.list-item .info {
    flex: 1;
    min-width: 0;
}
.list-item .name {
    font-size: .82rem;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-item .meta {
    font-size: .72rem;
    color: #6b7280;
    margin-top: 1px;
}
.list-item .btn-remove {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
}
.list-item:hover .btn-remove { opacity: 1; }
.list-item .btn-remove:hover { background: #fee2e2; color: #b91c1c; }

/* 滑块组 */
.group { border-top: 1px solid #eef0f3; }
.group:first-child { border-top: none; }
.group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem .2rem;
    cursor: pointer;
    user-select: none;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}
.group-head:hover { color: #0d6efd; }
.group-head .chev { transition: transform .2s; font-size: .7rem; color: #9ca3af; }
.group.collapsed .chev { transform: rotate(-90deg); }
.group.collapsed .group-body { display: none; }
.group-body { padding-bottom: .4rem; }

.slider-row { margin-bottom: .6rem; }
.slider-row .lbl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    color: #374151;
    margin-bottom: .1rem;
    user-select: none;
}
.slider-row .lbl .name { font-weight: 500; cursor: pointer; }
.slider-row .lbl .val {
    font-variant-numeric: tabular-nums;
    font-size: .72rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: .05rem .4rem;
    border-radius: 4px;
    min-width: 42px;
    text-align: right;
}
.slider-row .lbl .val.changed {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}
.slider-row input[type=range] {
    width: 100%; height: 4px; margin: .15rem 0;
    accent-color: #0d6efd;
}
.end-label { font-size: .66rem; color: #9ca3af; }

/* 预设 */
.preset-strip {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding-bottom: .3rem;
    scrollbar-width: thin;
}
.preset-strip::-webkit-scrollbar { height: 6px; }
.preset-strip::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.preset-item {
    flex: 0 0 auto;
    width: 60px;
    cursor: pointer;
    text-align: center;
    user-select: none;
    border-radius: 8px;
    padding: 3px 2px 3px;
    border: 2px solid transparent;
    transition: border-color .15s, background .15s;
}
.preset-item:hover { background: #f0f7ff; }
.preset-item.active { border-color: #0d6efd; background: #eef6ff; }
.preset-thumb {
    width: 50px; height: 50px;
    border-radius: 6px;
    object-fit: cover;
    background: #e5e7eb;
    display: block;
    margin: 0 auto;
}
.preset-name {
    font-size: .66rem;
    color: #4b5563;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.preset-item.active .preset-name { color: #0d6efd; font-weight: 600; }

.stat-num { font-variant-numeric: tabular-nums; }
.toolbar-btn-group .btn { white-space: nowrap; }

.export-progress {
    font-size: .75rem;
    color: #0d6efd;
}
