@media (max-width: 1040px) {
    .sg-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-rail {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
        margin-right: 0;
    }

    .sg-filters-toggle {
        display: flex;
    }

    .sg-rail-drawer {
        display: none;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        padding: 6px 16px;
    }

    .sg-fi {
        min-height: 44px;
    }

    .sg-filters-cb:checked ~ .sg-rail-drawer {
        display: flex;
        flex-direction: column;
    }

    .sg-rail .sg-fg {
        padding: 0;
    }

    .sg-rail .sg-fg-head {
        display: flex;
        align-items: center;
        min-height: 44px;
        margin-bottom: 0;
    }

    .sg-rail .sg-fg-head::after {
        content: "";
        flex: none;
        width: 7px;
        height: 7px;
        margin: -3px 4px 0 auto;
        border: solid currentColor;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        transition: transform var(--transition);
    }

    .sg-rail .sg-fg[open] > .sg-fg-head::after {
        margin-top: 3px;
        transform: rotate(-135deg);
    }

    .sg-rail .sg-fg[open] .sg-fg-body {
        padding-bottom: 12px;
    }

    .sg-rail .sg-fg.is-active .sg-fg-head {
        color: var(--color-accent);
    }

    .sg-rail .fo-more-sum {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    .sg-rail .fo-search-in {
        min-height: 44px;
    }

    .sg-rail .sg-apply {
        height: 44px;
    }

    .sg-tablehead {
        display: none;
    }

    .sg-filters-cb {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 767px) {
    .sg-hero-h1 {
        font-size: 28px;
    }

    .sg-row {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .sg-rtp,
    .sg-maxwin {
        text-align: left;
    }

    .sg-row-actions {
        flex-direction: row;
        justify-content: flex-start;
    }

    .sg-ab {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }

    .sg-cell-lbl {
        display: block;
    }

    .sg-row-rtp,
    .sg-vol,
    .sg-row-maxwin {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .sg-row-detail-link {
        text-align: left;
        flex: 1;
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 14px;
    }

    .sg-steps {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .sg-toolbar {
        top: var(--topbar-h);
    }

    .sg-tb-row {
        gap: var(--space-2);
    }

    .sg-search {
        min-width: 0;
        flex: 1 1 100%;
        max-width: none;
        order: 10;
    }

    .sg-tb-right {
        margin-left: 0;
        flex-wrap: wrap;
    }
}

@media (max-width: 479px) {
    .sg-steps {
        grid-template-columns: 1fr;
    }

    .sg-preset-chips {
        gap: 6px;
    }

    .sg-api-hint {
        flex-direction: column;
        align-items: flex-start;
    }

    .sg-api-hint-code {
        width: 100%;
        overflow-x: auto;
        display: block;
    }
}


@media (max-width: 1040px) {
    .sg-row-id {
        grid-column: 1 / -1;
    }

    .sg-row-rtp,
    .sg-row-maxwin,
    .sg-row-grid-cell {
        text-align: left;
    }

    .sg-row-chips-preview {
        grid-column: 1 / -1;
    }

    .sg-row-actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .sg-expand-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .sg-row-main {
        padding: 12px;
    }

    .sg-row-id {
        grid-column: 1 / -1;
    }

    .sg-row-rtp,
    .sg-vol,
    .sg-row-maxwin {
        grid-column: span 1;
        text-align: left;
    }

    .sg-row-rtp {
        text-align: left;
    }

    .sg-row-maxwin {
        text-align: left;
    }

    .sg-row-grid-cell {
        grid-column: 1 / -1;
    }

    .sg-row-chips-preview {
        grid-column: 1 / -1;
    }

    .sg-row-actions {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sg-ab-demo {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }

    .sg-expand-summary {
        min-height: 44px;
    }

    .sg-expand-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sg-expand-actions .sg-ab {
        justify-content: center;
        min-height: 44px;
    }

    .sg-expand-grid {
        grid-template-columns: 1fr;
    }

    .sg-spec-row dt {
        width: 70px;
    }

    .sg-capt-group {
        padding: 8px 0;
    }

    .sg-sym-strip {
        flex-wrap: wrap;
    }

    .sg-palette-strip {
        flex-wrap: wrap;
    }

    .sg-mode-list {
        flex-wrap: wrap;
    }
}

@media (max-width: 1040px) {
    .sg-row .sg-expand-summary {
        padding-left: 14px;
    }
}

@media (max-width: 767px) {
    .sg-row .sg-expand-summary {
        padding-left: 12px;
    }
}
