﻿.donate-page {
    background: var(--dark);
}

.donate-page :where(
    h1, h2, h3, h4, h5, h6,
    p, a, span, strong, small, em, li, label,
    button, input, textarea, select, option
) {
    font-family: var(--font-body) !important;
}

.donate-page.is-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.donate-page .primary-nav__link[aria-current="page"] {
    color: #fff;
}

.donate-page .primary-nav__link[aria-current="page"]::after {
    transform: translateX(-50%) scaleX(1);
}

.donate-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(900px, 55vw, 1060px);
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 26%, rgba(255, 160, 54, 0.27) 0%, rgba(255, 160, 54, 0) 30%),
        linear-gradient(112deg, #d93618 0%, #ea4f19 46%, #f47720 100%);
}

.donate-hero::after {
    content: "";
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: -1px;
    left: 0;
    height: clamp(210px, 18vw, 345px);
    background: linear-gradient(180deg, rgba(8, 8, 9, 0) 0%, rgba(8, 8, 9, 0.14) 20%, rgba(8, 8, 9, 0.82) 82%, #0a0a0b 100%);
    pointer-events: none;
}

/*
 * Знак живёт внутри .donate-hero__art-inner — центрированного блока
 * шириной max 1920px, ровно как .hero__watermark на главной.
 *
 * Раньше он лежал прямо в .donate-hero (во всю ширину экрана), поэтому
 * отступ слева отсчитывался от края монитора: на 3840px знак оказывался
 * почти в километре от контента и «улетал влево».
 *
 * Плюс у самого блока стоял только top: 0 без размеров — абсолютный
 * элемент без width/height схлопывается в 0x0, и знак висел на краю точки.
 */
.donate-hero__watermark {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/*
 * Размер задаётся высотой контейнера, а не жёсткими 1200px.
 *
 * Прежний вариант ломался с двух сторон: секция высотой максимум 1060px
 * (clamp(900px, 55vw, 1060px)) обрезала знак снизу на 140-300px ровной
 * линией, а фиксированная ширина не реагировала на масштаб — при
 * отдалении знак оставался пятном в углу.
 *
 * top + bottom растягивают элемент по секции, aspect-ratio подтягивает
 * ширину следом. Так знак всегда ровно по высоте страницы.
 */
.donate-hero__watermark::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;

    /*
     * Пропорции ровно как у самого файла (853x1080).
     *
     * С aspect-ratio: 1 элемент был квадратным, а картинка — нет.
     * background-size: contain вписывал её по высоте и центрировал
     * по горизонтали, оставляя по 10.5% пустоты с каждой стороны:
     * 111px на десктопе и 79px на мобильном. Это и читалось как отступ
     * от левого края, а на узком экране — будто знак стоит по центру.
     *
     * Теперь коробка совпадает с картинкой, и left: 0 действительно
     * прижимает её к краю.
     */
    aspect-ratio: 853 / 1080;
    background: url("../images/brand/dragon-watermark.svg") center / contain no-repeat;
    filter: brightness(0) invert(1);
    opacity: 0.24;

    /* Страховка на случай, если контент растянет секцию выше расчётной. */
    -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 22%);
    mask-image: linear-gradient(to top, transparent 0%, #000 22%);
}

.donate-hero__art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/*
 * Карта на оранжевом — тот же приём, что и .hero__map на главной.
 *
 * soft-light вместо простой прозрачности: карта подмешивается в градиент,
 * а не ложится поверх серым пятном.
 *
 * Лежит в .donate-hero__art, а не в art-inner: тому ширина ограничена
 * 1920px, и на широких экранах текстура обрывалась бы по краям.
 * Стекающий контекст создаёт .donate-hero (isolation: isolate),
 * поэтому смешивание идёт именно с фоновым градиентом секции.
 */
.donate-hero__map {
    --donate-map-opacity: 0.12;

    position: absolute;
    inset: 0;
    z-index: 0;

    background: url("../images/home/map2.webp") center / cover no-repeat;

    opacity: var(--donate-map-opacity);
    mix-blend-mode: soft-light;

    pointer-events: none;
}

/* Safari до 15.4 игнорирует soft-light и рисует картинку как есть. */
@supports not (mix-blend-mode: soft-light) {
    .donate-hero__map {
        --donate-map-opacity: 0.06;
    }
}

.donate-hero__art-inner {
    position: relative;
    width: min(100%, var(--page-max));
    height: 100%;
    margin-inline: auto;
}

/*
 * z-index 7, а не 1.
 *
 * У .donate-hero::after (затемнение к чёрному внизу секции) стоит z-index 3,
 * у сундука — 6. С прежней единицей форма оказывалась ПОД обоими: на
 * планшетах нижние 35-37px формы — соглашение и кнопка «Пополнить» —
 * уходили под тёмный градиент и выглядели пригашенными.
 *
 * На главной странице тот же слой сделан правильно: .hero__inner
 * имеет z-index 6 против z-index 4 у .hero::after.
 */
.donate-hero__inner {
    position: relative;
    z-index: 7;
    display: grid;
    min-height: inherit;
    place-items: start center;
    padding-top: clamp(190px, 11vw, 220px);
    padding-bottom: 175px;
}

.donate-form {
    position: relative;
    isolation: isolate;
    z-index: 1;
    width: min(100%, 515px);
    padding: 36px 42px 43px;
    overflow: hidden;
    border: 1px solid rgba(238, 103, 31, 0.34);
    border-radius: 18px;
    background:
        radial-gradient(circle at 48% -12%, rgba(235, 92, 31, 0.18) 0%, rgba(235, 92, 31, 0) 42%),
        linear-gradient(180deg, rgba(50, 24, 16, 0.96), rgba(22, 17, 15, 0.98));
    box-shadow: 0 30px 70px rgba(40, 11, 3, 0.24);
}

.donate-form::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: url("../images/brand/footer-dragon-glow.svg") center -25px / 560px auto no-repeat;
    opacity: 0.12;
    pointer-events: none;
}

