@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

/* ===== Header with Telegram auth ===== */
/*
 * Шапка выкладывается grid'ом из 3 колонок: [1fr] [auto-меню] [1fr-виджет].
 * Меню стоит в центральной auto-колонке — оно всегда отцентровано относительно
 * реального центра вьюпорта. Виджет авторизации лежит в правой 1fr-колонке
 * и прижат к правому краю через justify-self: end. За счёт grid виджет
 * никогда не наложится на меню при сжатии экрана: уменьшаются именно колонки,
 * а не позиции элементов. Вертикально всё выровнено align-items: center,
 * поэтому виджет стоит ровно по уровню текста меню.
 *
 * Двойной класс — чтобы перебить `.header-landing__content` из style.min.css.
 */
.header-landing__content.header-landing__content--auth {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
    padding: 14px 32px 14px 32px;
}

/* Пункт меню «Личный кабинет» — только в мобильном бургере */
.menu-landing__item--mobile-only {
    display: none;
}

.header-landing__content--auth .header-landing__menu {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.header-landing__content--auth .menu-landing__body {
    margin: 0;
}

.header-landing__auth {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 101;
    min-height: 32px;
}

.header-auth__widget {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}

.header-auth__widget iframe {
    border-radius: 8px;
}

.header-auth__profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 181, 72, 0.35);
    color: #ffe6b3;
    text-decoration: none;
    font-size: 13px;
    font-family: 'Times New Roman', Times, serif;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    max-width: 220px;
    overflow: hidden;
}

.header-auth__profile:hover {
    background-color: rgba(255, 181, 72, 0.12);
    border-color: rgba(255, 181, 72, 0.6);
    color: #ffb548;
}

.header-auth__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.header-auth__avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 181, 72, 0.55), rgba(69, 59, 207, 0.55));
    color: #fff;
    font-weight: bold;
    font-size: 13px;
}

.header-auth__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

@media (max-width: 991.98px) {
    .header-landing__content.header-landing__content--auth {
        padding: 12px 18px 12px 18px;
        column-gap: 10px;
    }
    .header-auth__name {
        display: none;
    }
    .header-auth__profile {
        padding: 4px;
    }
}

@media (max-width: 767.98px) {
    /* На мобильных возвращаемся к flex-потоку: авторизация слева, бургер справа */
    .header-landing__content.header-landing__content--auth {
        display: flex;
        grid-template-columns: none;
        padding: 12px 18px;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    .header-landing__content.header-landing__content--auth .header-landing__menu {
        grid-column: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
        order: 2;
    }
    .header-landing__content.header-landing__content--auth .menu-landing__body {
        margin: 0;
    }
    .header-landing__auth {
        grid-column: auto;
        justify-self: auto;
        order: 1;
        margin-right: auto;
    }
    .header-auth__widget {
        transform: scale(0.9);
        transform-origin: left center;
    }
    /* В мобильном бургере показываем «Личный кабинет» */
    .menu-landing__item--mobile-only {
        display: list-item;
    }
}

@media (max-width: 480px) {
    .header-landing__content.header-landing__content--auth {
        padding: 10px 14px;
    }
    .header-auth__widget {
        transform: scale(0.82);
    }
}

/* ===== Purchased highlight on cards ===== */
.tasks-card--purchased {
    position: relative;
    box-shadow: 0 0 0 2px rgba(255, 181, 72, 0.55), 0 0 24px rgba(255, 181, 72, 0.18);
    border-radius: 14px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tasks-card--purchased:hover {
    box-shadow: 0 0 0 2px rgba(255, 181, 72, 0.85), 0 0 32px rgba(255, 181, 72, 0.32);
}

.tasks-card__tag--owned {
    color: #1f1300;
    border-color: rgba(255, 181, 72, 0.85);
    background-color: rgba(255, 181, 72, 0.85);
    font-weight: bold;
}

.one-task-card--purchased {
    box-shadow: 0 0 0 2px rgba(255, 181, 72, 0.55), 0 0 36px rgba(255, 181, 72, 0.2);
    border-radius: 16px;
}

/* ===== Profile page ===== */
/*
 * `.content` в style.min.css имеет position: absolute без указания left/right/width,
 * из-за чего в режиме shrink-to-fit ширина «подгоняется под содержимое» и
 * на странице профиля сначала показывает узкий блок (расширяется только после
 * лэйаут-реверса при скролле/догрузке). Принудительно растягиваем .content
 * на всю ширину страницы. Селектор `.wrapper .content` — для повышения
 * специфичности над одиночным `.content` из style.min.css.
 */
.wrapper .content {
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
}

/*
 * Раньше .content был shrink-to-fit и ровно подходил под ширину дочернего блока,
 * поэтому внутренние контейнеры с max-width (но без margin: 0 auto) выглядели
 * по центру за счёт центрирования самого .content. Теперь .content full-width —
 * центрируем такие блоки явно.
 */
.wrapper .content > .content__one-task {
    margin-left: auto;
    margin-right: auto;
}

.profile {
    color: #f1f1f1;
    font-family: 'Times New Roman', Times, serif;
    padding: 16px 0 96px;
    width: 100%;
}

.profile__header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background-color: rgba(30, 29, 29, 0.72);
    border: 1px solid rgba(191, 182, 79, 0.35);
    border-radius: 18px;
    box-shadow: 0 0 12px rgba(206, 206, 206, 0.08);
    margin-bottom: 24px;
}

.profile__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 181, 72, 0.55);
    background-color: rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 28px;
    color: #fff;
}

