/* ============================================================
   MOBILE VERSION  (телефони та планшети, ≤ 1335px)

   Десктопна версія (≥ 1336px) не змінюється: усі правила нижче
   живуть у медіа-запитах, а мобільні елементи, які додає
   scripts/mobile-nav.js, за замовчуванням приховані.
   ============================================================ */

.m-burger,
.m-scrim,
.m-drawer,
.m-search,
.m-tabbar {
    display: none;
}

/* ============================================================
   1. МОБІЛЬНА ОБОЛОНКА: хедер, шухляда, пошук, нижня панель
   ============================================================ */

@media (max-width: 1335px) {

    html {
        -webkit-text-size-adjust: 100%;
    }

    html.m-locked,
    html.m-locked body {
        overflow: hidden;
    }

    body {
        overflow-x: hidden;
        padding-top: 64px;
    }

    img,
    iframe {
        max-width: 100%;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    /* --- Хедер --- */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 64px;
        padding: 10px 12px;
        gap: 10px;
        border-radius: 0;
        border-left: 0;
        border-top: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        background-color: rgba(0, 0, 0, 0.72);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .site-header .main-nav,
    .site-header .secondary-nav,
    .site-header .search-box {
        display: none;
    }

    .logo {
        width: 150px;
        height: 40px;
        flex-shrink: 0;
    }

    .header-actions {
        gap: 8px;
        margin-left: auto;
    }

    .icon-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .m-burger {
        display: flex;
        background-color: #ff0000;
        color: #ffffff;
        padding: 0;
    }

    .m-burger svg,
    .m-icon-btn svg,
    .m-acc__btn svg,
    .m-drawer__link svg,
    .m-acc__link svg,
    .m-search__field svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* --- Затемнення під шухлядою та пошуком --- */
    .m-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1100;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .m-scrim.is-visible {
        opacity: 1;
        visibility: visible;
    }

    /* --- Шухляда з навігацією --- */
    .m-drawer {
        display: flex;
        flex-direction: column;
        gap: 22px;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        width: min(360px, 88vw);
        padding: 18px 18px 32px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #0b0b0b;
        border-left: 1px solid rgba(255, 255, 255, 0.12);
        color: #ffffff;
        font-family: 'Unbounded', sans-serif;
        transform: translateX(100%);
        transition: transform 0.28s ease;
    }

    .m-drawer.is-open {
        transform: translateX(0);
    }

    .m-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .m-drawer__logo {
        width: 150px;
        height: auto;
    }

    .m-icon-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        background: transparent;
        color: #ffffff;
        cursor: pointer;
    }

    .m-drawer__nav {
        display: flex;
        flex-direction: column;
    }

    .m-drawer__link,
    .m-acc__btn,
    .m-acc__link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        min-height: 52px;
        padding: 12px 0;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: transparent;
        color: #ffffff;
        font-family: inherit;
        font-size: 17px;
        font-weight: 700;
        text-align: left;
        text-decoration: none;
        text-transform: uppercase;
        cursor: pointer;
    }

    .m-drawer__link svg,
    .m-acc__link svg {
        flex-shrink: 0;
        color: #ff0000;
    }

    .m-drawer__link.is-current,
    .m-acc__link.is-current {
        color: #ff2b2b;
    }

    .m-acc__btn[aria-expanded="true"] svg {
        transform: rotate(90deg);
    }

    .m-acc__btn svg {
        color: #ff0000;
        transition: transform 0.2s ease;
    }

    .m-acc__panel {
        display: flex;
        flex-direction: column;
        padding-left: 14px;
    }

    .m-acc__link {
        min-height: 46px;
        font-size: 14px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.72);
    }

    .m-drawer__foot {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-top: auto;
    }

    .m-drawer__account {
        display: flex;
        gap: 10px;
    }

    .m-drawer__cta {
        flex: 1;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 30px;
        background: #ff0000;
        color: #ffffff;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        text-transform: uppercase;
    }

    .m-drawer__cta--ghost {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.4);
    }

    .m-drawer__phone {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 12px 18px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 20px;
        color: #ffffff;
        text-decoration: none;
    }

    .m-drawer__phone-number {
        font-size: 20px;
        font-weight: 800;
    }

    .m-drawer__phone-desc {
        font-size: 11px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.55);
    }

    .m-drawer__socials {
        display: flex;
        gap: 10px;
    }

    .m-drawer__social {
        width: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #ff0000;
    }

    .m-drawer__social img {
        width: 20px;
        height: 20px;
    }

    /* --- Панель пошуку --- */
    .m-search {
        display: flex;
        flex-direction: column;
        gap: 16px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        padding: 18px 16px 24px;
        background: #0b0b0b;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        font-family: 'Unbounded', sans-serif;
        transform: translateY(-110%);
        transition: transform 0.28s ease;
    }

    .m-search.is-open {
        transform: translateY(0);
    }

    .m-search__form {
        display: flex;
        gap: 10px;
    }

    .m-search__field {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 52px;
        padding: 0 18px;
        border-radius: 30px;
        background: #ffffff;
        color: #6b6b6b;
    }

    .m-search__input {
        flex: 1;
        min-width: 0;
        border: 0;
        outline: none;
        background: transparent;
        color: #000000;
        font-family: inherit;
    }

    .m-search__submit {
        flex-shrink: 0;
        min-height: 52px;
        padding: 0 20px;
        border: 0;
        border-radius: 30px;
        background: #ff0000;
        color: #ffffff;
        font-family: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }

    .m-search__hints {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .m-search__hints-title {
        width: 100%;
        color: rgba(255, 255, 255, 0.5);
        font-size: 11px;
        text-transform: uppercase;
    }

    .m-search__chip {
        padding: 8px 16px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 30px;
        background: transparent;
        color: #ffffff;
        font-family: inherit;
        font-size: 13px;
        cursor: pointer;
    }

    .m-search__cancel {
        align-self: flex-start;
        padding: 6px 0;
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.6);
        font-family: inherit;
        font-size: 13px;
        text-decoration: underline;
        cursor: pointer;
    }
}

