.j3d-pbr__widget {
    max-width: 100%;
}

.j3d-pbr__section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #eceef5;
}

.j3d-pbr__section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.j3d-pbr__section h2 {
    margin: 0 0 16px;
    color: #3d4a5c;
    font-size: 19px;
}

.j3d-pbr__preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.j3d-pbr__preset-buttons .btn-u {
    box-sizing: border-box;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 140px;
}

.j3d-converter .j3d-pbr__preset-buttons .is-active,
.j3d-converter .j3d-pbr__preview-mode-buttons .is-active {
    background: #424cb9;
    border-color: #424cb9;
    color: #fff;
}

.j3d-pbr__preset-summary,
.j3d-pbr__result-line {
    margin: 12px 0 0;
    color: #5a6278;
    font-size: 14px;
}

.j3d-pbr__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 26px;
}

.j3d-pbr__card {
    box-sizing: border-box;
    padding: 16px;
    background: #fafbfe;
    border: 1px solid #eceef5;
    border-radius: 8px;
    min-width: 0;
}

.j3d-pbr__card-title {
    margin: 0 0 6px;
    color: #2d3748;
    font-size: 16px;
}

.j3d-pbr__card-hint {
    margin: 0 0 14px;
    color: #7a8499;
    font-size: 13px;
}

.j3d-pbr__card-note {
    margin: 6px 0 0;
    color: #7a8499;
    font-size: 12px;
}

.j3d-pbr__dropzone {
    padding: 18px 12px;
}

.j3d-pbr__card-preview {
    margin-top: 14px;
}

.j3d-pbr__thumb {
    display: block;
    max-width: 100%;
    max-height: 140px;
    margin: 0 0 10px;
    border: 1px solid #dfe3ed;
    border-radius: 6px;
    background: #f1f3f8;
}

.j3d-pbr__card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 12px;
}

.j3d-pbr__card-info dt {
    color: #7a8499;
    font-size: 11px;
}

.j3d-pbr__card-info dd {
    margin: 2px 0 0;
    color: #2d3748;
    font-weight: 600;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.j3d-pbr__card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.j3d-pbr__card-actions .btn-u {
    box-sizing: border-box;
    min-height: 44px;
    flex: 1 1 100px;
}

.j3d-pbr__field {
    margin-top: 16px;
}

.j3d-pbr__field > label {
    display: block;
    margin-bottom: 7px;
    color: #4a5568;
    font-size: 13px;
    font-weight: 600;
}

.j3d-pbr__constant-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.j3d-pbr__constant-row input[type="range"] {
    flex: 1 1 100px;
    min-height: 30px;
    accent-color: #424cb9;
}

.j3d-pbr__constant-row input[type="range"]:disabled,
.j3d-pbr__constant-row input[type="number"]:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.j3d-pbr__constant-row input[type="number"] {
    width: 68px;
    min-height: 30px;
}

.j3d-pbr__constant-value {
    color: #424cb9;
    font-size: 13px;
    white-space: nowrap;
}

.j3d-pbr__checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 14px 0 0;
    color: #4a5568;
    font-weight: 600;
    font-size: 13px;
}

.j3d-pbr__checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: #424cb9;
}

.j3d-pbr__card-error {
    min-height: 19px;
    margin: 10px 0 0;
    color: #c53030;
    font-size: 13px;
}

.j3d-pbr__card-warning {
    min-height: 19px;
    margin: 8px 0 0;
    color: #9c6b0a;
    font-size: 13px;
}

#j3d-pbr-pack-button {
    margin-top: 8px;
    min-height: 44px;
}

.j3d-pbr__progress-wrap {
    margin-bottom: 12px;
}

.j3d-pbr__progress {
    height: 10px;
    background: #eceef5;
    border-radius: 6px;
    overflow: hidden;
}

.j3d-pbr__progress-bar {
    height: 100%;
    width: 0;
    background: #424cb9;
    transition: width .15s ease-out;
}

.j3d-pbr__status {
    min-height: 22px;
    margin: 0;
    color: #5a6278;
}

.j3d-pbr__status.is-success {
    color: #176b3a;
}

.j3d-pbr__error {
    min-height: 19px;
    margin: 8px 0 0;
    color: #c53030;
    font-size: 14px;
}

.j3d-pbr__preview-mode-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.j3d-pbr__preview-mode-buttons .btn-u {
    box-sizing: border-box;
    min-height: 44px;
    flex: 1 1 80px;
}

.j3d-pbr__preview-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    color: #4a5568;
    font-size: 13px;
    font-weight: 600;
}

.j3d-pbr__preview-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 640px;
    max-height: 640px;
    margin: 0 auto 18px;
    background: #f1f3f8;
    border: 1px solid #dfe3ed;
    border-radius: 6px;
}

#j3d-pbr-download {
    min-height: 44px;
    max-width: 100%;
}

.j3d-pbr__instructions {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #eceef5;
}

.j3d-pbr__instructions h2 {
    margin: 0 0 16px;
    color: #3d4a5c;
    font-size: 19px;
}

@media (max-width: 900px) {
    .j3d-pbr__cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .j3d-pbr__widget {
        padding: 0;
    }

    #j3d-pbr-pack-button,
    #j3d-pbr-download {
        width: 100%;
    }

    .j3d-pbr__preset-buttons .btn-u,
    .j3d-pbr__preview-mode-buttons .btn-u {
        flex: 1 1 45%;
    }
}