.profile__avatar--placeholder {
    background: linear-gradient(135deg, rgba(255, 181, 72, 0.55), rgba(69, 59, 207, 0.55));
}

.profile__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.profile__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
    row-gap: 6px;
}

.profile__name {
    margin: 0;
    font-size: 22px;
    color: #ffb548;
    font-weight: bold;
    line-height: 1.2;
}

.profile__loyalty-head--inline {
    font-size: 14px;
    line-height: 1.35;
    flex: 1 1 auto;
    min-width: 0;
}

.profile__header-loyalty {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(191, 182, 79, 0.2);
}

.profile__sub {
    font-size: 13px;
    color: #cecece;
    opacity: 0.85;
}

.profile__logout {
    display: inline-block;
    margin-top: 6px;
    color: #ff8a8a;
    text-decoration: none;
    font-size: 13px;
    align-self: flex-start;
}

.profile__logout:hover {
    text-decoration: underline;
    color: #ff5252;
}

.profile__loyalty-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(206, 206, 206, 0.88);
}

.profile__loyalty-label {
    color: rgba(206, 206, 206, 0.65);
    font-weight: normal;
}

.profile__loyalty-tier {
    color: #ffb548;
    font-weight: 600;
}

.profile__loyalty-pct {
    color: #ffb548;
    font-weight: 600;
    font-size: 13px;
    opacity: 0.95;
}

.profile__header-loyalty .profile__loyalty-next {
    margin-top: 0;
}

.profile__loyalty-next {
    margin-top: 10px;
    font-size: 14px;
    color: #ffb548;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 10px;
}

.profile__header-loyalty .profile__loyalty-max {
    margin-top: 0;
}

.profile__loyalty-max {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(206, 206, 206, 0.55);
    font-weight: normal;
}

.profile__loyalty-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 8px;
}

.profile__loyalty-track-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #453bcf, #6b5cff 40%, #ffb548);
    box-shadow: 0 0 16px rgba(255, 181, 72, 0.35);
    transition: width 0.5s ease;
}

.profile__loyalty-track-glow {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: profile-loyalty-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes profile-loyalty-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(350%);
    }
}

.profile__loyalty-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(206, 206, 206, 0.65);
    letter-spacing: 0.03em;
}

.profile__add-task {
    padding: 18px 22px;
    background-color: rgba(30, 29, 29, 0.65);
    border: 1px solid rgba(191, 182, 79, 0.25);
    border-radius: 16px;
    margin-bottom: 24px;
}

.profile__section-title {
    margin: 0 0 6px;
    color: #ffb548;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.profile__section-hint {
    margin: 0 0 14px;
    font-size: 14px;
    color: #cecece;
    line-height: 1.45;
}

