.onepic-app {
    color: #16181d;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0 auto;
    max-width: 1080px;
    padding: 28px 18px;
}

.onepic-toolbar {
    align-items: flex-end;
    border-bottom: 1px solid #d9dde5;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
}

.onepic-toolbar h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 6px;
}

.onepic-toolbar p {
    color: #5d6575;
    margin: 0;
}

.onepic-status {
    background: #edf1f7;
    border: 1px solid #d5dbe7;
    border-radius: 999px;
    color: #394150;
    display: inline-flex;
    font-size: 13px;
    padding: 7px 11px;
    white-space: nowrap;
}

.onepic-status.is-ok {
    background: #e8f8ef;
    border-color: #afe4c1;
    color: #166437;
}

.onepic-status.is-bad {
    background: #fff0f0;
    border-color: #ffc2c2;
    color: #9b1c1c;
}

.onepic-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, 360px) 1fr;
}

.onepic-panel {
    border: 1px solid #d9dde5;
    border-radius: 8px;
    background: #fff;
}

.onepic-upload {
    align-self: start;
    display: grid;
    gap: 16px;
    padding: 18px;
}

.onepic-field {
    display: grid;
    gap: 8px;
}

.onepic-field span {
    color: #3c4350;
    font-size: 14px;
    font-weight: 700;
}

.onepic-field select,
.onepic-upload button {
    border-radius: 6px;
    font: inherit;
    min-height: 42px;
}

.onepic-field select {
    border: 1px solid #bfc7d6;
    padding: 0 10px;
}

.onepic-drop {
    align-items: center;
    border: 1px dashed #9ca8ba;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 6px;
    justify-items: center;
    min-height: 160px;
    padding: 22px;
    text-align: center;
}

.onepic-drop input {
    max-width: 100%;
}

.onepic-drop span {
    font-weight: 800;
}

.onepic-drop small {
    color: #6b7280;
}

.onepic-upload button,
.onepic-actions button,
.onepic-download {
    align-items: center;
    background: #1f4ed8;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    text-decoration: none;
}

.onepic-upload button:disabled,
.onepic-actions button:disabled {
    background: #aab2c0;
    cursor: not-allowed;
}

.onepic-message {
    color: #5d6575;
    min-height: 20px;
    margin: 0;
}

.onepic-preview {
    align-self: start;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.onepic-preview-frame {
    align-items: center;
    aspect-ratio: 413 / 531;
    background: #f4f6fa;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    width: min(100%, 260px);
    justify-self: center;
}

.onepic-preview-frame img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.onepic-preview-frame span {
    color: #747d8d;
}

.onepic-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.onepic-download[hidden] {
    display: none;
}

@media (max-width: 780px) {
    .onepic-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .onepic-layout {
        grid-template-columns: 1fr;
    }

    .onepic-preview-frame {
        min-height: 0;
        width: min(100%, 260px);
    }
}