/* ============================================================
   2. ЗАГАЛЬНІ БЛОКИ: hero, репертуар, сцена, футер
   ============================================================ */

@media (max-width: 1335px) {

    /* Flex- та grid-елементи не повинні розтягувати сторінку своїм вмістом */
    .footer-container > *,
    .contacts-wrapper > *,
    .page > *,
    .news-single__wrapper > *,
    .act-primary > *,
    .act-epilogue > *,
    .repertoire__list > * {
        min-width: 0;
    }

    /* --- HERO: абсолютні шари стають звичайним потоком --- */
    .hero,
    .hero--flush,
    .hero--single-tall,
    .hero-single,
    .single-main .hero,
    .afisha .hero,
    .page-team .hero {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 18px;
        height: auto;
        max-height: none;
        padding: 0 16px 24px;
        overflow: visible;
    }

    .hero--single-tall::after {
        display: none;
    }

    .hero > img,
    .main-image,
    .afisha .main-image,
    .hero-media,
    .hero--single-tall__img {
        position: static;
        inset: auto;
        order: 1;
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .hero > img,
    .main-image,
    .hero--single-tall__img {
        border-radius: 22px;
        object-fit: cover;
    }

    .hero-media {
        border-radius: 22px;
        overflow: hidden;
    }

    .hero-media img,
    .hero-media--auth img {
        width: 100%;
        height: auto;
        padding-bottom: 0;
    }

    /* Порядок читання: медіа → заголовки → картки → додаткові підписи */
    .hero-play {
        order: 2;
    }

    .hero-title,
    .hero-single-title,
    .headline-text.mask {
        order: 3;
    }

    .auth-buttons {
        order: 4;
    }

    .theater-people,
    .theater-person,
    .meanless-phrase,
    .auth {
        order: 5;
    }

    .hero-headline {
        order: 6;
    }

    .hero-show-card {
        order: 7;
    }

    .promo {
        order: 8;
    }

    .hero-quote {
        order: 9;
    }

    .hero-subscribe {
        order: 10;
    }

    .hero-small {
        order: 11;
    }

    .person-socials {
        order: 12;
    }

    .hero-subscribe,
    .hero-play,
    .hero-show-card,
    .hero-show-card--mask,
    .hero-quote,
    .hero-headline,
    .hero-title,
    .afisha .hero-title,
    .hero-single-title,
    .hero-small,
    .theater-people,
    .theater-person,
    .theater-person--profile,
    .page-career .theater-person,
    .page-person .theater-person,
    .meanless-phrase,
    .auth,
    .auth-buttons,
    .promo,
    .headline-text.mask,
    .person-socials,
    .year-of-birth,
    .profile-edit,
    .search-img,
    .search-block {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        transform: none;
        width: auto;
        max-width: 100%;
        min-height: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-show-card,
    .hero-show-card--mask,
    .promo,
    .auth,
    .theater-person,
    .page-career .theater-person,
    .page-person .theater-person {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    /* Великий заголовок */
    .hero-headline {
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }

    .headline-text,
    .headline-top,
    .headline-text--left,
    .headline-text--indent,
    .headline-text--indent-lg {
        margin-left: 0;
        font-size: clamp(34px, 10vw, 78px);
        text-align: left;
    }

    .headline-bottom,
    .headline-bottom--flat {
        flex-wrap: wrap;
        gap: 14px;
        margin-left: 0;
        transform: none;
    }

    /* Кнопка завжди під текстом, у якому б порядку вона не була в розмітці */
    .headline-bottom .headline-left {
        order: 1;
    }

    .headline-bottom .headline-btn {
        order: 2;
    }

    .headline-btn {
        width: 100%;
        max-width: 240px;
        height: 62px;
        border-radius: 40px;
    }

    .headline-btn img {
        max-width: 34px;
        height: auto;
    }

    .headline-arrow img,
    .headline-top img {
        width: 26px;
        height: auto;
    }

    /* Hero-картки та підписи */
    .hero-play {
        align-self: center;
        z-index: 2;
        margin-top: -52px;
    }

    .hero-play img {
        width: 104px;
        height: auto;
    }

    .hero-subscribe {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 16px 18px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 24px;
        background-color: rgba(255, 255, 255, 0.06);
        text-align: left;
    }

    .subscribe-icon {
        padding-bottom: 0;
    }

    .subscribe-text {
        left: 0;
        width: auto;
        font-size: 13px;
    }

    /* Розрив рядка знімаємо лише там, де в розмітці навколо нього є пробіл */
    .quote-text br {
        display: none;
    }
    .hero-show-card, .hero-play{
        display: none;
    }

    .hero-show-card,
    .hero-show-card--mask {
        align-items: flex-start;
        padding: 18px 20px;
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.06);
    }

    .show-card-title,
    .show-card-text,
    .hero-show-card--mask .show-card-title,
    .hero-show-card--mask .show-card-text {
        width: auto;
        font-size: 15px;
    }

    .hero-show-card--mask .show-card-text,
    .show-card-text {
        font-size: 13px;
    }

    .hero-quote {
        max-width: 100%;
        gap: 6px;
    }

    .quote-tag {
        margin-bottom: 4px;
    }

    .quote-text {
        font-size: clamp(18px, 5.4vw, 24px);
    }

    .hero-title,
    .afisha .hero-title {
        align-self: flex-start;
        padding: 14px 30px;
        border-radius: 40px;
        font-size: 22px;
    }

    .hero-single-title {
        width: 100%;
        text-align: left;
    }

    .hero-single-title h2 {
        font-size: clamp(28px, 8vw, 44px);
    }

    .hero-single-title p {
        font-size: 15px;
        line-height: 1.5;
    }

    .hero-small {
        display: flex;
        flex-direction: column;
        gap: 2px;
        max-width: 100%;
    }

    .hero-small p {
        margin: 0;
    }

    .hero-socials {
        display: flex;
        gap: 10px;
        margin-top: 14px;
    }

    .hero-socials img,
    .person-socials img {
        width: 42px;
        height: 42px;
    }

    .person-socials {
        display: flex;
        gap: 10px;
    }

    .theater-people h3,
    .meanless-phrase h3 {
        margin-bottom: 8px;
        max-width: 100%;
        font-size: clamp(20px, 6vw, 28px);
    }

    .theater-people p,
    .meanless-phrase p {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.6;
    }

    .theater-person h1 {
        max-width: 100%;
        font-size: clamp(24px, 7.5vw, 38px);
    }

    .theater-person h2 {
        max-width: 100%;
        font-size: clamp(18px, 5.5vw, 28px);
    }

    .theater-person p,
    .theater-person li,
    .page-career .theater-person p,
    .page-career .theater-person li,
    .page-career .theater-person h3 {
        font-size: 14px;
        line-height: 1.6;
    }

    .career-desc {
        max-width: 100%;
    }

    .year-of-birth {
        margin-bottom: 6px;
        font-size: 18px;
    }

    .profile-edit {
        display: inline-flex;
    }

    .user-info {
        font-size: 15px;
    }

    /* --- РЕПЕРТУАР --- */
    .repertoire,
    .repertoire--contained,
    .repertoire--overlap,
    .repertoire--spaced,
    .afisha .repertoire,
    .team,
    .team--pull {
        max-width: 100%;
        margin: 0 auto;
        padding: 24px 16px;
    }

    .repertoire--search {
        padding-top: 24px !important;
    }

    .repertoire__tabs {
        position: static;
        margin-bottom: 20px;
        margin-top: 20px;
        padding: 16px 20px;
        border-radius: 24px;
    }

    .repertoire__text {
        font-size: 15px;
    }

    .repertoire__text br {
        display: none;
    }

    /* Слайдер дат / категорій */
    .repertoire-slider,
    .team .swiper {
        overflow: hidden;
    }

    .team .repertoire-slider {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .team .repertoire-slider::-webkit-scrollbar {
        display: none;
    }

    .repertoire-slider .swiper-slide {
        width: 168px !important;
    }

    .repertoire-date-card {
        height: 62px;
        padding: 0 14px;
        border-radius: 20px;
    }

    .day,
    .page-team .day {
        font-size: 16px;
    }

    .month {
        font-size: 14px;
    }

    .label {
        margin-top: 2px;
        font-size: 12px;
    }

    /* Картки вистав */
    .repertoire__list,
    .page-information .repertoire__list,
    .page-careers .repertoire__list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding-top: 0;
    }

    /* Картка перевертається: зображення стає тлом, а текст задає висоту,
       тому вміст ніколи не обрізається, яким би довгим він не був */
    .repertoire-card {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        min-height: 340px;
        border-radius: 24px;
    }

    .repertoire-card > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Легке затемнення під назвою; опис і кнопки відкриваються тапом (scripts/site-nav.js) */
    .repertoire-card__overlay {
        background: linear-gradient(to top,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.12) 50%,
        rgba(0, 0, 0, 0) 100%);
    }

    /* relative, а не static: інакше градієнт .repertoire-card__overlay,
       який іде в розмітці пізніше, малюється поверх тексту */
    .repertoire-card__content {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        padding: 18px;
    }

    /* Затемнення точно під текстом — світлі кадри не заважають читати */
    .repertoire-card__content::before {
        content: "";
        position: absolute;
        inset: -18px;
        z-index: -1;
        background: linear-gradient(to top,
        rgba(0, 0, 0, 0.94) 0%,
        rgba(0, 0, 0, 0.86) 62%,
        rgba(0, 0, 0, 0) 100%);
    }

    .repertoire-card__content h3 {
        font-size: 15px;
    }

    .repertoire-card__content p,
    .repertoire-card__meta,
    .repertoire-card__btn {
        transform: none;
        font-family: "Unbounded", sans-serif;
        font-size: 12px;
        font-weight: 300;
    }

    .repertoire-card__content p {
        max-width: 100%;
        margin: 10px 0;
        line-height: 1.45;
    }

    .repertoire-card__bottom {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .repertoire-card__meta span,
    .repertoire-card__btn {
        height: 40px;
        font-size: 11px;
    }

    .repertoire-card__btn {
        grid-column: 1 / -1;
    }

    .repertoire-card__meta img {
        width: 14px;
        height: 14px;
    }

    .info-data {
        margin: 14px 0 0 16px !important;
    }

    .cta-button {
        padding: 10px 18px;
        font-size: 14px;
    }

    .cta-button svg,
    .cta-button img {
        width: 22px;
        height: 22px;
    }

    .repertoire__all {
        justify-content: center;
        margin-top: 24px;
        font-size: 14px;
    }

    .repertoire__all img {
        width: 32px;
        height: 24px;
    }

    .team-card-bottom {
        margin: 10px 0;
        font-size: 14px;
    }

    /* --- СЦЕНА (act-primary / act-epilogue) --- */
    .theater-stage,
    .page-search .theater-stage {
        max-width: 100%;
        gap: 26px;
        padding: 24px 16px 0;
    }

    .act-primary {
        flex-direction: column;
        gap: 14px;
        height: auto;
    }

    .actor-poster {
        flex: 1 1 auto;
        border-radius: 22px;
    }

    .actor-poster img {
        aspect-ratio: 3 / 2;
    }

    .backstage-overlay {
        margin-right: 0;
        padding: 16px;
        border-radius: 18px;
    }

    .monologue {
        margin-bottom: 12px;
        font-size: 13px;
    }

    .monologue br {
        display: none;
    }

    .join-troupe-btn {
        gap: 10px;
        font-size: 13px;
    }

    .playbill-banner {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .performance-modes {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 22px;
    }

    .mode-item {
        padding: 8px 18px;
        font-size: 12px;
    }

    .theater-headline {
        font-size: clamp(28px, 8.5vw, 54px);
    }

    .intermission-divider {
        width: 100%;
        margin: 14px 0;
    }

    .play-synopsis {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.6;
    }

    .action-pointer {
        position: static;
        align-self: flex-end;
        width: 44px;
        height: 44px;
        margin-top: 18px;
    }

    .act-epilogue {
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
        width: auto;
        padding-top: 8px;
    }

    .manifesto-headline {
        font-size: clamp(22px, 6.6vw, 40px);
    }

    .about-theater-tag {
        margin: 0 0 0 8px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.45);
    }

    /* Замість великих svg-квитків — акуратні картки */
    .credo-deck {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .credo-box {
        width: auto;
        min-height: 0;
        padding: 18px 20px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.04);
    }

    .credo-box::before {
        display: none;
    }

    .credo-box__content,
    .credo-box--left .credo-box__content,
    .credo-box--right .credo-box__content {
        width: auto;
        transform: none;
        font-size: 15px;
        line-height: 1.55;
    }

    /* --- ФУТЕР --- */
    .site-footer {
        margin-top: 48px;
        padding-top: 36px;
    }

    .footer-container {
        flex-wrap: wrap;
        gap: 28px;
        padding: 0 16px 32px;
    }

    .footer-socials {
        flex-direction: row;
        gap: 14px;
        margin-right: 0;
        order: 4;
    }

    .social-btn {
        width: 48px;
        height: 48px;
    }

    .footer-info,
    .footer-logo {
        max-width: 100%;
    }

    .footer-info {
        flex: 1 1 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .footer-logo {
        width: 220px;
        height: auto;
        margin-bottom: 4px;
    }

    .footer-nav {
        flex: 1 1 240px;
    }

    .footer-nav ul {
        gap: 14px;
    }

    .footer-nav > ul > li > a {
        min-height: 28px;
        font-size: 16px;
    }

    .sub-menu {
        margin-top: 12px;
        padding-left: 16px !important;
    }

    .footer-action {
        flex: 1 1 100%;
    }

    .phone-btn {
        justify-content: center;
        padding: 14px 24px;
    }

    .footer-bottom {
        padding: 18px 16px;
    }

    .footer-bottom p {
        font-size: 10px;
        line-height: 1.6;
    }
}

/* ============================================================
   3. ОКРЕМІ СТОРІНКИ
   ============================================================ */

@media (max-width: 1335px) {

    /* --- Сторінка вистави (single) --- */
    .change-img {
        margin-top: 0;
    }

    .change-img img {
        width: 100%;
        aspect-ratio: 4 / 5;
        object-fit: cover;
        border-radius: 22px;
    }

    .single {
        max-width: 100%;
        padding: 24px 16px;
    }

    .single__container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Без цього горизонтальний список акторів розтягує сітку ширше за екран */
    .single__left,
    .single__right {
        min-width: 0;
    }

    .single__right {
        order: -1;
    }

    .single__card {
        padding: 22px;
        border-radius: 18px;
    }

    .single__card.sidebar {
        padding: 22px;
    }

    .description-text {
        font-size: 15px;
    }

    .actors-list {
        overflow-x: auto;
        padding-bottom: 10px;
        scrollbar-width: none;
    }

    .actors-list::-webkit-scrollbar {
        display: none;
    }

    .actor-card.half-visible {
        width: auto;
        overflow: visible;
    }

    .buy-ticket-btn {
        margin-top: 24px;
        padding: 22px 12px;
        font-size: 18px;
    }

    .action-buttons {
        width: auto;
        padding: 20px 16px 0;
        flex-wrap: wrap;
    }

    .btn-ticket {
        flex: 1 1 100%;
        width: auto;
        font-size: 16px;
    }

    .btn-icon {
        width: 52px;
        height: 52px;
        flex: 0 0 auto;
    }

    /* --- Слайдер афіш --- */
    .banner-slider,
    .banner-slider--contained {
        max-width: 100%;
        padding: 24px 16px;
    }

    .banner-slider__swiper {
        padding-inline-start: 0;
    }

    .banner-slider__slide {
        width: 46% !important;
        margin-right: 12px;
    }

    .banner-slider__top {
        display: flex;
    }

    .banner-slider__progress {
        flex-wrap: wrap;
        gap: 4px;
    }

    .banner-slider__dash {
        width: 14px;
    }

    .banner-slider.expanded .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important;
        gap: 12px;
    }

    .show-more-red {
        position: static;
        left: auto;
        display: block;
        margin: 20px auto 0;
        font-size: 20px;
    }

    .show-more {
        padding: 14px 26px;
        font-size: 15px;
    }

    .show-more img {
        width: 28px;
        height: 28px;
    }

    /* --- Сторінки з боковим меню (.page) --- */
    .page {
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
        max-width: 100%;
        padding: 26px 16px;
    }

    .page .sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-height: none;
        padding-right: 0;
        padding-bottom: 20px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    }

    .page .sidebar__nav {
        gap: 12px;
    }

    .page .sidebar__link {
        min-height: 32px;
        font-size: 15px;
    }

    .page .sidebar__submenu {
        padding-left: 18px;
    }

    .page .sidebar__submenu a {
        font-size: 14px;
    }

    .page .article-col,
    .article-col--narrow {
        max-width: 100%;
    }

    /* Вкладені секції не додають другий рівень бокових відступів */
    .page .repertoire,
    .page .banner-slider,
    .page .news-single {
        padding-left: 0;
        padding-right: 0;
    }

    .page article h1 {
        margin-bottom: 18px;
        font-size: clamp(24px, 7vw, 36px);
    }

    .page article h2,
    .page-rules article h2 {
        max-width: 100%;
        font-size: clamp(19px, 5.4vw, 26px);
    }

    .page article p {
        font-size: 15px;
    }

    .page article > img {
        width: 100%;
        height: auto;
        border-radius: 18px;
    }

    /* --- Новини --- */
    .news-single {
        max-width: 100%;
        padding: 24px 0;
    }

    .news-single__wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .news-single__image {
        flex: 0 0 auto;
        width: 100%;
    }

    .news-single__image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 24px;
    }

    .news-single__content {
        margin-top: 0;
    }

    .news-single__title {
        margin-bottom: 16px;
        font-size: clamp(22px, 6.4vw, 30px);
    }

    .news-single__text {
        font-size: 15px;
        line-height: 1.6;
    }

    /* --- Контакти --- */
    .contacts-wrapper {
        flex-direction: column;
        width: auto;
        margin: 0;
        gap: 18px;
        padding: 0 16px 32px;
    }

    .contacts-info {
        width: auto;
        gap: 18px;
    }

    .contacts-map {
        min-height: 320px;
        border-radius: 22px;
    }

    .contacts-btn {
        height: 52px;
        font-size: 14px;
    }

    .contacts-btn .btn-icon {
        width: 20px;
        height: 20px;
        border: 0;
        background: none;
        box-shadow: none;
    }

    /* --- Авторизація --- */
    .auth {
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
        padding: 8px 0 16px;
    }

    .auth h1 {
        font-size: clamp(28px, 8vw, 40px);
    }

    .auth .subtitle {
        margin-bottom: 20px;
        font-size: 14px;
    }

    .auth .tabs button {
        min-width: 0;
        padding: 0 8px;
        font-size: clamp(12px, 3.8vw, 17px);
    }

    /* Інакше поле розпирає рядок і іконка "око" виїжджає за екран */
    .auth .input input {
        min-width: 0;
    }

    /* --- Реєстрація (mask) --- */
    .headline-text.mask {
        font-size: clamp(30px, 9vw, 56px);
    }

    .auth-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        font-size: 16px;
    }

    .auth-buttons .register,
    .auth-buttons .login {
        width: 100%;
        height: 58px;
        border-radius: 34px;
    }

    .promo {
        gap: 16px;
        width: 100%;
        padding: 14px;
        border-radius: 24px;
    }

    .promo__photo {
        width: 36%;
        max-width: 130px;
        max-height: none;
        aspect-ratio: 3 / 4;
    }

    .promo__title {
        font-size: 20px;
    }

    .promo__text {
        margin-bottom: 12px;
        font-size: 11px;
    }

    .promo__btn {
        height: 48px;
        margin-left: 0;
        padding: 12px 20px;
        font-size: 12px;
    }

    /* --- Результати пошуку --- */
    .search-img {
        width: calc(100% - 32px);
        height: auto;
        margin: 0 16px 16px;
        border-radius: 22px;
    }

    .search-block {
        width: auto;
        padding: 0 16px 16px;
    }

    .search-results {
        max-width: 100%;
        font-size: clamp(26px, 7.5vw, 40px);
        line-height: 1.1;
    }

    .search-results-p {
        font-size: 13px;
    }
}