.profile__form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile__input {
    flex: 1 1 320px;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(191, 182, 79, 0.45);
    background-color: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile__input:focus {
    border-color: rgba(255, 181, 72, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 181, 72, 0.18);
}

.profile__button {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid rgba(255, 181, 72, 0.55);
    background-color: rgba(69, 59, 207, 0.65);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.profile__button:hover {
    background-color: rgba(255, 181, 72, 0.25);
    border-color: rgba(255, 181, 72, 0.85);
    color: #ffb548;
}

.profile__alert {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid transparent;
}

.profile__alert--success {
    background-color: rgba(60, 180, 90, 0.18);
    border-color: rgba(60, 180, 90, 0.55);
    color: #c5f5c5;
}

.profile__alert--error {
    background-color: rgba(220, 70, 70, 0.18);
    border-color: rgba(220, 70, 70, 0.55);
    color: #ffd2d2;
}

.profile__tasks {
    padding: 18px 22px;
    background-color: rgba(30, 29, 29, 0.55);
    border: 1px solid rgba(191, 182, 79, 0.25);
    border-radius: 16px;
}

.profile__tasks--free {
    margin-top: 24px;
    border-color: rgba(117, 193, 236, 0.35);
    background-color: rgba(30, 29, 29, 0.45);
}

.profile__tasks--continue {
    margin-bottom: 24px;
    border-color: rgba(255, 181, 72, 0.4);
    background-color: rgba(30, 29, 29, 0.58);
}

.profile-card--continue {
    border-color: rgba(255, 181, 72, 0.5);
    box-shadow: 0 0 0 1px rgba(255, 181, 72, 0.2), 0 0 18px rgba(255, 181, 72, 0.1);
}

.profile-card__tag--continue {
    background-color: rgba(255, 181, 72, 0.2);
    color: #ffb548;
    border: 1px solid rgba(255, 181, 72, 0.45);
}

/* Blazor scenary: диалог сохранённого прогресса */
.scenary-resume-prompt {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(10, 8, 18, 0.82);
    backdrop-filter: blur(4px);
}

.scenary-resume-prompt__panel {
    max-width: 420px;
    width: 100%;
    padding: 22px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 181, 72, 0.45);
    background-color: rgba(30, 29, 29, 0.95);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.scenary-resume-prompt__title {
    margin: 0 0 10px;
    font-size: 20px;
    color: #ffb548;
    font-weight: bold;
}

.scenary-resume-prompt__text {
    margin: 0 0 18px;
    font-size: 15px;
    color: #e8e8e8;
    line-height: 1.45;
}

.scenary-resume-prompt__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scenary-resume-prompt__btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.scenary-resume-prompt__btn--primary {
    background-color: rgba(69, 59, 207, 0.75);
    border-color: rgba(255, 181, 72, 0.55);
    color: #fff;
}

.scenary-resume-prompt__btn--primary:hover {
    background-color: rgba(255, 181, 72, 0.22);
    color: #ffb548;
}

.scenary-resume-prompt__btn--ghost {
    background-color: transparent;
    border-color: rgba(206, 206, 206, 0.35);
    color: #cecece;
}

.scenary-resume-prompt__btn--ghost:hover {
    border-color: rgba(255, 181, 72, 0.5);
    color: #ffb548;
}

.profile__empty {
    margin: 12px 0 0;
    font-size: 15px;
    color: #cecece;
    opacity: 0.85;
}

/* ===== Profile cards (внутренняя сетка карточек заданий) ===== */
.profile-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    background-color: rgba(20, 20, 22, 0.7);
    border: 1px solid rgba(191, 182, 79, 0.25);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    min-height: 100%;
}

.profile-card:hover {
    transform: translateY(-2px);
}

.profile-card--purchased {
    border-color: rgba(255, 181, 72, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 181, 72, 0.25), 0 0 18px rgba(255, 181, 72, 0.12);
}

.profile-card--purchased:hover {
    box-shadow: 0 0 0 1px rgba(255, 181, 72, 0.85), 0 0 26px rgba(255, 181, 72, 0.28);
    border-color: rgba(255, 181, 72, 0.85);
}

.profile-card--free {
    border-color: rgba(117, 193, 236, 0.45);
    box-shadow: 0 0 0 1px rgba(117, 193, 236, 0.18), 0 0 16px rgba(117, 193, 236, 0.1);
}

.profile-card--free:hover {
    box-shadow: 0 0 0 1px rgba(117, 193, 236, 0.85), 0 0 22px rgba(117, 193, 236, 0.22);
    border-color: rgba(117, 193, 236, 0.85);
}

.profile-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Fallback для браузеров без поддержки aspect-ratio */
@supports not (aspect-ratio: 16 / 10) {
    .profile-card__media {
        height: 0;
        padding-top: 62.5%;
    }
    .profile-card__photo {
        position: absolute;
        inset: 0;
    }
}

.profile-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.profile-card:hover .profile-card__photo {
    transform: scale(1.04);
}

.profile-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
    flex: 1 1 auto;
}

