/* График выхода серий — модуль grafik-serii */
.b-post__schedule {
    --gs-code-w: 5.25rem;
    --gs-date-w: 11rem;
    --gs-status-w: 4.85rem;
    --gs-row-pad: 12px 16px;
    margin: 0;
    padding: 0;
    line-height: 1.45;
    scroll-margin-top: 96px;
}

.b-post__schedule *,
.b-post__schedule *::before,
.b-post__schedule *::after {
    box-sizing: border-box;
}

.b-post__schedule_header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
}

.b-post__schedule_heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 20px;
}

.b-post__schedule_title {
    margin: 0;
    min-width: 0;
    font-family: var(--qapo-font-display, var(--font-display), inherit);
    font-size: var(--qapo-fs-h2, clamp(18px, 2.4vw, 22px));
    font-weight: 700;
    line-height: var(--qapo-lh-heading, 1.28);
    letter-spacing: -0.03em;
    color: var(--tt);
}

.b-post__schedule_summary {
    margin: 0;
    max-width: 62rem;
    font-size: var(--qapo-fs-sm, 14px);
    line-height: 1.5;
    color: rgba(var(--tt-rgb), 0.58);
}

.b-post__schedule_updated {
    margin: 0;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: rgba(var(--tt-rgb), 0.46);
}

.b-post__schedule_updated time {
    font-variant-numeric: tabular-nums;
}

.b-post__schedule_filters {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 16px;
    padding: 4px;
    width: fit-content;
    max-width: 100%;
    border-radius: 12px;
    background: rgba(var(--bdc-rgb), 0.16);
    border: 1px solid rgba(var(--bdc-rgb), 0.28);
}

.dt .b-post__schedule_filters {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.b-post__schedule_filter,
.b-post__schedule_toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(var(--tt-rgb), 0.62);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.b-post__schedule_filter:hover,
.b-post__schedule_toggle:hover {
    color: var(--tt);
    background: rgba(var(--tt-rgb), 0.05);
}

.dt .b-post__schedule_filter:hover,
.dt .b-post__schedule_toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.b-post__schedule_filter.is-active {
    color: var(--tt);
    background: rgba(var(--bg-rgb, 255, 252, 246), 0.96);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.dt .b-post__schedule_filter.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.b-post__schedule_filter span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    margin: 0;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    color: rgba(var(--tt-rgb), 0.55);
    background: rgba(var(--bdc-rgb), 0.32);
}

.dt .b-post__schedule_filter span {
    color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.08);
}

.b-post__schedule_filter.is-active span {
    color: var(--accent-dark, var(--accent));
    background: rgba(var(--accent-rgb), 0.16);
}

.dt .b-post__schedule_filter.is-active span {
    color: var(--accent-light, var(--accent));
    background: rgba(var(--accent-rgb), 0.22);
}

.b-post__schedule_next {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 14px;
    margin: 0 0 16px;
    padding: 14px 16px 14px 14px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.16) 0%, rgba(var(--accent-rgb), 0.05) 55%, transparent 100%),
        rgba(var(--bg-rgb), 0.4);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.06);
}

.b-post__schedule_next.is-empty {
    grid-template-columns: 40px minmax(0, 1fr);
    background: rgba(var(--bdc-rgb), 0.1);
    border-color: rgba(var(--bdc-rgb), 0.28);
    box-shadow: none;
}

.dt .b-post__schedule_next {
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.14) 0%, rgba(var(--accent-rgb), 0.04) 58%, transparent 100%),
        rgba(255, 255, 255, 0.03);
    border-color: rgba(var(--accent-rgb), 0.28);
}

.dt .b-post__schedule_next.is-empty {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.b-post__schedule_next-ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #141820;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.28);
}

.b-post__schedule_next-ico::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 2px;
    border-style: solid;
    border-width: 6px 0 6px 9px;
    border-color: transparent transparent transparent currentColor;
}

.b-post__schedule_next.is-empty .b-post__schedule_next-ico {
    background: rgba(var(--tt-rgb), 0.08);
    color: rgba(var(--tt-rgb), 0.48);
    box-shadow: none;
}

.b-post__schedule_next.is-empty .b-post__schedule_next-ico::before {
    width: 11px;
    height: 11px;
    margin: 2px 0 0;
    border: 1.6px solid currentColor;
    border-radius: 2px;
    background:
        linear-gradient(currentColor, currentColor) 50% 3px / 7px 1.4px no-repeat;
    box-shadow: -3px -3px 0 -2px currentColor, 3px -3px 0 -2px currentColor;
}

.b-post__schedule_next-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.b-post__schedule_next-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-dark, var(--accent));
}

.dt .b-post__schedule_next-label {
    color: var(--accent-light, var(--accent));
}

.b-post__schedule_next.is-empty .b-post__schedule_next-label {
    color: rgba(var(--tt-rgb), 0.48);
}