.donate-form__title {
    margin: 0 0 50px;
    background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.98) 46%, rgba(255,255,255,0.72) 67%, rgba(255,255,255,0.36) 94%, rgba(255, 255, 255, 0.12) 100%);
    font-family: var(--font-body);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 50px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: uppercase;
}

.donate-fieldset + .donate-fieldset {
    margin-top: 25px;
}

.donate-label {
    display: block;
    margin-bottom: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.98) 46%, rgba(255,255,255,0.72) 67%, rgba(255,255,255,0.36) 94%, rgba(255, 255, 255, 0.12) 100%);
    font-family: var(--font-body);
    font-weight: 700;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0.035em;
    text-align: center;
    text-transform: uppercase;
}

.donate-input-wrap {
    position: relative;
    display: flex;
    min-height: 64px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 8px;
    background: rgba(72, 44, 34, 0.42);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.donate-input-wrap:focus-within {
    border-color: rgba(239, 118, 30, 0.7);
    box-shadow: 0 0 0 2px rgba(239, 118, 30, 0.1);
    background: rgba(77, 45, 33, 0.54);
}

.donate-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 20px;
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    text-align: center;
}

.donate-input::placeholder {
    color: rgba(255, 255, 255, 0.34);
    opacity: 1;
}

.donate-help {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.64);
    background: rgba(255, 255, 255, 0.05);
    font: 600 19px/1 var(--font-body);
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.donate-help:hover,
.donate-help:focus-visible,
.donate-help[aria-expanded="true"] {
    border-color: #ef761e;
    color: #ff9d3e;
    background: rgba(239, 118, 30, 0.08);
    box-shadow: 0 0 0 2px rgba(239, 118, 30, 0.12), 0 0 18px rgba(239, 118, 30, 0.12);
}

/* Статус проверки аккаунта под полем логина */
.donate-field-status {
    display: flex;
    align-items: center;
    gap: 7px;

    margin: 9px 0 0;

    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.donate-field-status[hidden] {
    display: none;
}

.donate-field-status::before {
    content: "";

    flex: 0 0 auto;

    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: currentColor;
}

.donate-field-status[data-state="checking"] {
    color: rgba(255, 255, 255, 0.5);
}

.donate-field-status[data-state="found"] {
    color: #5fcf7d;
}

.donate-field-status[data-state="missing"] {
    color: #ff6b57;
}

/* Блок капчи. Виджет reCAPTCHA — 304px фиксированной ширины,
   отзывчивости в нём нет, поэтому на узких экранах ужимаем масштабом. */
.donate-captcha {
    margin-top: 22px;
}

.donate-captcha[hidden] {
    display: none;
}

.donate-captcha__widget {
    display: flex;
    justify-content: center;
}

.donate-captcha .donate-field-status {
    justify-content: center;
}

@media (max-width: 400px) {
    .donate-captcha__widget {
        transform: scale(0.9);
        transform-origin: center top;
    }
}

/* Итог возврата со страницы оплаты */
.donate-form__result {
    margin: 0 0 26px;
    padding: 14px 16px;

    border: 1px solid rgba(239, 118, 30, 0.3);
    border-radius: 9px;

    color: rgba(255, 255, 255, 0.82);
    background: rgba(239, 118, 30, 0.08);

    font-family: var(--font-body);
    font-size: 14px;
    /*
     * 400, а не 500: начертания Medium у Akrobat в проекте нет,
     * подключены 200/300/400/600/700/800/900. Браузер всё равно
     * подставлял Regular — теперь это написано явно.
     */
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
}

.donate-form__result[hidden] {
    display: none;
}

.donate-input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.donate-input[type="number"]::-webkit-outer-spin-button,
.donate-input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

/* display:flex ниже перебил бы встроенное [hidden] { display: none } */
.donate-amount-control[hidden] {
    display: none;
}

.donate-amount-control {
    position: absolute;
    top: 50%;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(180deg, #f8913b, #e65822);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), 0 7px 16px rgba(108, 32, 7, 0.16);
    transform: translateY(-50%);
}

.donate-currency {
    display: grid;
    place-items: center;
    padding-left: 0;
    font: 600 16px/1 var(--font-body);
    pointer-events: none;
    user-select: none;
}


.donate-form__agreement {
    margin: 32px 0 26px;
    color: #959595;
    font-size: 17px;
    font-family: var(--font-body);
    font-weight: 600;
    text-align: center;
}

.donate-form__agreement a:hover,
.donate-form__agreement a:focus-visible {
    color: #ff9639;
}

.donate-submit,
.account-help-modal__close {
    position: relative;
    /*
     * Свой стекающий контекст: дракон ниже лежит на z-index -1, чтобы
     * оказаться НАД заливкой, но ПОД подписью. Без изоляции такой слой
     * ушёл бы за фон родителя и пропал.
     */
    isolation: isolate;
    width: 100%;
    min-height: 64px;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    color: #fff;

    /*
     * Верхний блик отдельным слоем поверх заливки: свет падает сверху,
     * как на всей странице. Одним градиентом это не собрать — блик должен
     * гаснуть быстрее, чем сама заливка меняет тон.
     */
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.06) 34%, rgba(255, 255, 255, 0) 62%),
        linear-gradient(180deg, #ff8f3d 0%, #ed5b21 100%);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 10px 24px rgba(131, 44, 9, 0.22);

    font-family: var(--font-body);
    font-weight: 400;
    font-size: 19px;
    cursor: pointer;
    transition: filter 180ms ease, transform 180ms var(--ease);
}

/* Дракон уходит за левый край и подрезается по границе кнопки. */
.donate-submit::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    /*
     * Разнесено в отдельные свойства: в сокращённой записи вертикальная
     * позиция терялась среди трёхзначного синтаксиса background-position.
     */
    background-image: url("../images/brand/footer-dragon.svg");
    background-repeat: no-repeat;
    /*
     * Было «-10px -5px center» — три значения, из которых первое не
     * ключевое слово. Такая запись невалидна, браузер отбрасывал всё
     * свойство целиком и брал начальное значение 0% 0%: дракон вставал
     * в левый ВЕРХНИЙ угол кнопки вместо вертикального центра.
     * Ошибка молчаливая — в консоли ничего, только «съехало».
     */
    background-size: auto 175%;
    opacity: 0.6;
    pointer-events: none;
}