.profile-card__title {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
    font-weight: bold;
    color: #f1f1f1;
    font-family: 'Times New Roman', Times, serif;
}

.profile-card__title a {
    color: inherit;
    text-decoration: none;
}

.profile-card__title a:hover {
    color: #ffb548;
}

.profile-card__description {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.4;
    color: #cecece;
    font-family: 'Times New Roman', Times, serif;
    /* clamp до 3 строк, чтобы не растягивать карточки */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-top: 4px;
}

.profile-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: 0.02em;
    border: 1px solid rgba(191, 182, 79, 0.35);
    color: #c9c3c3;
    background-color: rgba(30, 29, 29, 0.45);
    white-space: nowrap;
}

.profile-card__tag--category {
    color: #cecece;
    border-color: rgba(206, 206, 206, 0.22);
    background-color: rgba(255, 255, 255, 0.04);
}

.profile-card__tag--owned {
    color: #1f1300;
    border-color: rgba(255, 181, 72, 0.85);
    background-color: rgba(255, 181, 72, 0.85);
    font-weight: bold;
}

.profile-card__tag--free {
    color: #0c2a3a;
    border-color: rgba(117, 193, 236, 0.85);
    background-color: rgba(117, 193, 236, 0.85);
    font-weight: bold;
}

.profile-card__btn {
    align-self: stretch;
    margin-top: auto;
    padding: 10px 14px;
    background-color: rgba(69, 59, 207, 0.85);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 13px;
    text-align: center;
    border: 1px solid rgba(255, 181, 72, 0.45);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.profile-card__btn:hover {
    background-color: rgba(255, 181, 72, 0.85);
    color: #1f1300;
    box-shadow: 0 0 14px rgba(255, 181, 72, 0.45);
}

@media (max-width: 480px) {
    .profile-cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 767.98px) {
    .profile__header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 14px;
    }
    .profile__info {
        align-items: center;
    }
    .profile__logout {
        align-self: center;
    }
    .profile__form {
        flex-direction: column;
        gap: 8px;
    }
    .profile__input {
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 13px;
        line-height: 1.3;
        height: auto;
        border-radius: 8px;
    }
    .profile__button {
        padding: 8px 16px;
        font-size: 13px;
        line-height: 1.3;
        border-radius: 8px;
    }
    .profile__add-task,
    .profile__tasks {
        padding: 14px;
    }

    .profile__title-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile__loyalty-head--inline {
        justify-content: center;
    }

    .profile__header-loyalty {
        text-align: left;
        width: 100%;
        max-width: 420px;
    }
}

/* Метки на карточках заданий (CategoryScenary) — сразу после описания */
.tasks-card__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 8px;
    margin-bottom: 4px;
    max-width: 100%;
}

.tasks-card__tag {
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: 0.02em;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(191, 182, 79, 0.35);
    color: #c9c3c3;
    background-color: rgba(30, 29, 29, 0.45);
}

.tasks-card__tag--category {
    color: #cecece;
    border-color: rgba(206, 206, 206, 0.22);
    background-color: rgba(255, 255, 255, 0.04);
}

@media (max-width: 767.98px) {
    .tasks-card__tags {
        gap: 4px 6px;
        margin-top: 6px;
        margin-bottom: 2px;
    }

    .tasks-card__tag {
        font-size: 10px;
        padding: 2px 7px;
    }
}