.b-post__schedule_next-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    min-width: 0;
}

.b-post__schedule_next.is-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(var(--tt-rgb), 0.62);
}

.b-post__schedule_next-code,
.b-post__schedule_episode-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 7px;
    font-family: var(--qapo-font-display, var(--font-display), inherit);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    color: var(--accent-dark, var(--accent));
    background: rgba(var(--accent-rgb), 0.14);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
}

.b-post__schedule_episode-code:hover,
.b-post__schedule_next-code:hover {
    color: var(--tt);
    border-color: rgba(var(--accent-rgb), 0.4);
}

.dt .b-post__schedule_next-code,
.dt .b-post__schedule_episode-code {
    color: var(--accent-light, var(--accent));
    background: rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.26);
}

.b-post__schedule_next-name,
.b-post__schedule_episode-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.b-post__schedule_next-name strong,
.b-post__schedule_episode-name strong {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--tt);
}

.b-post__schedule_next-name span,
.b-post__schedule_episode-name span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(var(--tt-rgb), 0.48);
}

.b-post__schedule_next-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    text-align: right;
}

.b-post__schedule_next-meta time {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: rgba(var(--tt-rgb), 0.7);
}

.b-post__schedule_seasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b-post__schedule_season {
    margin: 0;
    border: 1px solid rgba(var(--bdc-rgb), 0.28);
    border-radius: 14px;
    background: rgba(var(--bg-rgb), 0.35);
    overflow: hidden;
}

.b-post__schedule_season[hidden] {
    display: none !important;
}

.dt .b-post__schedule_season {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.b-post__schedule_season-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 14px 12px 16px;
    background: rgba(var(--bdc-rgb), 0.1);
}

.dt .b-post__schedule_season-head {
    background: rgba(255, 255, 255, 0.03);
}

.b-post__schedule_season-title {
    margin: 0;
    min-width: 0;
    font-family: var(--qapo-font-display, var(--font-display), inherit);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.b-post__schedule_season-title a {
    color: inherit;
    text-decoration: none;
}

.b-post__schedule_season-title a:hover {
    color: var(--accent);
}

.b-post__schedule_season-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: rgba(var(--tt-rgb), 0.62);
    background: rgba(var(--bdc-rgb), 0.28);
    border: 1px solid rgba(var(--bdc-rgb), 0.22);
}

.dt .b-post__schedule_season-count {
    color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.b-post__schedule_toggle {
    min-height: 32px;
    padding: 0 10px 0 12px;
    border: 1px solid rgba(var(--bdc-rgb), 0.28);
    background: rgba(var(--bg-rgb), 0.45);
}

.dt .b-post__schedule_toggle {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.b-post__schedule_toggle::after {
    content: "";
    width: 0.38em;
    height: 0.38em;
    margin-top: -2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.7;
    transition: transform 0.18s ease, margin 0.18s ease;
}

.b-post__schedule_toggle[aria-expanded="true"]::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.b-post__schedule_episodes {
    display: flex;
    flex-direction: column;
}

.b-post__schedule_episodes[hidden] {
    display: none !important;
}

.b-post__schedule_episode {
    display: grid;
    grid-template-columns: var(--gs-code-w) minmax(0, 1fr) var(--gs-date-w) var(--gs-status-w);
    align-items: center;
    column-gap: 14px;
    min-height: 56px;
    padding: var(--gs-row-pad);
    border-top: 1px solid rgba(var(--bdc-rgb), 0.16);
    scroll-margin-top: 96px;
    transition: background 0.15s ease;
}

.dt .b-post__schedule_episode {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.b-post__schedule_episode-main,
.b-post__schedule_episode-meta {
    display: contents;
}

.b-post__schedule_episode-code {
    justify-self: start;
}

.b-post__schedule_episode-name {
    min-width: 0;
}

.b-post__schedule_episode-meta time {
    justify-self: end;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
    color: rgba(var(--tt-rgb), 0.55);
}

.b-post__schedule_status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    min-height: 22px;
    min-width: 4.4rem;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: rgba(var(--tt-rgb), 0.62);
    background: rgba(var(--bdc-rgb), 0.22);
    border: 1px solid rgba(var(--bdc-rgb), 0.22);
}

.is-released .b-post__schedule_status {
    color: var(--green, #3D9A6E);
    background: rgba(var(--green-rgb, 61, 154, 110), 0.12);
    border-color: rgba(var(--green-rgb, 61, 154, 110), 0.22);
}

.is-next .b-post__schedule_status,
.b-post__schedule_next .b-post__schedule_status,
.is-upcoming .b-post__schedule_status {
    color: var(--accent-dark, var(--accent));
    background: rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.28);
}

.dt .is-upcoming .b-post__schedule_status,
.dt .is-next .b-post__schedule_status,
.dt .b-post__schedule_next .b-post__schedule_status {
    color: var(--accent-light, var(--accent));
}

.b-post__schedule_episode.is-next {
    background: rgba(var(--accent-rgb), 0.07);
}

.b-post__schedule_episode:hover {
    background: rgba(var(--tt-rgb), 0.03);
}

.dt .b-post__schedule_episode:hover {
    background: rgba(255, 255, 255, 0.025);
}

.b-post__schedule_faq {
    margin-top: 20px;
    padding-top: 4px;
}

.b-post__schedule_faq h2 {
    margin: 0 0 10px;
    font-family: var(--qapo-font-display, var(--font-display), inherit);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tt);
}

.b-post__schedule_faq details {
    border-top: 1px solid rgba(var(--bdc-rgb), 0.18);
    padding: 0;
}

.dt .b-post__schedule_faq details {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.b-post__schedule_faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    list-style: none;
    color: var(--tt);
}

.b-post__schedule_faq summary::-webkit-details-marker {
    display: none;
}

.b-post__schedule_faq summary::after {
    content: "";
    flex-shrink: 0;
    width: 0.38em;
    height: 0.38em;
    margin-top: -2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.5;
    transition: transform 0.18s ease, margin 0.18s ease;
}

.b-post__schedule_faq details[open] summary::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.b-post__schedule_faq p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(var(--tt-rgb), 0.62);
}