.fast-donate {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.fast-donate__button {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 58px;
    padding: 10px 8px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.82);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
        rgba(72, 44, 34, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.fast-donate__button:hover,
.fast-donate__button:focus-visible {
    border-color: rgba(239, 118, 30, 0.65);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(239, 118, 30, 0.11), rgba(239, 118, 30, 0.035)),
        rgba(79, 43, 31, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 2px rgba(239, 118, 30, 0.08),
        0 8px 20px rgba(76, 24, 5, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.fast-donate__button:active {
    transform: translateY(0) scale(0.985);
}

.fast-donate__button.is-selected {
    border-color: rgba(255, 143, 61, 0.9);
    color: #fff;
    background: linear-gradient(180deg, #f88a3a 0%, #e95c22 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 8px 22px rgba(126, 39, 8, 0.28),
        0 0 0 2px rgba(239, 118, 30, 0.08);
}

.fast-donate__button--popular:not(.is-selected) {
    border-color: rgba(240, 173, 35, 0.52);
    color: #ffc05d;
    background:
        linear-gradient(180deg, rgba(240, 173, 35, 0.08), rgba(240, 173, 35, 0.018)),
        rgba(77, 48, 27, 0.5);
}

.fast-donate__value {
    font: inherit;
    color: inherit;
}

.fast-donate__badge {
    position: absolute;
    top: -8px;
    left: 50%;
    padding: 3px 7px 2px;
    border: 1px solid rgba(240, 173, 35, 0.4);
    border-radius: 999px;
    color: #f0ad23;
    background: #2a1a12;
    /* 8px на телефоне уже нечитаемо — это подпись, а не декор. */
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transform: translateX(-50%);
}

.fast-donate__button.is-selected .fast-donate__badge {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.92);
    background: #a53f13;
}

.donate-submit:disabled {
    filter: grayscale(0.55);
    opacity: 0.55;
    cursor: not-allowed;
}

.donate-submit:disabled:hover {
    filter: grayscale(0.55);
    transform: none;
}

.donate-submit:hover,
.donate-submit:focus-visible,
.account-help-modal__close:hover,
.account-help-modal__close:focus-visible {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.donate-decor {
    position: absolute;
    display: block;
    max-width: none;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

/*
 * Тень для предметного декора в hero.
 *
 * drop-shadow, а не box-shadow: он строится по альфа-каналу и повторяет
 * силуэт сундука и монет, тогда как box-shadow нарисовал бы прямоугольник
 * вокруг картинки.
 *
 * Две тени: плотная короткая «сажает» предмет на плоскость, широкая мягкая
 * даёт объём. Одной такого не получить — либо грязь, либо предмет висит.
 *
 * Правило намеренно перечисляет модификаторы, а не задано на .donate-decor:
 * у --dragon уже стоит свой filter с blur, и общее правило его затёрло бы.
 */
.donate-decor--coin-left,
.donate-decor--coin-right,
.donate-decor--chest {
    filter:
        drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45))
        drop-shadow(0 22px 34px rgba(0, 0, 0, 0.38));
}

.donate-decor--coin-left {
    top: 44%;
    left: clamp(18px, 3vw, 66px);
    width: clamp(120px, 10vw, 185px);
    transform: translateY(-50%) rotate(-7deg);
}

.donate-decor--coin-right {
    top: 17%;
    right: clamp(26px, 4.5vw, 84px);
    width: clamp(160px, 14vw, 270px);
    transform: rotate(8deg);
}

.donate-decor--chest {
    z-index: 6;
    bottom: 0;
    width: 600px;
}

.donate-decor--dragon {
    z-index: 2;
    right: clamp(-96px, -4vw, -28px);
    bottom: -18px;
    width: clamp(440px, 38vw, 660px);
    aspect-ratio: 1470 / 429;
    background: url("../images/brand/dragon-banner.webp") center / contain no-repeat;
    filter: blur(7px) saturate(1.08);
    opacity: 0.48;
    transform: rotate(-11deg);
    transform-origin: 78% 64%;
}

.donate-hero__socials {
    top: 49%;
    transform: translate(-50%, -48%);
}

.donate-surface {
    position: relative;
    overflow: hidden;
}

.donate-surface::before {
    opacity: 0.02;
}

.donate-catalog__coin {
    position: absolute;
    z-index: 0;
    display: block;
    width: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;

    /*
     * Градиентной тени в CSS нет, но её даёт стопка drop-shadow: каждая
     * следующая накладывается на результат предыдущей, поэтому порядок
     * определяет переход цвета.
     *
     * Тёмная -> плотное жёлтое ядро у самой монеты -> широкий оранжевый
     * разлёт вокруг него. Получается затухание от жёлтого к оранжевому,
     * а не два отдельных ореола.
     *
     * Поменять местами жёлтую и оранжевую — и жёлтый обведёт оранжевый
     * ровным кольцом вместо свечения.
     */
    filter:
        drop-shadow(0 10px 16px rgba(58, 20, 2, 0.42))
        drop-shadow(0 0 16px rgba(255, 206, 92, 0.55))
        drop-shadow(0 0 48px rgba(239, 118, 30, 0.45));
}

.donate-catalog__coin--left {
    top: 40px;
    left: -188px;
    width: 332px;
    transform: rotate(-14deg);
}

.donate-catalog__coin--right {
    top: 318px;
    right: -122px;
    width: 188px;
    transform: rotate(12deg);
}

.donate-catalog__heading,
.donate-services,
.vip-section,
.vip-grid {
    position: relative;
    z-index: 1;
}

.donate-catalog {
    position: relative;
    isolation: isolate;
    padding-top: 84px;
    padding-bottom: 72px;
}

.donate-catalog__heading {
    display: flex;
    align-items: flex-end;
    gap: 56px;
    margin-bottom: 55px;
}

.donate-catalog__heading h2 {
    margin: 0;
    font-family: var(--font-body);
    font-size: 45px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.donate-catalog__heading h2 span {
    color: #ef761e;
}


.donate-catalog__heading p {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 19px;
    font-weight: 400;
    font-family: var(--font-body);
}

.donate-services,
.vip-section {
    position: relative;
}

.donate-kicker {
    position: relative;
    margin: 0 0 30px;
    color: #ef761e;
    font: 400 18px/1 var(--font-body);
    letter-spacing: 0.55em;
    text-align: right;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .donate-kicker::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 310px;
        height: 2px;
        background: linear-gradient(90deg, rgba(239, 118, 30, 0.78), rgba(239, 118, 30, 0));
        transform: translateY(-50%);
    }
}

.donate-services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 34px;
}

.service-card::before {
    content: "";
    position: absolute;
    top: -65px;
    left: 50%;
    transform: translateX(-50%);
    width: 125%;
    height: 150px;
    background: radial-gradient(
        ellipse at top center,
        rgba(255, 145, 54, 0.38) 0%,
        rgba(255, 120, 32, 0.3) 30%,
        rgba(255, 110, 25, 0.2) 46%,
        rgba(255, 110, 25, 0) 72%
    );
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
}

.service-card {
    position: relative;
    display: grid;
    /*
     * Колонка иконки сжимается вместе с шириной окна: на фиксированных
     * 122px в трёхколоночной сетке тексту оставалось меньше 160px.
     */
    grid-template-columns: clamp(76px, 8.2vw, 122px) minmax(0, 1fr);
    min-height: 168px;
    gap: 18px;
    align-items: center;
    padding: 22px 24px 20px;
    overflow: hidden;
    border: 1px solid rgba(224, 103, 33, 0.2);
    border-radius: 9px;
    background-color: #3a1e0f;
    isolation: isolate;
}

.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    left: -350px;
    background: url("../images/brand/footer-dragon.svg") center / 200px auto no-repeat;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.service-card__icon,
.service-card__body {
    position: relative;
    z-index: 1;
}

.service-card__icon {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 114px;
    aspect-ratio: 114 / 130;
    padding: 7px;
    border-radius: 8px;
    color: #ef761e;
    background: rgba(179, 74, 24, 0.18);
    box-shadow: inset 0 1px rgba(255,255,255,0.03);
}

/*
 * Без этого правила размер иконки задавали только атрибуты width/height
 * (52x52), и картинка не зависела от размера контейнера. У серверных PNG
 * вокруг глифа ещё и прозрачные поля, поэтому они выглядели заметно мельче
 * локальных SVG. Теперь иконка тянется по блоку, а object-fit не даёт
 * исказить пропорции при любом исходном размере файла.
 */
.service-card__icon img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}


.service-card__body h4 {
    margin: 0 0 7px;
    /*
     * Без переноса длинные слова («ЗАКОНОПОСЛУШНОСТЬ») не влезали в узкую
     * колонку и обрезались по overflow: hidden карточки — пропадали буквы.
     */
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, 0.88);
    /*
     * Размер плавающий: между 1120 и 1400px карточки идут в три колонки,
     * и на 26px заголовок переставал помещаться.
     */
    font-size: clamp(18px, 1.55vw, 26px);
    font-style: normal;
    font-family: var(--font-body);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.service-card__body h4 em {
    color: #ef761e;
    font-style: normal;
    font-family: var(--font-body);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.service-card__body p {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1;
    margin-top: 15px;
    font-size: 16px;
}

.service-card__body > strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 25px;
}

.service-card__body > strong img,
.vip-prices strong img {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(239, 118, 30, 0.25));
}

.vip-section {
    margin-top: 54px;
    padding-top: 44px;
}

.vip-section::before {
    content: none;
}

.donate-kicker--vip {
    color: #ef761e;
}

.donate-kicker--vip span {
    color: rgba(255, 255, 255, 0.72);
}

.vip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.vip-card {
    --vip-accent: #ef761e;
    --vip-accent-rgb: 239, 118, 30;
    --vip-surface-start: rgba(44, 29, 23, 0.98);
    --vip-surface-end: rgba(16, 16, 18, 0.98);
    --vip-item-surface: rgba(255, 255, 255, 0.03);
    --vip-scroll-thumb: #ef761e;
    --vip-scroll-track: rgba(255, 255, 255, 0.08);
    position: relative;
    min-width: 0;
    min-height: 698px;
    padding: 28px 30px 24px;
    overflow: hidden;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 12%),
        linear-gradient(135deg, var(--vip-surface-start) 0%, var(--vip-surface-end) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 38px rgba(0, 0, 0, 0.18);
}

.vip-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--vip-accent-rgb), 0.9) 0%, rgba(var(--vip-accent-rgb), 0.58) 18%, rgba(var(--vip-accent-rgb), 0.22) 38%, rgba(var(--vip-accent-rgb), 0.08) 58%, rgba(255, 255, 255, 0.08) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.vip-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(var(--vip-accent-rgb), 0.2) 0%, rgba(var(--vip-accent-rgb), 0) 32%),
        url("../images/brand/Drago-large.svg") center 1% / 70% auto no-repeat;
    opacity: 0.13;
    pointer-events: none;
}

