:root {
    color-scheme: light;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    color: #212529;
}

.page-main,
.page-shell {
    flex: 1 0 auto;
    padding-top: 5.5rem;
    padding-bottom: 2rem;
}

.upload-area {
    min-height: 8.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ced4da;
    border-radius: 1rem;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

.upload-area:hover,
.upload-area:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .08);
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.qr-preview-stage {
    min-height: 15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 1px dashed #dee2e6;
    border-radius: .875rem;
    background: #f8f9fa;
}

.qr-preview-stage canvas,
.qr-preview-stage svg,
.qr-preview-stage img {
    display: block;
    max-width: 100%;
    height: auto;
}

.batch-mode-toggle {
    white-space: nowrap;
}

.batch-result-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.batch-result-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: .875rem;
    border: 1px solid #dee2e6;
    border-radius: .875rem;
    background: #fff;
}

.batch-result-card.is-error {
    border-style: dashed;
    border-color: #f1aeb5;
    background: #fff5f5;
}

.batch-result-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.batch-result-card-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    color: #212529;
}

.batch-result-card-subtitle {
    margin: .2rem 0 0;
    font-size: .8rem;
    color: #6c757d;
}

.batch-result-card-content {
    margin: 0;
    font-size: .85rem;
    color: #495057;
    word-break: break-all;
}

.batch-result-preview {
    min-height: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .75rem;
    border: 1px dashed #dee2e6;
    border-radius: .75rem;
    background: #f8f9fa;
}

.batch-result-preview img,
.batch-result-preview svg,
.batch-result-preview canvas {
    display: block;
    max-width: 100%;
    max-height: 12rem;
    height: auto;
}

.batch-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.batch-result-empty {
    margin: 0;
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    border: 1px dashed #dee2e6;
    border-radius: .75rem;
    background: #f8f9fa;
}

.card-foot-ad {
    background: #fff;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

.card-foot-ad a {
    color: #0d6efd;
    font-weight: 400;
}

.card-foot-ad a:hover {
    color: #0a58ca;
}

@media (max-width: 575.98px) {
    .page-main,
    .page-shell {
        padding-top: 5rem;
        padding-bottom: 1.5rem;
    }

    .upload-area {
        min-height: 7.5rem;
    }

    .qr-preview-stage {
        min-height: 13rem;
    }

    .batch-result-list {
        grid-template-columns: 1fr;
    }
}