.b-post__schedule_empty {
    padding: 18px 16px;
    border: 1px dashed rgba(var(--bdc-rgb), 0.32);
    border-radius: 12px;
    color: rgba(var(--tt-rgb), 0.58);
    text-align: center;
}

@media (max-width: 760px) {
    .b-post__schedule {
        --gs-code-w: 4.5rem;
        --gs-date-w: auto;
        --gs-status-w: auto;
        --gs-row-pad: 12px 14px;
    }

    .b-post__schedule_heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .b-post__schedule_updated {
        white-space: normal;
    }

    .b-post__schedule_filters {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .b-post__schedule_filter {
        flex: none;
        width: 100%;
        justify-content: center;
        padding: 0 6px;
        font-size: 12px;
    }

    .b-post__schedule_next {
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 12px 14px 12px 12px;
    }

    .b-post__schedule_next-ico {
        width: 36px;
        height: 36px;
    }

    .b-post__schedule_next-meta {
        grid-column: 2;
        justify-content: flex-start;
        text-align: left;
        margin-top: 2px;
    }

    .b-post__schedule_season-head {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "title toggle"
            "count toggle";
        gap: 6px 10px;
        padding: 12px 12px 12px 14px;
    }

    .b-post__schedule_season-title { grid-area: title; }
    .b-post__schedule_season-count { grid-area: count; justify-self: start; }
    .b-post__schedule_toggle { grid-area: toggle; }

    .b-post__schedule_episode {
        grid-template-columns: var(--gs-code-w) minmax(0, 1fr) auto;
        grid-template-areas:
            "code name status"
            "code date status";
        align-items: start;
        row-gap: 4px;
        min-height: 0;
    }

    .b-post__schedule_episode-code { grid-area: code; margin-top: 2px; }
    .b-post__schedule_episode-name { grid-area: name; }
    .b-post__schedule_episode-meta time {
        grid-area: date;
        justify-self: start;
        text-align: left;
        font-size: 12px;
    }
    .b-post__schedule_status {
        grid-area: status;
        align-self: start;
        margin-top: 2px;
    }
}

.qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next {
    display: grid !important;
    margin: 0 0 16px !important;
    padding: 14px 16px 14px 14px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(var(--accent-rgb), 0.3) !important;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.16) 0%, rgba(var(--accent-rgb), 0.05) 55%, transparent 100%),
        rgba(var(--bg-rgb), 0.4) !important;
    box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.06) !important;
}

.qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next.is-empty {
    border-color: rgba(var(--bdc-rgb), 0.28) !important;
    background: rgba(var(--bdc-rgb), 0.1) !important;
    box-shadow: none !important;
}

.dt .qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next {
    border-color: rgba(var(--accent-rgb), 0.28) !important;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.14) 0%, rgba(var(--accent-rgb), 0.04) 58%, transparent 100%),
        rgba(255, 255, 255, 0.03) !important;
}

.dt .qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next.is-empty {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next::before {
    content: none !important;
    display: none !important;
}

.qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next-label,
.qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next-code,
.qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next-date,
.qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next-status {
    width: auto;
    padding: revert;
    border: revert;
    background: revert;
}

@media (max-width: 760px) {
    .qapo__schedule-player .b-post__schedule[data-grafik-serii] .b-post__schedule_next {
        grid-template-columns: 36px minmax(0, 1fr) !important;
        padding: 12px 14px 12px 12px !important;
    }
}