/* ============================================================
   4. ТЕЛЕФОНИ (≤ 768px)
   ============================================================ */

@media (max-width: 768px) {

    body {
        padding-bottom: 72px;
    }

    /* Нижня панель швидкої навігації */
    .m-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(10, 10, 10, 0.94);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .m-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 54px;
        padding: 4px 2px;
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.6);
        font-family: 'Unbounded', sans-serif;
        text-decoration: none;
        cursor: pointer;
    }

    .m-tab.is-current {
        color: #ffffff;
    }

    .m-tab__icon {
        display: flex;
    }

    .m-tab__icon svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .m-tab.is-current .m-tab__icon svg {
        stroke: #ff2b2b;
    }

    .m-tab__label {
        font-size: 10px;
        letter-spacing: 0.2px;
    }

    /* Одна колонка для карток та широких блоків */
    .repertoire__list,
    .page-information .repertoire__list,
    .page-careers .repertoire__list {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .repertoire-card__content h3 {
        font-size: 17px;
    }

    .repertoire-card__content p,
    .repertoire-card__meta,
    .repertoire-card__btn {
        font-size: 13px;
    }

    /* Широкі hero-зображення отримують зручну висоту */
    .hero > img,
    .main-image,
    .hero--single-tall__img {
        aspect-ratio: 3 / 2;
    }

    .banner-slider__slide {
        width: 62% !important;
    }

    .banner-slider.expanded .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .footer-container {
        flex-direction: column;
        gap: 26px;
    }

    .footer-nav,
    .footer-action,
    .footer-info {
        flex: 1 1 100%;
    }

    .contacts-map {
        min-height: 260px;
    }

    .theater-people p,
    .meanless-phrase p,
    .play-synopsis,
    .page article p {
        font-size: 14px;
    }
}