.vip-card > * {
    position: relative;
    z-index: 1;
}

.vip-card--bronze {
    --vip-accent: #ef7a29;
    --vip-accent-rgb: 239, 122, 41;
    --vip-surface-start: rgba(88, 49, 28, 0.98);
    --vip-surface-end: rgba(21, 18, 18, 0.98);
    --vip-item-surface: rgba(56, 28, 18, 0.32);
    --vip-scroll-thumb: #d68343;
}

.vip-card--silver {
    --vip-accent: #dadada;
    --vip-accent-rgb: 218, 218, 218;
    --vip-surface-start: rgba(54, 56, 62, 0.98);
    --vip-surface-end: rgba(16, 18, 23, 0.98);
    --vip-item-surface: rgba(255, 255, 255, 0.03);
    --vip-scroll-thumb: #babdc3;
}

.vip-card--gold {
    --vip-accent: #f0ad23;
    --vip-accent-rgb: 240, 173, 35;
    --vip-surface-start: rgba(96, 70, 13, 0.98);
    --vip-surface-end: rgba(23, 19, 14, 0.98);
    --vip-item-surface: rgba(59, 42, 12, 0.3);
    --vip-scroll-thumb: #d8aa29;
}

.vip-card h4 {
    margin: 0 0 24px;
    color: rgba(255,255,255,0.92);
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.vip-card h4 span {
    color: var(--vip-accent);
}

.vip-card__features {
    display: grid;
    height: 430px;
    margin: 0;
    padding: 0 14px 0 0;
    align-content: start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--vip-scroll-thumb) var(--vip-scroll-track);
}