/* Пагинация списка заданий (CategoryScenary) — в духе style.css: тёмный фон, золотая обводка, акцент как у .menu-landing__link._active */
.tasks-pagination__summary {
    margin: 0 0 16px 0;
    padding: 0 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #cecece;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
}

.tasks-pagination__summary-sep {
    margin: 0 0.35em;
    opacity: 0.65;
}

.tasks-pagination {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 8px;
    margin-bottom: 88px;
    padding: 0 8px 12px;
}

.tasks-pagination__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    max-width: 100%;
    padding: 14px 18px;
    border-radius: 25px;
    border: 2px solid rgba(191, 182, 79, 0.35);
    background-color: rgba(30, 29, 29, 0.72);
    box-shadow: 0 0 8px rgba(206, 206, 206, 0.12);
}

.tasks-pagination__nav {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 40px;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(191, 182, 79, 0.45);
    background-color: rgba(69, 59, 207, 0.35);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tasks-pagination__icon {
    display: block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.tasks-pagination__nav:hover {
    color: #fff;
    background-color: rgba(117, 193, 236, 0.45);
    border-color: rgba(117, 193, 236, 0.55);
    box-shadow: 0 2px 10px rgba(117, 193, 236, 0.2);
}

.tasks-pagination__nav--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background-color: rgba(40, 40, 40, 0.5);
    border-color: rgba(191, 182, 79, 0.2);
}

.tasks-pagination__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tasks-pagination__item {
    margin: 0;
    padding: 0;
}

.tasks-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 6px 10px;
    font-size: 15px;
    font-weight: 600;
    color: #d9d9d9;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(191, 182, 79, 0.25);
    background-color: rgba(255, 255, 255, 0.04);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tasks-pagination__page:hover {
    color: #ffb548;
    border-color: rgba(255, 181, 72, 0.45);
    box-shadow: 0 0 12px rgba(255, 181, 72, 0.15);
}

.tasks-pagination__page--current {
    color: #ffb548;
    border-color: rgba(255, 181, 72, 0.55);
    background-color: rgba(255, 181, 72, 0.1);
    box-shadow: 0 0 10px rgba(255, 181, 72, 0.18);
    cursor: default;
}

.tasks-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    color: #9a9a9a;
    font-size: 16px;
    letter-spacing: 0.05em;
    user-select: none;
}

