.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;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#previewCanvas {
    max-width: 100%;
    max-height: 72vh;
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    transition: opacity .15s;
}
#previewCanvas.loading { opacity: .7; }

.panel-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.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; }

/* 分组折叠 */
.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: 62px;
    cursor: pointer;
    text-align: center;
    user-select: none;
    border-radius: 8px;
    padding: 4px 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: 52px; height: 52px;
    border-radius: 6px;
    object-fit: cover;
    background: #e5e7eb;
    display: block;
    margin: 0 auto;
}
.preset-name {
    font-size: .68rem;
    color: #4b5563;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.preset-item.active .preset-name { color: #0d6efd; font-weight: 600; }

.toolbar-btn-group .btn { white-space: nowrap; }
.status-info { font-size: .78rem; color: #6b7280; }
.file-name-wrap { min-width: 0; overflow: hidden; }
.file-name-wrap b { max-width: 220px; display: inline-block; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.reset-badge {
    font-size: .68rem;
    padding: .05rem .35rem;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 4px;
    cursor: pointer;
    margin-left: .35rem;
    user-select: none;
}
.reset-badge:hover { background: #fecaca; }