.vip-card__features::-webkit-scrollbar {
    width: 4px;
}

.vip-card__features::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--vip-scroll-track);
}

.vip-card__features::-webkit-scrollbar-thumb {
    min-height: 42px;
    border-radius: 999px;
    background: var(--vip-scroll-thumb);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
}

.vip-card__features:focus-visible {
    outline: 1px solid var(--vip-accent);
    outline-offset: 4px;
}

.vip-card li {
    display: flex;
    min-height: 54px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    color: rgba(255,255,255,0.78);
    background: var(--vip-item-surface);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
}

.vip-prices {
    --vip-price-padding: 14px;
    position: absolute;
    right: 30px;
    bottom: 22px;
    left: 30px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    text-align: center;
}

.vip-prices > div {
    position: relative;
    min-width: 0;
    padding-inline: var(--vip-price-padding);
}

.vip-prices > div:first-child {
    padding-left: 0;
}

.vip-prices > div:last-child {
    padding-right: 0;
}

.vip-prices > div + div::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 2px;
    left: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.vip-prices small {
    display: block;
    margin-bottom: 9px;
    color: var(--vip-accent);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vip-prices strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.donate-footer {
    padding-top: 25px;
}

.account-help-modal[hidden] {
    display: none;
}

.account-help-modal {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 42px;
}

.account-help-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(13, 8, 6, 0.12);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    cursor: default;
}

.account-help-modal__dialog {
    position: relative;
    isolation: isolate;
    width: min(100%, 740px);
    /*
     * Порядок важен: vh первым, dvh — как уточнение.
     * Safari до 15.4 не знает dvh и отбрасывает такую строку целиком.
     * Раньше здесь был только dvh, и в этих версиях модалка оставалась
     * вообще без max-height: длинное окно «Где узнать логин» вырастало
     * за экран, а прокрутки внутри него не появлялось — до кнопки
     * «Закрыть» было не добраться.
     */
    max-height: calc(100vh - 52px);
    max-height: calc(100dvh - 52px);
    overflow: auto;
    padding: 44px 45px 42px;
    border: 1px solid rgba(236, 103, 32, 0.38);
    border-radius: 23px;
    background:
        radial-gradient(circle at 55% 10%, rgba(223, 74, 23, 0.16) 0%, rgba(223, 74, 23, 0) 36%),
        linear-gradient(180deg, rgba(60, 28, 19, 0.99), rgba(25, 18, 15, 0.99));
    box-shadow: 0 30px 80px rgba(31, 9, 2, 0.38);
    scrollbar-width: thin;
    scrollbar-color: rgba(239,118,30,0.55) transparent;
}

.account-help-modal__dialog::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: url("../images/brand/footer-dragon-glow.svg") center / 760px auto no-repeat;
    opacity: 0.1;
    pointer-events: none;
}