/* ============================================================
   5. ВУЗЬКІ ЕКРАНИ (≤ 420px)
   ============================================================ */

@media (max-width: 420px) {

    .hero,
    .hero--flush,
    .hero--single-tall,
    .repertoire,
    .repertoire--contained,
    .repertoire--overlap,
    .repertoire--spaced,
    .team,
    .theater-stage,
    .page,
    .single,
    .banner-slider,
    .contacts-wrapper,
    .footer-container,
    .search-block {
        padding-left: 12px;
        padding-right: 12px;
    }

    .logo {
        width: 122px;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .header-actions {
        gap: 6px;
    }

    .headline-text,
    .headline-top {
        font-size: clamp(30px, 9.5vw, 40px);
    }

    .headline-btn {
        max-width: 100%;
        height: 56px;
    }

    .hero-subscribe {
        flex-direction: column;
        align-items: flex-start;
    }

    .promo {
        gap: 12px;
        padding: 12px;
    }

    .promo__photo {
        width: 32%;
        max-width: 104px;
    }

    .promo__btn {
        justify-content: center;
        width: 100%;
    }

    .m-tab__label {
        font-size: 9px;
    }

    .btn-ticket {
        font-size: 14px;
    }

    .buy-ticket-btn {
        padding: 18px 10px;
        font-size: 16px;
    }
}

@media (max-width: 1335px) {
    /* згорнута картка не тримає відступів під прихованим описом */
    .repertoire-card:not(.active):not(.is-open) .repertoire-card__content > p {
        margin: 0;
    }

    .repertoire-card.is-open .repertoire-card__content > .cta-button {
        margin-top: 8px;
    }

    /* у мобільній картці вміст іде звичайним потоком і збільшує її висоту */
    .repertoire-card.is-open .repertoire-card__content > p,
    .repertoire-card.is-open .repertoire-card__bottom,
    .repertoire-card.is-open .repertoire-card__content > .cta-button {
        max-height: 400px;
    }

    .repertoire-card.is-open .repertoire-card__content > p {
        margin: 8px 0 12px;
    }

    .repertoire-card__btn {
        gap: 8px;
    }
}

@media (max-width: 1335px) {
    /* реєстрація на телефоні — поля одне під одним */
    .auth.is-register {
        display: block;
    }

    /* вакансія: контакти — скляна картка під фото */
    .career-contact {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 16px;
        padding: 20px 22px;
        border-radius: 28px;
        background: rgba(255, 255, 255, .06);
        border: 1px solid rgba(255, 255, 255, .15);
        font-family: 'Unbounded', sans-serif;
    }

    .career-contact__row {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #fff;
        text-decoration: none;
    }

    .career-contact__row img { width: 30px; height: 30px; }

    .career-contact__row span {
        display: flex;
        flex-direction: column;
        font-size: 12px;
        line-height: 1.3;
    }

    .career-contact__row b { font-size: 16px; }

    /* соцмережі в героях і на персоні — 46 px, у ряд */
    .glass-social,
    .glass-social img {
        width: 46px;
        height: 46px;
    }
}

/* новини: картки й сторінка новини */
@media (max-width: 1335px) {
    .news-single--link .news-single__content { padding-left: 0; }
    .news-single--link .news-single__text { font-size: 15px; }
    .news-single__foot { gap: 16px; flex-wrap: wrap; }
    .news-article { padding: 24px 16px 60px; }
    .news-article__title { font-size: 30px; letter-spacing: -.5px; }
    .news-article__lead { font-size: 17px; margin-bottom: 28px; }
    .news-article__cover { border-radius: 24px; margin-bottom: 28px; }
    .news-article__body { font-size: 16px; }
    .news-article__gallery { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
    .news-article__gallery a { border-radius: 18px; }
    .news-article__others { grid-template-columns: 1fr; gap: 20px; }
    .news-article__more { margin-top: 48px; }
}

/* кабінет на телефоні */
@media (max-width: 1335px) {
    .cab { padding: 24px 16px 10px; }
    .cab-head { gap: 10px; margin-bottom: 20px; }
    .cab-head h2 { font-size: 26px; }
    .cab-head p { font-size: 14px; }
    .cab-grid { grid-template-columns: 1fr; gap: 12px; }
    .cab-card { grid-template-columns: 96px 1fr; gap: 14px; padding: 10px; border-radius: 24px; }
    .cab-card__img { border-radius: 16px; }
    .cab-card__title { font-size: 15px; }
    .cab-btn { padding: 11px 18px; font-size: 12px; }
    .cab-split { grid-template-columns: 1fr; }
    .cab-form { position: static; padding: 20px; border-radius: 24px; }
    .cab-row { grid-template-columns: 52px 1fr; gap: 12px; }
    .cab-row img { width: 52px; height: 64px; }
    .cab-row b { font-size: 14px; }
    .cab-row .cab-chip, .cab-row .cab-btn { grid-column: span 1; justify-self: start; }
    .cab-add { border-radius: 24px; padding: 16px; }
    .cab-add b { width: 100%; }
    .cab-add select, .cab-add input { flex: 1 1 140px; min-width: 0; }
    .cab-empty { padding: 30px 20px; }
}
