* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.6;
}

.card {
    border: 1px solid #ddd;
    background: #fff;
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-header p {
    font-size: 13px;
    color: #666;
}

.drop-zone {
    border: 2px dashed #d1d5db;
    padding: 48px 20px;
    text-align: center;
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease;
    background: #fafafa;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.dragging {
    border-color: #000;
    background: #f4f4f4;
}

.drop-zone.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.drop-title {
    font-size: 17px;
    font-weight: 600;
}

.drop-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.upload-tip {
    font-size: 13px;
    color: #666;
    margin-top: 14px;
}

.image-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #ddd;
    padding: 12px 16px;
    background: #fff;
}

.image-thumb {
    width: 64px;
    height: 64px;
    border: 1px solid #ddd;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-meta {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    word-break: break-all;
}

.file-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.btn-small {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.action-btn {
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    color: #000;
    transition: color 0.2s ease, transform 0.2s ease;
}

.action-btn:hover {
    color: #444;
    transform: translateY(-1px);
}

.action-btn:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.action-btn[data-action="remove"] {
    font-size: 20px;
    line-height: 1;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item select {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    padding: 10px 12px;
    font-size: 14px;
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}

.setting-item select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23000' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
}

.setting-desc {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.number-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.number-field span {
    font-size: 13px;
    color: #666;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.status-text {
    font-size: 13px;
    color: #555;
}

.progress-card {
    border-style: dashed;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: #f1f1f1;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: #000;
    transition: width 0.2s ease;
}

@media (max-width: 640px) {
    .image-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-actions {
        margin-left: 0;
    }
}
