.pep3d-app {
    --p: #FC9454;
    --ink: #173C42;
    --line: #d7e0e1;
    --soft: #f3f7f7;
    container-type: inline-size;
}

.pep3d-workspace {
    grid-template-columns: 210px minmax(380px, 1fr) 300px;
}

.pep3d-panel-right {
    min-width: 0;
}

.pep3d-toolbar,
.pep3d-panel {
    background: #173C42;
    color: #ffffff;
}

.pep3d-actions {
    flex-wrap: nowrap;
}

.pep3d-toolbar small,
.pep3d-panel p,
.pep3d-panel small {
    color: #c7d6d8;
}

.pep3d-panel h2,
.pep3d-panel h3,
.pep3d-panel output {
    color: #ffffff;
}

.pep3d-panel h3 {
    color: #FC9454;
}

.pep3d-panel section,
.pep3d-panel-left,
.pep3d-panel-right,
.pep3d-toolbar {
    border-color: rgba(255, 255, 255, 0.2);
}

.pep3d-panel input:not([type="range"]):not([type="checkbox"]):not([type="color"]),
.pep3d-panel select {
    background: #ffffff;
    color: #173C42;
}

.pep3d-app button.is-primary,
.pep3d-segmented .is-active {
    color: #173C42 !important;
}

.pep3d-upload {
    background: #fff4ed;
    color: #173C42;
}

.pep3d-upload small {
    color: #65777a;
}

.pep3d-viewer {
    background: #f3f7f7;
}

@container (max-width: 900px) {
    .pep3d-workspace {
        grid-template-columns: 210px minmax(380px, 1fr);
    }

    .pep3d-panel-right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr);
        gap: 16px;
        max-height: none;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .pep3d-panel-right > h3 {
        grid-column: 1 / -1;
    }
}

@container (max-width: 650px) {
    .pep3d-workspace {
        display: flex;
        flex-direction: column;
    }

    .pep3d-viewer {
        order: 1;
        min-height: 460px;
    }

    .pep3d-panel-left {
        order: 2;
    }

    .pep3d-panel-right {
        order: 3;
        display: block;
    }

    .pep3d-panel {
        width: 100%;
        max-height: none;
    }
}
