/* ============================================================
 * Donate page — современный редизайн на токенах --color-*
 * ============================================================ */

/* Sections */
.donate-section {
    background: var(--color-bg-base, #0a1823);
    border-radius: 2px;
    padding: 22px 24px 26px;
    margin-bottom: 16px;
    border: none;
    box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.85),
                inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.donate-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.donate-section__head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: var(--color-primary-500, #fb8c07);
}

.donate-section__title {
    margin: 0;
    color: var(--color-text-strong, #fff);
    font-family: var(--font-display, 'Reaver', sans-serif);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.donate-section__hint {
    color: var(--color-text-muted, #9098a6);
    font-size: 12px;
    font-weight: 500;
}

.donate-section__hint #donate-rate-display {
    color: var(--color-text-default, #e3e8ef);
    font-weight: 600;
}

/* ── Пакеты ── */
.donate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 980px) {
    .donate-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .donate-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

.donate-pkg {
    position: relative;
    display: grid;
    /* фиксированные ряды → элементы выстраиваются ровно на одинаковой высоте между карточками */
    grid-template-rows:
        80px         /* icon */
        42px         /* amount (число или input) */
        20px         /* bonus-detail (одна строка) */
        1fr          /* price block — забирает оставшуюся высоту */
        auto;        /* button — прибит к низу */
    justify-items: center;
    align-items: center;
    row-gap: 8px;
    padding: 26px 22px 22px;
    background: var(--color-bg-surface-1, #0e222e);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.donate-pkg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--pkg-accent, var(--color-primary-500, #fb8c07));
    opacity: 0.7;
}

.donate-pkg--bronze   { --pkg-accent: #cd7f32; }
.donate-pkg--silver   { --pkg-accent: #b8c2cc; }
.donate-pkg--gold     { --pkg-accent: #f3ba2f; }
.donate-pkg--platinum { --pkg-accent: #c8d4e1; }
.donate-pkg--diamond  { --pkg-accent: #5dade2; }
.donate-pkg--custom   { --pkg-accent: var(--color-primary-500, #fb8c07); }

/* Кастомный пакет — пунктирная окантовка по умолчанию */
.donate-pkg--custom {
    border-style: dashed;
    border-color: rgba(251, 140, 7, 0.35);
}

.donate-pkg--custom::before {
    background: var(--color-primary-500, #fb8c07);
    opacity: 0.55;
}

.donate-pkg--custom:hover,
.donate-pkg--custom:focus-within {
    border-style: solid;
}

.donate-pkg__icon--custom svg {
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.donate-pkg--custom:hover .donate-pkg__icon--custom svg,
.donate-pkg--custom:focus-within .donate-pkg__icon--custom svg {
    opacity: 1;
    transform: rotate(90deg) scale(1.05);
}

/* Инпут количества монет — выглядит как большой текст-число */
.donate-pkg__amount--input {
    width: 100%;
    justify-content: center;
}

.donate-pkg__input {
    width: 100%;
    max-width: 140px;
    padding: 4px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(251, 140, 7, 0.35);
    color: var(--color-text-strong, #fff);
    font-family: var(--font-display, sans-serif);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    outline: none;
    transition: border-color 0.15s ease;
    -moz-appearance: textfield;
}

.donate-pkg__input::-webkit-outer-spin-button,
.donate-pkg__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.donate-pkg__input::placeholder {
    color: var(--color-text-subtle, #5a6677);
    font-weight: 600;
}

.donate-pkg__input:focus {
    border-bottom-color: var(--color-primary-500, #fb8c07);
}

.donate-pkg:hover {
    border-color: var(--pkg-accent);
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.9),
                0 0 0 1px var(--pkg-accent),
                inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.donate-pkg__tag {
    position: absolute;
    top: 10px;
    left: 12px;
    color: var(--color-text-muted, #9098a6);
    font-family: var(--font-display, sans-serif);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.donate-pkg__bonus {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 3px 8px;
    background: var(--pkg-accent);
    color: #0a1823;
    font-family: var(--font-display, sans-serif);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    border-radius: 2px;
}

/* Информационная плашка в правом-верхнем углу (например, «Минимум 100 монет» для custom) */
.donate-pkg__min {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-muted, #9098a6);
    font-family: var(--font-display, sans-serif);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.donate-pkg__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}

.donate-pkg__amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.donate-pkg__number {
    color: var(--color-text-strong, #fff);
    font-family: var(--font-display, sans-serif);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.donate-pkg__unit {
    color: var(--color-text-muted, #9098a6);
    font-size: 13px;
    font-weight: 500;
}

.donate-pkg__bonus-detail {
    color: var(--color-text-muted, #9098a6);
    font-size: 12px;
}

.donate-pkg__bonus-detail strong {
    color: #FBBF24;
    font-weight: 700;
}

.donate-pkg__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 100%;
    width: 100%;
}

.donate-pkg__price-rub {
    color: var(--color-text-strong, #fff);
    font-family: var(--font-display, sans-serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.donate-pkg__price-usd {
    color: var(--color-text-subtle, #5a6677);
    font-size: 12px;
    font-weight: 500;
}

.donate-pkg__price-unit {
    margin-top: 6px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    color: var(--color-text-muted, #9098a6);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.donate-pkg__btn {
    width: 100%;
    padding: 11px 18px;
    background: var(--color-primary-500, #fb8c07);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: var(--font-display, sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.05s ease;
}

.donate-pkg__btn:hover:not(:disabled) {
    background: var(--color-primary-400, #f3813c);
}

.donate-pkg__btn:active:not(:disabled) {
    transform: scale(0.99);
}

.donate-pkg__btn:disabled {
    background: var(--color-bg-surface-4, #18334a);
    color: var(--color-text-subtle, #5a6677);
    cursor: not-allowed;
}

/* ── Своё количество ── */
.donate-section--custom .donate-custom {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    gap: 16px;
    align-items: end;
}

@media (max-width: 760px) {
    .donate-section--custom .donate-custom {
        grid-template-columns: 1fr;
    }
}

.donate-custom__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.donate-custom__label {
    color: var(--color-text-muted, #9098a6);
    font-family: var(--font-display, sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.donate-custom__input-wrap {
    position: relative;
}

.donate-custom__input-wrap input {
    width: 100%;
    padding: 12px 56px 12px 14px;
    background: var(--color-bg-surface-2, #13283a);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    color: var(--color-text-strong, #fff);
    font-family: var(--font-display, sans-serif);
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s ease;
    -moz-appearance: textfield;
}

.donate-custom__input-wrap input::-webkit-outer-spin-button,
.donate-custom__input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.donate-custom__input-wrap input:focus {
    border-color: var(--color-primary-500, #fb8c07);
    box-shadow: 0 0 0 3px rgba(251, 140, 7, 0.15);
}

.donate-custom__input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted, #9098a6);
    font-size: 12px;
    pointer-events: none;
}

.donate-custom__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px;
    border-radius: 2px;
}

.donate-custom__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    background: var(--color-bg-surface-2, #13283a);
}

.donate-custom__stat-label {
    color: var(--color-text-muted, #9098a6);
    font-family: var(--font-display, sans-serif);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.donate-custom__stat-value {
    color: var(--color-text-strong, #fff);
    font-family: var(--font-display, sans-serif);
    font-size: 15px;
    font-weight: 700;
}

.donate-custom__stat-value.is-highlight {
    color: #34D399;
}

.donate-custom__stat-sub {
    color: var(--color-text-subtle, #5a6677);
    font-size: 11px;
    font-weight: 500;
    margin-top: 1px;
}

.donate-custom__stat--accent .donate-custom__stat-value {
    color: var(--color-primary-400, #f3813c);
}

.donate-custom__btn {
    padding: 13px 22px;
    background: var(--color-primary-500, #fb8c07);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: var(--font-display, sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    height: 100%;
    min-height: 44px;
    transition: background 0.2s ease, transform 0.05s ease;
}

.donate-custom__btn:hover:not(:disabled) {
    background: var(--color-primary-400, #f3813c);
}

.donate-custom__btn:disabled {
    background: var(--color-bg-surface-4, #18334a);
    color: var(--color-text-subtle, #5a6677);
    cursor: not-allowed;
}

@media (max-width: 760px) {
    .donate-custom__btn { width: 100%; }
}

/* ── Legacy garbage (старые селекторы — остаются для модалки) ── */
.donate-hero {
    background: var(--bg-surface-elevated);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    text-align: center;
}

.donate-hero-title {
    color: var(--text-heading);
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.donate-hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1em;
    font-weight: 500;
    margin: 0;
}

/* Login notice */
.donate-login-notice {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    padding: 16px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Body — single block matching hero width */
.donate-body {
    background: var(--bg-surface-elevated);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 32px;
    margin-bottom: 30px;
}

/* Packages grid — 4 columns */
.donate-packages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Card */
.donate-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 32px 24px 28px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.donate-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 8px 30px var(--accent-muted);
}

/* Badge */
.donate-card-badge {
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--accent);
    color: #fff;
    font-size: 0.8em;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* Coin icon */
.donate-card-coin-icon {
    margin-bottom: 16px;
}

/* Coins number */
.donate-card-coins {
    font-size: 2.4em;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1;
    margin-bottom: 4px;
}

.donate-card-label {
    color: var(--text-muted);
    font-size: 0.95em;
    margin-bottom: 12px;
}

.donate-card-total {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 16px;
}

.donate-card-total strong {
    color: #FBBF24;
}

/* Price */
.donate-card-price {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--accent-hover);
    margin-bottom: 20px;
}

/* Buy button (disabled by default) */
.donate-btn {
    display: inline-block;
    width: 100%;
    padding: 13px 24px;
    background: var(--accent);
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.05s ease;
}

.donate-btn:disabled,
.donate-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.4;
    background: var(--bg-surface-active);
    color: var(--text-muted);
}

.donate-btn:not(:disabled):active {
    transform: scale(0.99);
}

/* Active buy button (logged in) */
.donate-btn-active {
    cursor: pointer;
    opacity: 1;
}

.donate-btn-active:not(:disabled):hover {
    background: var(--accent-hover);
}

/* Custom card — 4th in grid */
.donate-card-custom {
    cursor: pointer;
    border-style: dashed;
}

.donate-card-custom:hover {
    border-color: var(--accent);
}

.donate-card-custom.active {
    border-color: var(--accent);
    border-style: solid;
    box-shadow: 0 0 0 2px var(--accent-muted);
}

.donate-card-custom-hint {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 16px;
}

.donate-btn-open {
    opacity: 1;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
}

.donate-btn-open:hover {
    background: var(--accent-hover);
}

/* Expanding panel under grid */
.donate-custom-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, margin-top 0.35s ease;
    margin-top: 0;
}

.donate-custom-panel.open {
    max-height: 400px;
    margin-top: 28px;
}

.donate-custom-panel-inner {
    border-top: 1px solid var(--border-primary);
    padding-top: 28px;
    max-width: 400px;
    margin: 0 auto;
}

/* Input */
.donate-custom-input-wrap {
    margin-bottom: 20px;
    text-align: left;
}

.donate-custom-input-wrap label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 6px;
}

.donate-custom-input-wrap input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.donate-custom-input-wrap input:focus {
    border-color: var(--accent);
}

.donate-custom-input-wrap input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Calculator */
.donate-custom-calc {
    margin-bottom: 20px;
}

.donate-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-primary);
}

.donate-calc-row:last-child {
    border-bottom: none;
}

.donate-calc-row-total {
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid var(--accent-border);
    border-bottom: none;
}

.donate-calc-label {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.donate-calc-value {
    color: var(--text-heading);
    font-size: 1.05em;
    font-weight: 600;
}

.donate-calc-highlight {
    color: #34D399;
}

.donate-calc-row-total .donate-calc-value {
    color: #FBBF24;
    font-size: 1.2em;
    font-weight: 700;
}

.donate-btn-custom {
    margin-top: 4px;
}

/* ===================== Payment Modal ===================== */

.donate-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 21, 0.84);   /* var(--color-bg-header) с альфой */
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.donate-modal-overlay.active {
    display: flex;
}

.donate-modal {
    background: var(--color-bg-base, #0a1823);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    padding: 32px 32px 28px;
    width: 100%;
    max-width: 740px;
    position: relative;
    max-height: 94vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.85),
                inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.donate-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--color-primary-500, #fb8c07);
}

.donate-modal::-webkit-scrollbar { width: 8px; }
.donate-modal::-webkit-scrollbar-thumb {
    background: var(--color-bg-surface-4, #18334a);
    border-radius: 2px;
}

.donate-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted, #9098a6);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    border-radius: 2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.donate-modal-close:hover {
    color: var(--color-text-strong, #fff);
    border-color: rgba(255, 255, 255, 0.1);
}

.donate-modal-title {
    color: var(--color-text-strong, #fff);
    font-family: var(--font-display, sans-serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.donate-modal-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: var(--color-primary-500, #fb8c07);
}

.donate-modal-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 22px;
    background: var(--color-bg-surface-1, #0e222e);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    color: var(--color-text-default, #e3e8ef);
    font-size: 14px;
    font-weight: 500;
}

.donate-modal-summary strong {
    color: #FBBF24;
    font-family: var(--font-display, sans-serif);
    font-weight: 700;
}

/* Currency select */
.donate-currency-select-wrap {
    margin-bottom: 20px;
}

.donate-currency-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.donate-currency-select:focus {
    border-color: var(--accent);
}

.donate-modal-pay-btn {
    margin-top: 4px;
}

/* Payment info (step 2) */
.donate-payment-info {
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.donate-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
}

.donate-payment-row + .donate-payment-row {
    border-top: 1px solid var(--border-primary);
}

.donate-payment-label {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
}

.donate-payment-value {
    color: var(--text-heading);
    font-size: 0.9em;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

.donate-payment-address {
    font-family: monospace;
    font-size: 0.82em;
    max-width: 260px;
    user-select: all;
}

/* QR code */
.donate-qr-wrap {
    text-align: center;
    margin-bottom: 16px;
}

.donate-qr-wrap img {
    border-radius: 8px;
    border: 2px solid var(--border-primary);
}

.donate-payment-hint {
    color: var(--text-muted);
    font-size: 0.85em;
    text-align: center;
    margin: 0;
}

/* Status color indicators */
.donate-status-waiting {
    color: #FBBF24 !important;
}

.donate-status-confirming {
    color: #60A5FA !important;
}

.donate-status-confirmed,
.donate-status-finished {
    color: #34D399 !important;
}

.donate-status-sending {
    color: #818CF8 !important;
}

.donate-status-failed,
.donate-status-expired,
.donate-status-refunded {
    color: #F87171 !important;
}

.donate-status-partially_paid {
    color: #FB923C !important;
}

/* Step 3 done */
.donate-status-success {
    color: #34D399;
}

.donate-modal-done-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05em;
    margin-bottom: 24px;
}

.donate-modal-done-text strong {
    color: #FBBF24;
}

/* Responsive */
@media (max-width: 1000px) {
    .donate-packages {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .donate-packages {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .donate-body {
        padding: 20px 16px;
    }

    .donate-hero-title {
        font-size: 1.6em;
    }

    .donate-modal {
        padding: 24px 16px;
        width: 95%;
    }
}

/* ===================== FreeKassa flow (новая модалка) ===================== */

/* RUB-подпись на карточках пакетов */
.donate-card-price-rub {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Поле email */
.donate-field {
    margin-bottom: 20px;
}

.donate-field > label {
    display: block;
    color: var(--color-text-muted, #9098a6);
    font-family: var(--font-display, sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.donate-field > input[type="email"],
.donate-field > input[type="text"] {
    width: 100%;
    padding: 11px 14px;
    background: var(--color-bg-surface-2, #13283a);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    color: var(--color-text-strong, #fff);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.donate-field > input:focus {
    border-color: var(--color-primary-500, #fb8c07);
    box-shadow: 0 0 0 3px rgba(251, 140, 7, 0.15);
}

.donate-field-hint {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.78em;
    line-height: 1.4;
}

/* ── Recipient preview card (виден всегда, меняет вид через data-state) ── */
.donate-recipient {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--color-bg-surface-1, #0e222e);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.donate-recipient[data-state="empty"] {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.08);
}

.donate-recipient[data-state="loading"] {
    border-color: rgba(255, 255, 255, 0.08);
}

.donate-recipient[data-state="loaded"] {
    border-color: rgba(251, 140, 7, 0.35);
    background: var(--color-bg-surface-2, #13283a);
}

.donate-recipient[data-state="error"] {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.06);
}

.donate-recipient__avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-surface-2, #13283a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-subtle, #5a6677);
}

.donate-recipient__avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.donate-recipient[data-state="loading"] .donate-recipient__avatar-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
    animation: donate-recipient-shimmer 1.2s linear infinite;
}

.donate-recipient[data-state="error"] .donate-recipient__avatar-placeholder {
    color: #F87171;
}

@keyframes donate-recipient-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.donate-recipient__body {
    flex: 1 1 auto;
    min-width: 0;
}

.donate-recipient__name {
    color: var(--color-text-strong, #fff);
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donate-recipient[data-state="empty"] .donate-recipient__name,
.donate-recipient[data-state="loading"] .donate-recipient__name {
    color: var(--color-text-muted, #9098a6);
    font-weight: 500;
}

.donate-recipient[data-state="error"] .donate-recipient__name {
    color: #F87171;
}

.donate-recipient__meta {
    color: var(--color-text-muted, #9098a6);
    font-size: 11px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading skeleton — текст серым в shimmer */
.donate-recipient[data-state="loading"] .donate-recipient__meta {
    color: var(--color-text-subtle, #5a6677);
}

.donate-recipient__confirm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-default, #e3e8ef);
    user-select: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.donate-recipient:not([data-state="loaded"]) .donate-recipient__confirm {
    opacity: 0.4;
    color: var(--color-text-muted, #9098a6);
    cursor: not-allowed;
}

.donate-recipient__confirm input[type="checkbox"] {
    accent-color: var(--color-primary-500, #fb8c07);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.donate-recipient__confirm input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

@media (max-width: 520px) {
    .donate-recipient {
        flex-wrap: wrap;
    }
    .donate-recipient__confirm {
        width: 100%;
        justify-content: flex-end;
    }
}


/* Сетка способов оплаты */
.donate-methods-section {
    margin-bottom: 20px;
}

.donate-methods-title {
    color: var(--text-muted);
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.donate-methods-group {
    margin-bottom: 14px;
}

.donate-methods-group:last-child {
    margin-bottom: 0;
}

.donate-methods-grid {
    display: grid;
    gap: 10px;
}

.donate-methods-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.donate-methods-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 600px) {
    .donate-methods-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
}

.donate-methods-loading,
.donate-methods-error {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
    padding: 16px 8px;
}

.donate-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--color-bg-surface-1, #0e222e);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    color: var(--color-text-default, #e3e8ef);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    text-align: left;
    min-height: 56px;
}

.donate-method:hover {
    border-color: rgba(251, 140, 7, 0.4);
    background: var(--color-bg-surface-2, #13283a);
    transform: translateY(-1px);
}

.donate-method:active {
    transform: scale(0.99);
}

.donate-method.is-selected {
    border-color: var(--color-primary-500, #fb8c07);
    background: rgba(251, 140, 7, 0.08);
    box-shadow: 0 0 0 1px var(--color-primary-500, #fb8c07) inset;
}

.donate-method--top {
    padding: 14px 16px;
    font-size: 0.95em;
}

.donate-method__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text-muted, #9098a6);
    flex-shrink: 0;
}

.donate-method__icon svg,
.donate-method__icon .donate-method__img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.donate-method__img {
    width: 32px;
    height: 32px;
}

.donate-method__name {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
    min-width: 0;
}

.donate-method__title {
    color: var(--color-text-strong, #fff);
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donate-method__sub {
    color: var(--color-text-muted, #9098a6);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Предупреждающая «плашка» для альт-методов (СБП2 — повышенная комиссия) */
.donate-method__sub--warn {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 6px;
    background: rgba(248, 113, 113, 0.12);
    color: #F87171;
    font-weight: 600;
    border-radius: 2px;
    border: 1px solid rgba(248, 113, 113, 0.25);
    align-self: flex-start;
}

.donate-method--warn:not(.is-selected) {
    border-color: rgba(248, 113, 113, 0.18);
}

/* Кастомный тултип по data-tooltip */
.donate-method[data-tooltip] {
    position: relative;
}

.donate-method[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    background: var(--color-bg-header, #081015);
    color: var(--color-text-default, #e3e8ef);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: normal;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
}

.donate-method[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--color-bg-header, #081015);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 101;
}

.donate-method[data-tooltip]:hover::after,
.donate-method[data-tooltip]:focus-visible::after,
.donate-method[data-tooltip]:hover::before,
.donate-method[data-tooltip]:focus-visible::before {
    opacity: 1;
}

/* Заглушаем нативный title — он мерцает поверх кастомного. На touch остаётся как fallback. */
.donate-method[data-tooltip] {
    -webkit-tap-highlight-color: transparent;
}

/* Текстовые «лого» методов */
.dm-method-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.82em;
    letter-spacing: 0.5px;
    line-height: 1;
}

.dm-method-text--mir {
    background: linear-gradient(90deg, #006848 0%, #006848 50%, #f8b300 50%, #f8b300 100%);
    color: #fff;
    padding: 4px 10px;
}

.dm-method-text--visa {
    background: #1A1F71;
    color: #fff;
    font-style: italic;
    padding: 4px 10px;
}

.dm-method-text--sbp {
    background: linear-gradient(135deg, #6B43A1 0%, #FF4D4D 100%);
    color: #fff;
    padding: 4px 10px;
}

.dm-method-text--yoo {
    background: #FFCB05;
    color: #1F1F1F;
    padding: 4px 10px;
    font-size: 0.78em;
}

.donate-methods-subhead {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 0.78em;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 8px 0 2px;
    padding-left: 2px;
}

.donate-method__icon {
    width: 44px;
    height: 30px;
}

.donate-method__icon svg {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.donate-methods-toggle {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px dashed var(--border-primary);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.donate-methods-toggle:hover {
    color: var(--text-secondary);
    border-color: var(--accent-border);
}

.donate-pay-cta {
    margin-top: 4px;
}

.donate-pay-hint {
    margin-top: 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82em;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.donate-pay-hint:empty {
    display: none;
}

/* Когда нужна только галочка — подсвечиваем подсказку оранжевым */
.donate-recipient__confirm.is-needed {
    animation: donate-confirm-pulse 1.4s ease-in-out infinite;
    background: var(--accent-muted);
    padding: 6px 10px;
    border-radius: 8px;
    margin: -4px -10px;
    border: 1px solid var(--accent-border);
    color: var(--text-heading);
}

.donate-recipient__confirm.is-needed input {
    transform: scale(1.1);
}

@keyframes donate-confirm-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-muted); }
    50%      { box-shadow: 0 0 0 6px transparent; }
}

.donate-secure-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.78em;
    text-align: center;
    line-height: 1.4;
}

/* Спиннер на step 2 */
.donate-spinner {
    width: 42px;
    height: 42px;
    margin: 16px auto 16px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: donate-spin 0.9s linear infinite;
}

/* ── Step 2: popup-окно FK ── */
.donate-pay-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-primary);
    border-radius: 999px;
    margin: 0 auto 14px;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 500;
}

.donate-pay-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FBBF24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
    animation: donate-pulse 1.4s ease-in-out infinite;
}

.donate-pay-status__dot.is-finished {
    background: #34D399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
    animation: none;
}

.donate-pay-status__dot.is-failed,
.donate-pay-status__dot.is-expired,
.donate-pay-status__dot.is-refunded {
    background: #F87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
    animation: none;
}

@keyframes donate-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.donate-popup-text {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
    margin: 12px 0 18px;
}

.donate-popup-hint {
    color: var(--text-muted);
    font-size: 0.78em;
    line-height: 1.4;
    margin-top: 12px;
    text-align: center;
}

.donate-popup-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.donate-popup-actions .donate-btn {
    width: 100%;
}

.donate-btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.donate-btn-secondary:hover {
    border-color: var(--accent-border);
    color: var(--text-primary);
}

#donate-modal-step2 {
    text-align: center;
}

@keyframes donate-spin {
    to { transform: rotate(360deg); }
}

/* Return overlay (после возврата с FK) */
.donate-return-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: donate-fade-in 0.2s ease;
}

.donate-return-overlay.is-hidden {
    display: none;
}

@keyframes donate-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.donate-return-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 18px;
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.donate-return-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.donate-return-icon--ok {
    background: rgba(52, 211, 153, 0.15);
    color: #34D399;
}

.donate-return-icon--fail {
    background: rgba(248, 113, 113, 0.15);
    color: #F87171;
}

.donate-return-title {
    font-size: 1.4em;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-heading);
}

.donate-return-text {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0 0 22px;
}

.donate-return-text strong {
    color: #FBBF24;
}