.account-help-modal__x {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.account-help-modal__x::before,
.account-help-modal__x::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

.account-help-modal__x::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.account-help-modal__x::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.account-help-modal__dialog h2 {
    margin: 0 45px 17px 0;
    color: rgba(255,255,255,0.88);
    font-family: var(--font-body);
    font-weight: 900;
    font-size: 29px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.account-help-modal__intro,
.account-help-modal__copy {
    color: rgba(255,255,255,0.76);
    font: 300 15px/1.5 var(--font-body);
}

.account-help-modal__intro {
    margin: 0 0 22px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
}

.account-help-modal__copy {
    margin: 22px 0;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
}

.account-help-modal__copy strong {
    color: #f07b25;
    font-weight: 600;
}

.account-help-modal__shot {
    width: 100%;
    max-height: 330px;
    border-radius: 18px;
    object-fit: cover;
}

.account-help-modal__close {
    margin-top: 26px;
}

@media (max-width: 1400px) {
    .donate-hero {
        min-height: 880px;
    }

    .donate-form {
        width: min(100%, 470px);
        padding-inline: 36px;
    }

    .donate-decor--coin-left {
        left: 18px;
    }

    .donate-decor--coin-right {
        right: 28px;
        width: 230px;
    }

    .donate-decor--chest {
        left: 48px;
        bottom: 0;
        width: 400px;
    }

    .donate-decor--dragon {
        right: -64px;
        bottom: -8px;
        width: 600px;
    }

    .service-card {
        padding-inline: 18px;
    }



    .vip-card {
        padding-inline: 25px;
    }

    .vip-prices {
        right: 25px;
        left: 25px;
    }
}

/*
 * Узкая полоса 1121-1260px: VIP-карточки ещё в три колонки, но ячейка
 * цены сжимается примерно до 64px, а «1 299» с монетой при шрифте 28px
 * требует около 84px. Цифры упирались в соседнюю ячейку и подрезались
 * по overflow: hidden карточки.
 *
 * Блок стоит ДО правил 1120px намеренно: ниже 1120 действуют свои,
 * более компактные значения, и они должны победить.
 */
@media (max-width: 1260px) {
    .vip-prices {
        --vip-price-padding: 8px;
    }

    .vip-prices strong {
        gap: 5px;
        font-size: 20px;
    }

    .vip-prices small {
        font-size: 16px;
    }
}

@media (max-width: 1120px) {
    .donate-hero {
        min-height: 830px;
    }

    .donate-hero__inner {
        padding-top: 150px;
    }

    .donate-decor--coin-left {
        left: 12px;
        width: 120px;
    }

    .donate-decor--coin-right {
        right: 18px;
        width: 192px;
    }

    .donate-decor--chest {
        left: 22px;
        bottom: 0;
        width: 330px;
    }

    .donate-decor--dragon {
        right: -74px;
        bottom: -8px;
        width: 500px;
    }

    .donate-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vip-grid {
        gap: 14px;
    }

    .vip-card {
        min-height: 680px;
        padding: 26px 18px 22px;
    }

    .vip-card__features {
        height: 410px;
    }

    .vip-prices {
        --vip-price-padding: 8px;
        right: 18px;
        left: 18px;
        gap: 0;
    }

    .vip-prices strong {
        gap: 5px;
        font-size: 18px;
    }
}

@media (max-width: 900px) {
    .donate-page .primary-nav__link[aria-current="page"]::after {
        display: none;
    }

    .donate-hero__socials {
        display: none;
    }

    .donate-hero {
        min-height: 830px;
    }

    .donate-decor--coin-left {
        left: 0;
        top: 46%;
        width: 110px;
    }

    .donate-decor--coin-right {
        right: 0;
        top: 18%;
        width: 176px;
    }

    .donate-decor--chest {
        left: 0;
        bottom: 0;
        width: 292px;
    }

    .donate-decor--dragon {
        right: -74px;
        bottom: -2px;
        width: 450px;
    }

    .vip-grid {
        grid-template-columns: 1fr;
        max-width: 660px;
        margin-inline: auto;
        gap: 22px;
    }

    .vip-card {
        min-height: 650px;
    }

    .vip-card__features {
        height: 385px;
    }
}

@media (max-width: 767px) {
    .donate-hero {
        min-height: 690px;
    }

    .donate-hero::after {
        height: 155px;
    }

    .donate-hero__watermark::before {
        top: -65px;
    }

    .donate-hero__inner {
        padding-top: 102px;
        padding-bottom: 150px;
    }

    .donate-form {
        width: min(100%, 360px);
        padding: 25px 18px 25px;
        border-radius: 15px;
    }

    .donate-form__title {
        margin-bottom: 22px;
        font-size: 22px;
    }

    .donate-fieldset + .donate-fieldset {
        margin-top: 18px;
    }

    .donate-label {
        margin-bottom: 8px;
        font-size: 12px;
    }

    .donate-input-wrap {
        min-height: 52px;
        border-radius: 6px;
    }

    .donate-input {
        padding-inline: 13px;
        /* Ровно 16px: ниже этого значения iOS Safari зумит viewport при фокусе. */
        font-size: 16px;
    }


    .donate-amount-control {
        right: 6px;
        width: 35px;
        height: 35px;
        border-radius: 5px;
    }

    .donate-help {
        right: 4px;
        width: 44px;
        height: 44px;
        border-radius: 6px;
    }

    .donate-help,
    .donate-currency {
        font-size: 14px;
    }


    .fast-donate {
        gap: 7px;
        margin-top: 18px;
    }

    .fast-donate__button {
        min-height: 45px;
        padding: 7px 4px;
        border-radius: 7px;
        font-size: 13px;
    }

    .fast-donate__badge {
        padding: 2px 5px 1px;
        font-size: 9px;
    }

    .donate-form__agreement {
        margin: 20px 0 17px;
        font-size: 11px;
    }

    .donate-submit {
        min-height: 49px;
        font-size: 12px;
    }

    .donate-hero__art-inner {
        width: min(100%, 620px);
    }

    .donate-decor--coin-left {
        top: 55%;
        left: 2px;
        width: 72px;
    }

    .donate-decor--coin-right {
        top: 19%;
        right: 4px;
        width: 104px;
    }

    .donate-decor--chest {
        left: 0;
        bottom: 6px;
        width: 308px;
    }

    .donate-decor--dragon {
        right: -84px;
        bottom: 4px;
        width: 318px;
        opacity: 0.34;
        filter: blur(4px) saturate(1.02);
    }

    .donate-catalog {
        padding-top: 40px;
        padding-bottom: 36px;
    }

    .donate-catalog__heading {
        display: block;
        margin-bottom: 26px;
    }

    .donate-catalog__heading h2 {
        font-size: 34px;
    }


    .donate-catalog__heading p {
        margin-top: 14px;
        font-size: 13px;
    }

    .donate-kicker {
        margin-bottom: 18px;
        font-size: 14px;
        text-align: left;
    }

    .donate-services__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-card {
        grid-template-columns: 96px minmax(0, 1fr);
        min-height: 112px;
        gap: 12px;
        padding: 11px 13px;
        border-radius: 7px;
    }

    .service-card__icon {
        width: 90px;
        height: 102px;
        padding: 6px;
    }


    .service-card__body h4 {
        margin-bottom: 4px;
        font-size: 16px;
    }

    .service-card__body p {
        min-height: 0;
        font-size: 12px;
    }

    .service-card__body > strong {
        gap: 5px;
        font-size: 13px;
    }

    .service-card__body > strong img,
    .vip-prices strong img {
        width: 14px;
        height: 14px;
    }

    .vip-section {
        margin-top: 32px;
        padding-top: 26px;
    }

    .vip-section::before {
        content: none;
    }

    .donate-catalog__coin {
        display: none;
    }

    .vip-grid {
        gap: 16px;
    }

    .vip-card {
        min-height: 0;
        padding: 20px 16px 18px;
        border-radius: 10px;
    }

    .vip-card h4 {
        margin-bottom: 18px;
        font-size: 20px;
    }

    .vip-card__features {
        height: 340px;
        padding-right: 10px;
        gap: 7px;
    }

    .vip-card__features::-webkit-scrollbar {
        width: 3px;
    }

    .vip-card li {
        min-height: 42px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .vip-prices {
        --vip-price-padding: 7px;
        position: static;
        margin-top: 18px;
        gap: 0;
    }

    .vip-prices small {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .vip-prices strong {
        font-size: 18px;
    }

    .donate-footer {
        padding-top: 10px;
    }

    .account-help-modal {
        align-items: start;
        padding: 110px 18px 18px;
        overflow-y: auto;
    }

    .account-help-modal__backdrop {
        position: fixed;
        background: rgba(13, 8, 6, 0.08);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .account-help-modal__dialog {
        max-height: none;
        padding: 24px 18px 20px;
        border-radius: 17px;
        overflow: visible;
    }

    .account-help-modal__x {
        display: none;
    }

    .account-help-modal__dialog h2 {
        margin: 0 auto 24px;
        font-family: var(--font-body);
        font-size: 22px;
        font-weight: 900;
        line-height: 1.05;
        text-align: center;
    }

    .account-help-modal__intro {
        display: none;
    }

    .account-help-modal__shot {
        border-radius: 10px;
    }

    .account-help-modal__copy {
        margin: 26px 6px;
        font-family: var(--font-body);
        font-size: 14px;
        font-weight: 400;
        line-height: 1.6;
        text-align: center;
    }

    .account-help-modal__close {
        min-height: 50px;
        margin-top: 22px;
        font-size: 13px;
    }
}

@media (max-width: 390px) {
    .donate-hero__inner {
        padding-inline: 12px;
    }

    .donate-catalog {
        padding-inline: 14px;
    }

    .donate-form {
        padding-inline: 15px;
    }

    .donate-catalog__heading h2 {
        font-size: 31px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .donate-help,
    .donate-submit,
    .fast-donate__button,
    .account-help-modal__close,
    .donate-input-wrap {
        transition: none;
    }
}



.payment-modal[hidden] {
    display: none;
}

.payment-modal {
    position: fixed;
    z-index: 360;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 32px;
    opacity: 0;
    transition: opacity 180ms ease;
}

.payment-modal.is-open {
    opacity: 1;
}

.payment-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(24, 8, 3, 0.12);
    -webkit-backdrop-filter: blur(0.5px);
    backdrop-filter: blur(0.5px);
    cursor: default;
}

.payment-modal__dialog {
    position: relative;
    isolation: isolate;
    width: min(100%, 790px);
    padding: 42px 45px 45px;
    overflow: hidden;
    border: 1px solid rgba(240, 115, 42, 0.2);
    border-radius: 28px;
    outline: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(116, 54, 31, 0.32), transparent 34%),
        linear-gradient(150deg, rgba(58, 29, 20, 0.995), rgba(17, 15, 14, 0.995));
    box-shadow: 0 32px 90px rgba(28, 7, 2, 0.42);
    transform: translateY(10px) scale(0.985);
    transition: transform 180ms ease;
}

.payment-modal__dialog::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("../images/common/dark-pattern.webp") center / cover no-repeat;
    opacity: 0.9; 
    pointer-events: none;
}

.payment-modal__dialog > * {
    position: relative;
    z-index: 1;
}

.payment-modal.is-open .payment-modal__dialog {
    transform: translateY(0) scale(1);
}

.payment-modal__dialog h2 {
    margin: 0 52px 28px 0;
    color: rgba(255,255,255,0.9);
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.payment-modal__title-mobile {
    display: none;
}

.payment-modal__x {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.payment-modal__x::before,
.payment-modal__x::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

.payment-modal__x::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.payment-modal__x::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.payment-method {
    position: relative;
    display: grid;
    grid-template-rows: 74px auto;
    align-items: end;
    min-width: 0;
    min-height: 150px;
    padding: 18px 22px 20px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 14px;
    color: rgba(255,255,255,0.94);
    background: linear-gradient(145deg, rgba(75, 42, 30, 0.88), rgba(42, 31, 27, 0.82));
    box-shadow: inset 0 1px rgba(255,255,255,0.02);
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.payment-method:hover,
.payment-method:focus-visible {
    border-color: rgba(239, 118, 30, 0.55);
    background: linear-gradient(145deg, rgba(86, 45, 30, 0.94), rgba(45, 31, 27, 0.92));
    transform: translateY(-2px);
    outline: none;
}

.payment-method--crypto {
    grid-column: 2;
}

.payment-method__name {
    align-self: end;
    padding-right: 30px;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
}

.payment-method__arrow {
    position: absolute;
    right: 20px;
    bottom: 18px;
    font-size: 23px;
    font-weight: 300;
    line-height: 1;
}

.payment-logo {
    display: block;
    align-self: center;
    justify-self: start;
    width: auto;
    max-width: 100%;
    height: 54px;
    object-fit: contain;
    object-position: left center;
    pointer-events: none;
    user-select: none;
}

.payment-logo--mir { height: 48px; max-width: 126px; }
.payment-logo--sber { height: 46px; max-width: 126px; }
.payment-logo--steam { height: 58px; max-width: 58px; }
.payment-logo--tpay { height: 44px; max-width: 132px; }
.payment-logo--yoo { height: 46px; max-width: 138px; }
.payment-logo--sbp { height: 50px; max-width: 138px; }
.payment-logo--crypto { height: 58px; max-width: 58px; }


@media (max-width: 767px) {
    .payment-modal {
        place-items: start center;
        padding: 110px 18px 22px;
        overflow-y: auto;
    }

    .payment-modal__backdrop {
        position: fixed;
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .payment-modal__dialog {
        width: min(100%, 365px);
        padding: 30px 28px 27px;
        border-radius: 18px;
        background-position: 49% 42%, center, center;
        background-size: 690px auto, auto, auto;
        box-shadow: 0 22px 55px rgba(31, 9, 2, 0.22);
    }

    .payment-modal__dialog h2 {
        margin: 0 0 26px;
        font-size: 29px;
        text-align: center;
    }

    .payment-modal__title-desktop {
        display: none;
    }

    .payment-modal__title-mobile {
        display: inline;
    }

    .payment-modal__x {
        display: none;
    }

    .payment-methods {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .payment-method {
        grid-template-rows: 58px auto;
        min-height: 104px;
        padding: 12px 16px 14px;
        border-radius: 10px;
    }

    .payment-method--crypto {
        grid-column: 1 / -1;
        width: calc((100% - 12px) / 2);
        justify-self: center;
    }

    .payment-method__name {
        padding-right: 22px;
        font-size: 13px;
    }

    .payment-method__arrow {
        right: 13px;
        bottom: 12px;
        font-size: 18px;
    }

    .payment-logo {
        height: 40px;
        max-width: 104px;
    }

    .payment-logo--mir { height: 34px; max-width: 92px; }
    .payment-logo--sber { height: 34px; max-width: 94px; }
    .payment-logo--steam { height: 44px; max-width: 44px; }
    .payment-logo--tpay { height: 34px; max-width: 98px; }
    .payment-logo--yoo { height: 36px; max-width: 102px; }
    .payment-logo--sbp { height: 38px; max-width: 100px; }
    .payment-logo--crypto { height: 44px; max-width: 44px; }

    
    .donate-page.is-payment-open .donate-form {
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .payment-modal,
    .payment-modal__dialog,
    .payment-method {
        transition: none;
    }
}

.payment-modal__status {
    min-height: 22px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.payment-modal__status:empty {
    display: none;
}

.payment-modal__status[data-state="pending"] {
    color: rgba(255, 255, 255, 0.68);
}

.payment-modal__status[data-state="error"] {
    color: #ff8b78;
}

/* Пока платёж создаётся, кнопки способов оплаты недоступны */
.payment-method:disabled {
    opacity: 0.45;
    cursor: progress;
    transform: none;
}

.payment-method:disabled:hover {
    border-color: rgba(255, 255, 255, 0.075);
    background: linear-gradient(145deg, rgba(75, 42, 30, 0.88), rgba(42, 31, 27, 0.82));
    transform: none;
}

.donate-summary {
    position: relative;

    margin-top: 20px;
    padding: 18px 20px;

    overflow: hidden;

    border: 1px solid rgba(239, 118, 30, 0.18);
    border-radius: 10px;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(239, 118, 30, 0.10),
            transparent 42%
        ),
        rgba(255, 255, 255, 0.025);

    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.025);
}


.donate-summary::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;

    width: 3px;

    background:
        linear-gradient(
            180deg,
            #ff9b43,
            #e85c21
        );

    box-shadow:
        0 0 16px rgba(239, 118, 30, 0.4);
}


/* ROWS */

.donate-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 34px;
}


.donate-summary__row + .donate-summary__row {
    margin-top: 6px;
}


/* display:flex выше перебивает встроенный [hidden] { display: none } */
.donate-summary__row[hidden] {
    display: none;
}


.donate-summary__row > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    gap: 7px;

    color: rgba(255, 255, 255, 0.66);

    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
}


/* Чип с множителем / процентом рядом с подписью строки:
   игроку нужнее увидеть «×4» и «+20%» прямо в тексте, чем в колонке цифр. */
.donate-summary__chip {
    flex: 0 0 auto;

    padding: 4px 9px 3px;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}


.donate-summary__chip--rate {
    color: #ff8934;
    background: rgba(255, 137, 52, 0.14);
}


.donate-summary__chip--bonus {
    color: #ffb044;
    background: rgba(255, 176, 68, 0.14);
}


.donate-summary__row strong {
    color: rgba(255, 255, 255, 0.94);

    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;

    white-space: nowrap;
}


.donate-summary__row strong small {
    color: rgba(255, 255, 255, 0.6);

    font-size: 15px;
    font-weight: 400;
}


/* ACCENTS */

.donate-summary__row
.donate-summary__bonus {
    color: #ffb044;
}


/* HINT: до следующей ступени бонуса */

.donate-summary__hint {
    display: flex;
    align-items: center;
    gap: 7px;

    margin: 10px 0 0;

    color: #ffb044;

    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}


.donate-summary__hint[hidden] {
    display: none;
}


.donate-summary__hint::before {
    content: "";

    flex: 0 0 auto;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}


/* DIVIDER */

.donate-summary__divider {
    height: 1px;

    margin: 15px 0;

    background:
        linear-gradient(
            90deg,
            rgba(239, 118, 30, 0),
            rgba(239, 118, 30, 0.35),
            rgba(239, 118, 30, 0)
        );
}


/* TOTAL */

.donate-summary__total {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.donate-summary__total > div {
    min-width: 0;
}


.donate-summary__total > div > span {
    display: block;

    color: #fff;

    font-family: var(--font-body);
    font-size: 19px;
    font-weight: 800;

    text-transform: uppercase;
}


.donate-summary__total > div > small {
    display: block;

    margin-top: 2px;

    color: rgba(255, 255, 255, 0.45);

    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
}


.donate-summary__total > strong {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    color: #ff8a35;

    font-family: var(--font-body);
    font-size: 32px;
    font-weight: 900;
    line-height: 0.9;

    font-variant-numeric: tabular-nums;

    text-shadow:
        0 0 18px rgba(239, 118, 30, 0.18);
}


.donate-summary__currency {
    margin-top: 6px;

    color: rgba(255, 255, 255, 0.55);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 767px) {

    .donate-summary {
        margin-top: 14px;
        padding: 14px 15px;
        border-radius: 8px;
    }


    .donate-summary__hint {
        font-size: 12px;
    }


    .donate-summary__row {
        min-height: 30px;
        gap: 10px;
    }


    .donate-summary__row + .donate-summary__row {
        margin-top: 3px;
    }


    .donate-summary__row > span {
        font-size: 13px;
    }


    .donate-summary__chip {
        padding: 3px 7px 2px;
        font-size: 11px;
    }


    .donate-summary__row strong {
        font-size: 15px;
    }


    .donate-summary__row strong small {
        font-size: 12px;
    }


    .donate-summary__divider {
        margin: 10px 0;
    }


    .donate-summary__total > div > span {
        font-size: 16px;
    }


    .donate-summary__total > div > small {
        max-width: 160px;
        font-size: 11px;
    }


    .donate-summary__total > strong {
        font-size: 24px;
    }


    .donate-summary__currency {
        margin-top: 4px;
        font-size: 10px;
    }
}
