body {
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

.app-card {
    border-radius: 18px;
}

.section-block {
    background: #f8f9fb;
    border: 1px solid #eceff3;
    border-radius: 14px;
    padding: 1rem;
}

.section-block.step-active {
    border-color: #dc3545;
    box-shadow: 0 0 0 1px #dc3545 inset;
}

.section-block.section-locked {
    opacity: 0.62;
    filter: grayscale(0.12);
    position: relative;
}

.section-block.section-locked::after {
    content: "Locked after preview start";
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 0.7rem;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    padding: 0.1rem 0.45rem;
}

.photo-chip {
    background: #ffffff;
    border: 1px solid #e3e7ee;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.83rem;
}

.environment-option,
.face-option,
.project-item,
.preview-tile,
.timeline-item {
    border: 1px solid #e3e7ee;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.environment-option.active,
.face-option.active,
.project-item.active {
    border-color: #212529;
    box-shadow: 0 0 0 1px #212529 inset;
}

.environment-option:hover,
.face-option:hover,
.project-item:hover {
    transform: translateY(-1px);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.timeline-item.done {
    border-left: 4px solid #198754;
}

.timeline-item.running {
    border-left: 4px solid #0d6efd;
}

.timeline-item.pending {
    border-left: 4px solid #adb5bd;
}

.timeline-item.error {
    border-left: 4px solid #dc3545;
}

.timeline-title {
    font-weight: 600;
    font-size: 0.92rem;
}

.preview-tile {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.tiny {
    font-size: 0.73rem;
}

.settings-card {
    border: 1px solid #e3e7ee;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.9rem;
}

.json-preview {
    background: #111827;
    color: #d1d5db;
    border-radius: 12px;
    padding: 0.85rem;
    font-size: 0.76rem;
    max-height: 190px;
    overflow: auto;
}

.input-preview-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid #e3e7ee;
}

.preview-result-img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e3e7ee;
    padding: 0.25rem;
}

.preview-result-wrap {
    position: relative;
}

.preview-check-wrap {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dfe3ea;
    border-radius: 6px;
    padding: 0.18rem 0.35rem;
    line-height: 1;
}

.preview-working {
    animation: previewPulse 1.2s ease-in-out infinite;
}

.preview-done {
    border-color: #198754;
    box-shadow: 0 0 0 1px #198754 inset, 0 0 20px rgba(25, 135, 84, 0.2);
}

@keyframes previewPulse {
    0% {
        border-color: #eceff3;
        box-shadow: 0 0 0 1px #eceff3 inset;
    }
    50% {
        border-color: #6ea8fe;
        box-shadow: 0 0 0 2px #6ea8fe inset, 0 0 20px rgba(13, 110, 253, 0.2);
    }
    100% {
        border-color: #eceff3;
        box-shadow: 0 0 0 1px #eceff3 inset;
    }
}

.upload-preview-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #e3e7ee;
}