@media (max-width: 767.98px) {
    .tasks-pagination {
        margin-bottom: 80px;
        padding-bottom: 16px;
    }

    .tasks-pagination__inner {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 4px 6px;
        padding: 8px 6px;
        max-width: 100%;
    }

    .tasks-pagination__nav {
        flex-shrink: 0;
        min-width: 36px;
        min-height: 36px;
        padding: 4px 6px;
    }

    .tasks-pagination__icon {
        width: 18px;
        height: 18px;
    }

    /* Номера страниц в одной строке; при нехватке места — горизонтальный скролл по центру */
    .tasks-pagination__list {
        flex-wrap: nowrap;
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        justify-content: center;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .tasks-pagination__page {
        min-width: 30px;
        min-height: 32px;
        font-size: 13px;
        padding: 4px 6px;
        flex-shrink: 0;
    }

    .tasks-pagination__ellipsis {
        min-width: 24px;
        font-size: 14px;
    }

    .tasks-pagination__summary {
        font-size: 13px;
        margin-bottom: 12px;
    }
}

/* ===== Admin funnel dashboard (/Admin/Funnel) ===== */
/*
 * Админка обёрнута в `.content ._container` (как Profile). Трюк из §6.5 site.css
 * (`.wrapper .content { left: 0; right: 0; width: 100% }`) уже принудительно
 * растягивает `.content` на всю ширину, поэтому здесь только внутренние отступы.
 * Верхний отступ — 32px (`.content` сам сдвигает контент ниже header-landing,
 * добавочный 32px — воздух между хедером и заголовком дашборда).
 */
.admin-funnel {
    color: #f1f1f1;
    font-family: 'Times New Roman', Times, serif;
    padding: 32px 32px 96px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.admin-funnel__header {
    margin-bottom: 20px;
}

.admin-funnel__title {
    margin: 0 0 6px;
    color: #ffb548;
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-funnel__sub {
    margin: 0;
    font-size: 14px;
    color: #cecece;
    line-height: 1.45;
}

.admin-funnel__sub code,
.admin-funnel__card code,
.admin-funnel__table code {
    font-family: Consolas, Menlo, monospace;
    color: #ffd78a;
    background-color: rgba(255, 181, 72, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.admin-funnel__alert {
    padding: 20px 24px;
    border-radius: 14px;
    margin-top: 12px;
    background-color: rgba(30, 29, 29, 0.72);
    border: 1px solid rgba(191, 182, 79, 0.45);
}

.admin-funnel__alert--warn {
    border-color: rgba(255, 181, 72, 0.65);
    box-shadow: 0 0 18px rgba(255, 181, 72, 0.1);
}

.admin-funnel__alert h2 {
    margin: 0 0 8px;
    color: #ffb548;
    font-size: 20px;
}

.admin-funnel__alert p {
    margin: 6px 0;
    font-size: 14px;
    color: #d9d9d9;
    line-height: 1.5;
}

.admin-funnel__code {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(191, 182, 79, 0.35);
    color: #ffe6b3;
    font-family: Consolas, Menlo, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    margin: 8px 0;
}

.admin-funnel__ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.admin-funnel__range {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #d9d9d9;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(191, 182, 79, 0.35);
    background-color: rgba(30, 29, 29, 0.55);
    transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.admin-funnel__range:hover {
    color: #ffb548;
    border-color: rgba(255, 181, 72, 0.55);
}

.admin-funnel__range--active {
    color: #ffb548;
    border-color: rgba(255, 181, 72, 0.85);
    background-color: rgba(255, 181, 72, 0.1);
    box-shadow: 0 0 10px rgba(255, 181, 72, 0.18);
}

.admin-funnel__kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.admin-funnel__kpi {
    padding: 16px 18px;
    border-radius: 14px;
    background-color: rgba(30, 29, 29, 0.72);
    border: 1px solid rgba(191, 182, 79, 0.25);
    box-shadow: 0 0 10px rgba(206, 206, 206, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-funnel__kpi--accent {
    border-color: rgba(255, 181, 72, 0.55);
    box-shadow: 0 0 18px rgba(255, 181, 72, 0.14);
}

.admin-funnel__kpi--bad {
    border-color: rgba(220, 70, 70, 0.45);
    box-shadow: 0 0 14px rgba(220, 70, 70, 0.12);
}

.admin-funnel__kpi-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #cecece;
    text-transform: uppercase;
}

.admin-funnel__kpi-value {
    font-size: 28px;
    font-weight: bold;
    color: #f1f1f1;
    line-height: 1.1;
}

.admin-funnel__kpi--accent .admin-funnel__kpi-value {
    color: #ffb548;
}

.admin-funnel__kpi--bad .admin-funnel__kpi-value {
    color: #ff8a8a;
}

.admin-funnel__kpi-foot {
    font-size: 12px;
    color: #9a9a9a;
    margin-top: auto;
}

.admin-funnel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.admin-funnel__card {
    padding: 18px 22px;
    background-color: rgba(30, 29, 29, 0.65);
    border: 1px solid rgba(191, 182, 79, 0.25);
    border-radius: 16px;
}

.admin-funnel__card--wide {
    grid-column: 1 / -1;
}

.admin-funnel__card-title {
    margin: 0 0 12px;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffb548;
}

.admin-funnel__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.admin-funnel__table th,
.admin-funnel__table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(191, 182, 79, 0.18);
    vertical-align: top;
}

.admin-funnel__table th {
    color: #cecece;
    font-weight: normal;
    letter-spacing: 0.05em;
    font-size: 12px;
    text-transform: uppercase;
    border-bottom-color: rgba(191, 182, 79, 0.35);
}

.admin-funnel__table tr:last-child td {
    border-bottom: none;
}

.admin-funnel__table a {
    color: #ffd78a;
    text-decoration: none;
}

.admin-funnel__table a:hover {
    color: #ffb548;
    text-decoration: underline;
}

.admin-funnel__num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.admin-funnel__nowrap {
    white-space: nowrap;
    color: #9a9a9a;
    font-size: 12.5px;
    font-family: Consolas, Menlo, monospace;
}

.admin-funnel__table--events td {
    font-size: 12.5px;
}

.admin-funnel__params {
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Consolas, Menlo, monospace;
    color: #a9c8a9;
}

.admin-funnel__empty {
    margin: 0;
    font-size: 14px;
    color: #9a9a9a;
    font-style: italic;
}

@media (max-width: 767.98px) {
    .admin-funnel {
        padding: 12px 14px 64px;
    }
    .admin-funnel__title {
        font-size: 22px;
    }
    .admin-funnel__kpi-value {
        font-size: 24px;
    }
    .admin-funnel__table--events {
        font-size: 11.5px;
    }
    .admin-funnel__params {
        max-width: 180px;
    }
}

/* ===== Scenary upsell (P1.1) ===== */

.scenary-upsell {
    max-width: 900px;
    margin: 60px auto 40px;
    text-align: center;
    padding: 0 16px;
}
.scenary-upsell__title {
    color: #ffb548;
    font-size: 32px;
    margin-bottom: 8px;
}
.scenary-upsell__sub {
    color: #cecece;
    font-size: 16px;
    margin-bottom: 32px;
}
.scenary-upsell__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.scenary-upsell__card {
    display: flex;
    flex-direction: column;
    background: rgba(30, 29, 29, 0.555);
    border: 1px solid rgba(191, 182, 79, 0.293);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}
.scenary-upsell__card:hover {
    transform: translateY(-4px);
    border-color: #ffb548;
}
.scenary-upsell__card:focus-visible {
    outline: 2px solid #ffb548;
    outline-offset: 2px;
}
.scenary-upsell__card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.scenary-upsell__card-img-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.scenary-upsell__card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scenary-upsell__card-title {
    color: #fff;
    font-size: 15px;
    padding: 12px 10px 4px;
    font-weight: 600;
}
.scenary-upsell__card-desc {
    color: #cecece;
    font-size: 13px;
    padding: 2px 10px 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.scenary-upsell__catalog-btn {
    display: inline-block;
    padding: 14px 40px;
    background: rgba(69, 59, 207, 0.651);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}
.scenary-upsell__catalog-btn:hover {
    background: rgba(117, 193, 236, 0.651);
}

@media (max-width: 768px) {
    .scenary-upsell__grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    .scenary-upsell__title {
        font-size: 24px;
    }
}

/* P1.2 — social proof counter */
.one-task-card__social-proof {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ffb548;
    font-size: 14px;
    opacity: 0.85;
    margin-top: 4px;
    margin-bottom: 8px;
}

.one-task-card__social-proof-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tasks-card__people {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffb548;
    font-size: 13px;
    opacity: 0.8;
    margin-top: 6px;
}

.tasks-card__people-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ===== P1.3 Sale pricing ===== */

.one-task-card__price-old {
    text-decoration: line-through;
    opacity: 0.6;
    color: #cecece;
    font-size: 16px;
}

.one-task-card__price--sale {
    color: #ffb548;
    font-weight: 700;
}

.one-task-card__price-deadline {
    color: #ffb548;
    font-size: 14px;
    margin-top: 4px;
}

.one-task-card__price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.one-task-card__loyalty-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #7ee0ff;
    letter-spacing: 0.02em;
}

/* ===== Upsell card pricing ===== */

.scenary-upsell__card-price {
    padding: 4px 10px 12px;
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scenary-upsell__card-price-old {
    text-decoration: line-through;
    color: rgba(206, 206, 206, 0.5);
    font-size: 13px;
}

.scenary-upsell__card-price-new {
    color: #ffb548;
    font-weight: 700;
    font-size: 16px;
}

/* ===== Upsell card: expanded (inline preview) ===== */

.scenary-upsell__card--expanded {
    grid-column: 1 / -1;
    transform: none;
    border-color: #ffb548;
}
.scenary-upsell__card--expanded:hover {
    transform: none;
}
.scenary-upsell__card-desc-full {
    color: #d9d9d9;
    font-size: 14px;
    padding: 4px 16px 12px;
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap;
}
.scenary-upsell__card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 16px 18px;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}
.scenary-upsell__buy-btn {
    display: inline-block;
    padding: 12px 26px;
    background: rgba(69, 59, 207, 0.651);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.scenary-upsell__buy-btn:hover {
    background: rgba(117, 193, 236, 0.651);
}
.scenary-upsell__collapse-btn {
    display: inline-block;
    padding: 11px 20px;
    background: transparent;
    color: #cecece;
    border: 1px solid rgba(206, 206, 206, 0.3);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    font-family: inherit;
}
.scenary-upsell__collapse-btn:hover {
    border-color: #ffb548;
    color: #ffb548;
}

@media (min-width: 768px) {
    .scenary-upsell__card--expanded {
        flex-direction: row;
        align-items: stretch;
        max-width: 820px;
        margin: 0 auto;
    }
    .scenary-upsell__card--expanded .scenary-upsell__card-img-wrap {
        width: 40%;
        flex-shrink: 0;
        aspect-ratio: 3 / 4;
        max-height: 420px;
    }
    .scenary-upsell__card--expanded .scenary-upsell__card-body {
        padding: 6px 4px;
    }
    .scenary-upsell__card--expanded .scenary-upsell__card-actions {
        justify-content: flex-start;
    }
}

/* Стили кнопки Stars: #src/scss/one-task.scss — .one-task-card__payment-button--stars */

/* ===== Страница сцены задания (/Task/Index, Scenary.razor) ===== */
/*
 * Базовые стили сцены живут в #src/scss/scene.scss -> style.min.css.
 * Правки ниже — в site.css по той же схеме, что и остальные фиксы:
 * gulp-сборка не запускается, поэтому перебиваем style.min.css
 * селекторами повышенной специфичности (.scene .scene__*, .content .content__scene).
 */

/* Кнопки сцены: мгновенный отклик на тап.
 * touch-action: manipulation убирает задержку двойного тапа на мобильных,
 * :active даёт видимый отклик сразу, не дожидаясь ответа сервера по SignalR. */
.scene .scene__button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.scene .scene__button:active {
    background-color: rgba(241, 124, 124, 0.45);
    transform: scale(0.98);
}

@media (max-width: 767.98px) {
    /*
     * Хедер (бургер + виджет входа через Telegram) — position: absolute поверх контента,
     * высотой ~74px, а рамка сцены на мобильных начиналась с 15px и залезала под него.
     * Опускаем сцену ниже хедера.
     */
    .content .content__scene {
        margin-top: 70px;
        margin-bottom: 16px;
        /* Внутренний скролл в рамке (95vh + overflow-y) убираем: на мобильных
         * страница скроллится целиком внешним .content — один скролл вместо вложенных. */
        max-height: none;
        overflow-y: visible;
    }

    /* Дети рамки были шириной 90vw/100vw и на узких экранах вылезали за рамку.
     * Привязываем их к ширине рамки. */
    .scene .scene__img-scene,
    .scene .scene__content-container,
    .scene .scene__buttons {
        width: 100%;
    }

    /* Фото/видео — верхняя половина экрана; style.min.css ограничивал
     * ширину 35vw даже на мобильных, из-за чего картинка была мелкой. */
    .scene .scene__img {
        width: 100%;
        max-width: 100%;
        height: 50vh;
        max-height: 50vh;
        object-fit: contain;
        background-color: rgba(0, 0, 0, 0.35);
        border-radius: 12px;
    }

    /* Таймер по центру под фото */
    .scene .scene__timer-main {
        justify-content: center;
        margin-top: 10px;
    }

    .scene .scene__timer,
    .scene .scene__done-timer {
        align-self: center;
        margin-bottom: 10px;
    }

    /* Текст читается целиком, без собственного скроллбара */
    .scene .scene__text {
        width: 100%;
        overflow-y: visible;
        line-height: 1.6;
    }

    /* Крупные кнопки на всю ширину — удобная зона тапа */
    .scene .scene__button {
        width: 100%;
        padding: 12px 10px;
        font-size: 18px;
    }
}
