@media (max-width: 1023px) {
    body.spektr-task-open .spektr-task-detail {
        display: flex !important;
        position: fixed;
        top: var(--spektr-header-h, 3.5rem);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        width: 100%;
        max-width: none;
        background: hsl(var(--background));
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.spektr-task-open .spektr-task-back {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        height: 32px;
        margin: 0 0 10px;
        padding: 0 10px 0 6px;
        border: 0;
        border-radius: 8px;
        background: hsl(var(--muted));
        color: hsl(var(--foreground));
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }

    .spektr-task-back {
        display: none;
    }

    .spektr-task-head-meta {
        width: 100%;
    }

    body.spektr-on-chat main.flex-1 {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    body.spektr-on-chat main.flex-1 > .flex.h-full {
        flex: 1;
        min-height: 0;
        height: auto !important;
        overflow: hidden;
    }

    body.spektr-on-chat .spektr-chat-col {
        min-height: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    body.spektr-on-chat .spektr-chat-messages {
        flex: 1;
        min-height: 0;
        padding-bottom: 88px;
    }

    body.spektr-on-chat .spektr-chat-composer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: var(--spektr-vv-bottom, 0px);
        z-index: 45;
        margin: 0;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid hsl(var(--border));
        background: hsl(var(--background));
    }

    body.spektr-on-tasks:not(.spektr-task-open) .spektr-task-detail,
    body.spektr-on-tasks:not(.spektr-task-open) .hidden.min-w-0.flex-1.flex-col {
        display: none !important;
    }

    body.spektr-on-tasks main.flex-1 {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    body.spektr-on-tasks .spektr-task-col {
        width: 100%;
        max-width: none !important;
        min-height: 0;
        flex: 1 1 auto;
        height: auto !important;
        overflow: hidden !important;
    }

    body.spektr-on-tasks .spektr-task-col > ul {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    body.spektr-task-open {
        overflow: hidden;
    }

    body.spektr-task-open .spektr-task-detail {
        display: block !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    body.spektr-task-open .spektr-task-detail > .flex-1 {
        flex: none !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
}
