body {
    width: calc(100% - 8px);
}

@media (min-width: 1390px) {
    .aap-shell {
        left: auto;
    }
}

@media (max-width: 820px) {
    :root {
        --aap-header: 60px;
    }

    body {
        background: #222;
    }

    .aap-site-header {
        height: 60px;
        width: 100%;
    }

    .aap-site-header__inner {
        display: none;
    }

    .aap-mobile-search {
        display: grid;
        gap: 5px;
        grid-template-columns: minmax(0, 1fr) 50px;
        height: 60px;
        padding: 5px;
    }

    .aap-mobile-search button,
    .aap-mobile-filter {
        align-items: center;
        background: #272727;
        border: 0;
        border-radius: 6px;
        color: #aaa;
        display: flex;
        gap: 10px;
        height: 50px;
        justify-content: flex-start;
        padding: 0 10px;
    }

    .aap-mobile-search span {
        font-size: 22px;
    }

    .aap-mobile-filter {
        justify-content: center;
        padding: 0;
    }

    .aap-shell {
        padding-inline: 0;
    }

    .aap-layout {
        padding-top: 0;
    }

    .aap-home .aap-section,
    .aap-home .aap-social-strip {
        margin-left: 5px;
        margin-right: 5px;
        width: calc(100% - 10px);
    }

    .aap-home .aap-section:first-child {
        margin-top: 5px;
    }

    .aap-season {
        height: 295px;
    }

    .aap-home .aap-season {
        margin-bottom: 0;
    }

    .aap-season .aap-section-heading,
    .aap-history-section .aap-section-heading {
        height: 51px;
        justify-content: flex-start;
        padding-left: 18px;
    }

    .aap-season .aap-section-heading h1 {
        font-size: 16px;
    }

    .aap-season .aap-section-heading h1::before,
    .aap-history-section .aap-section-heading h2 > .aap-icon {
        display: none;
    }

    .aap-season .aap-card-rail {
        gap: 10px;
        grid-auto-columns: 160px;
        height: 244px;
        overflow-x: auto;
        padding: 10px;
    }

    .aap-season .aap-anime-card,
    .aap-season .aap-anime-card__poster {
        height: 224px;
    }

    .aap-season .aap-heading-actions button {
        display: flex;
        height: 50px;
        top: 150px;
        width: 30px;
    }

    .aap-season .aap-anime-card__rating {
        font-size: 14px;
        left: 10px;
        line-height: 28px;
        min-height: 28px;
        top: 10px;
    }

    .aap-home .aap-social-strip {
        display: block;
        height: 40px;
        margin-bottom: 10px;
        margin-top: 10px;
        overflow: visible;
        padding: 0;
    }

    .aap-social-strip > a {
        display: none;
    }

    .aap-social-strip > a:first-child {
        align-items: center;
        background: #087ff5;
        border: 0;
        border-radius: 10px;
        display: flex;
        gap: 8px;
        height: 40px;
        justify-content: center;
        min-height: 40px;
        padding: 0 12px;
    }

    .aap-social-strip > a:first-child > span {
        background: transparent;
        height: auto;
        width: auto;
    }

    .aap-social-strip > a:first-child > strong {
        font-size: 0;
    }

    .aap-social-strip > a:first-child > strong::after {
        content: "Наш Вконтакте";
        font-size: 16px;
    }

    .aap-social-strip > a:first-child > small,
    .aap-social-strip > a:first-child > .aap-icon {
        display: none;
    }

    .aap-history-section {
        height: 370px;
    }

    .aap-history-section .aap-history-empty,
    .aap-history-section .aap-history-empty--small {
        background-color: #333;
        background-image: none;
        height: 319px;
        min-height: 319px;
    }

    .aap-history-section .aap-history-empty h3::after {
        font-size: 24px;
    }

    .aap-history-section .aap-history-empty::after {
        height: 270px;
        width: 270px;
    }

    .aap-mobile-nav {
        border-top: 3px solid var(--aap-accent);
        right: 8px;
    }

    .aap-mobile-nav a,
    .aap-mobile-nav button {
        color: #fff;
        font-size: 9px;
        position: relative;
    }

    .aap-mobile-nav .is-active {
        color: #fff;
    }

    .aap-mobile-nav .is-active::before {
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid var(--aap-accent);
        content: "";
        left: 50%;
        position: absolute;
        top: 0;
        transform: translateX(-50%);
    }
}
