@media (max-width: 1180px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .brand-card {
        position: static;
    }

    .content-panel {
        width: 100%;
    }

    .files-list {
        max-height: none;
    }

    .result-scroll {
        min-height: 220px;
        max-height: none;
    }
}

@media (max-width: 860px) {
    .page-shell {
        width: min(100%, calc(100% - 16px));
        margin: 8px auto 16px;
    }

    .topbar-actions,
    .composer-head,
    .history-card__header,
    .preview-card__header,
    .form-bottom-row,
    .file-item {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions,
    .form-actions {
        width: 100%;
    }

    .brand-subtitle {
        max-width: none;
    }

    .field-group--grade {
        width: 100%;
        flex: 1 1 auto;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions button,
    .ghost-btn {
        width: 100%;
    }

    .preview-meta {
        text-align: left;
    }

    .balance-card {
        width: 100%;
    }

    .history-card,
    .preview-card,
    .composer-card,
    .sidebar-card {
        padding: 14px;
    }
}