:root {
    --af-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --af-bg: #f5f1eb;
    --af-surface: #ffffff;
    --af-surface-2: #fbf8f3;
    --af-surface-3: #f1ede7;
    --af-text: #211d18;
    --af-muted: #7f776d;
    --af-line: rgba(33, 29, 24, 0.09);
    --af-line-strong: rgba(33, 29, 24, 0.14);
    --af-accent: #f7d451;
    --af-accent-strong: #f0c938;
    --af-accent-soft: rgba(247, 212, 81, 0.18);
    --af-accent-card: linear-gradient(135deg, rgba(247, 212, 81, 0.9) 0%, rgba(255, 232, 149, 0.96) 100%);
    --af-success: #16b15a;
    --af-success-soft: rgba(22, 177, 90, 0.12);
    --af-warning: #f2a400;
    --af-warning-soft: rgba(242, 164, 0, 0.12);
    --af-danger: #ff3b30;
    --af-danger-soft: rgba(255, 59, 48, 0.14);
    --af-radius-xl: 24px;
    --af-radius-lg: 20px;
    --af-radius-md: 16px;
    --af-radius-sm: 13px;
    --af-radius-xs: 10px;
    --af-shadow-sm: 0 10px 24px rgba(24, 18, 9, 0.06);
    --af-shadow-md: 0 18px 40px rgba(24, 18, 9, 0.08);
    --af-space-sm: 10px;
    --af-space-md: 14px;
    --af-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --af-anim-fast: 360ms;
    --af-anim-mid: 760ms;
    --af-anim-sheet: 560ms;
    --af-top-offset: calc(max(10px, env(safe-area-inset-top)) + 46px);
    --af-bottom-offset: calc(98px + env(safe-area-inset-bottom));
    --af-toast-top: calc(max(12px, env(safe-area-inset-top)) + 56px);
}

:root[data-theme="dark"] {
    --af-bg: #080808;
    --af-surface: #1c1c1c;
    --af-surface-2: #242424;
    --af-surface-3: #2b2b2b;
    --af-text: #f4efe7;
    --af-muted: #a49e96;
    --af-line: rgba(255, 255, 255, 0.07);
    --af-line-strong: rgba(255, 255, 255, 0.1);
    --af-accent-soft: rgba(247, 212, 81, 0.14);
    --af-shadow-sm: none;
    --af-shadow-md: none;
}

html,
body {
    background: var(--af-bg) !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.sheet-card::-webkit-scrollbar,
.wa-sheet-card::-webkit-scrollbar,
.af-sheet-card::-webkit-scrollbar,
.app-shell::-webkit-scrollbar,
.app-main::-webkit-scrollbar,
.sheet-shell::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sheet-card,
.wa-sheet-card,
.af-sheet-card,
.app-shell,
.app-main,
.sheet-shell {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    font-family: var(--af-font);
    color: var(--af-text);
    background-image: none !important;
}

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

@keyframes af-rise-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes af-recipient-rise {
    from {
        opacity: 0;
        transform: translateY(-14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes af-field-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

@keyframes af-sheet-up {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes af-sheet-down {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

@keyframes af-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes af-toast-drop {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes af-toast-lift {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-14px);
    }
}

.app-shell {
    width: min(100%, 480px);
    min-height: 100dvh;
    padding: var(--af-top-offset) 0 var(--af-bottom-offset);
    background: var(--af-bg);
}

.app-main {
    gap: 0;
    padding: 0 16px;
}

#bottom-dock-root {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 35;
    width: min(100%, 480px);
    transform: translateX(-50%);
    pointer-events: none;
}

.sheet-root.active {
    position: fixed;
    inset: 0;
    z-index: 45;
}

.loading-overlay {
    z-index: 120 !important;
    background: rgba(247, 245, 242, 0.94) !important;
}

:root[data-theme="dark"] .loading-overlay {
    background: rgba(5, 5, 5, 0.96) !important;
}

.toast-stack {
    top: var(--af-toast-top) !important;
    z-index: 180 !important;
}

:root[data-tg-viewport="compact"] {
    --af-top-offset: calc(max(10px, env(safe-area-inset-top)) + 46px);
    --af-toast-top: calc(max(12px, env(safe-area-inset-top)) + 56px);
}

.toast {
    animation: af-toast-drop 260ms var(--af-ease) both;
    transition: none !important;
}

.toast.is-leaving {
    animation: af-toast-lift 220ms var(--af-ease) forwards;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
}

:root[data-theme="light"] .sheet-backdrop {
    background: rgba(22, 20, 16, 0.2);
}

.sheet-shell {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    width: min(100%, 480px);
    margin: 0 auto;
    max-height: min(88vh, 880px);
    overflow: hidden;
}

.af-screen,
.af-screen-block,
.af-profile-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 10px 0 28px;
}

.af-screen-block,
.af-profile-shell {
    padding-top: 16px;
}

.af-page-header,
.af-back-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 0 4px;
}

.af-page-header.is-home {
    align-items: flex-start;
    justify-content: space-between;
}

.af-page-header__copy,
.af-back-header {
    min-width: 0;
}

.af-page-header__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.af-page-header__copy strong,
.af-back-header strong,
.af-screen-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.af-page-header__copy span {
    color: var(--af-muted);
    font-size: 15px;
    line-height: 1.28;
}

.af-back-header strong {
    padding-top: 4px;
}

.af-back-btn,
.af-profile-btn,
.af-sheet-close,
.af-balance-card__plus {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--af-surface);
    border: 1px solid var(--af-line);
    color: var(--af-text);
    box-shadow: var(--af-shadow-sm);
    flex-shrink: 0;
}

:root[data-theme="dark"] .af-back-btn,
:root[data-theme="dark"] .af-profile-btn,
:root[data-theme="dark"] .af-sheet-close {
    background: var(--af-surface-2);
}

.af-profile-btn,
.af-balance-card__plus {
    background: var(--af-accent-card);
    color: #17140f;
    border-color: rgba(247, 212, 81, 0.28);
    box-shadow: 0 10px 26px rgba(232, 194, 55, 0.18);
}

.af-balance-card__plus {
    background: rgba(35, 31, 32, 0.2);
    color: #231f20;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

:root[data-theme="dark"] .af-profile-btn {
    background: var(--af-surface-2);
    color: var(--af-accent);
    border-color: rgba(247, 212, 81, 0.24);
    box-shadow: none;
}

.af-back-btn svg,
.af-profile-btn svg,
.af-sheet-close svg,
.af-balance-card__plus svg,
.af-menu-row__arrow svg {
    width: 20px;
    height: 20px;
}

.af-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0 6px;
    text-align: center;
}

.af-hero__badge {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: rgba(247, 212, 81, 0.12);
    color: var(--af-accent);
    border: 1px solid rgba(247, 212, 81, 0.08);
}

.af-hero__badge svg {
    width: 30px;
    height: 30px;
}

.af-hero h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.af-hero p {
    max-width: 310px;
    margin: 0;
    font-size: 15px;
    line-height: 1.32;
    color: var(--af-muted);
}

.af-card {
    border-radius: var(--af-radius-lg);
    background: var(--af-surface);
    border: 1px solid var(--af-line);
    box-shadow: var(--af-shadow-sm);
    padding: 18px;
}

.af-card.af-empty-card,
.af-empty {
    display: grid;
    place-items: center;
    min-height: 86px;
    color: var(--af-muted);
    text-align: center;
}

.af-balance-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border-radius: var(--af-radius-xl);
    background: var(--af-accent-card);
    border: 1px solid rgba(247, 212, 81, 0.28);
    box-shadow: 0 18px 36px rgba(226, 189, 59, 0.14);
    color: #19150f;
}

:root[data-theme="dark"] .af-balance-card {
    box-shadow: 0 0 0 1px rgba(247, 212, 81, 0.12), 0 18px 34px rgba(0, 0, 0, 0.18);
}

.af-balance-card.is-static {
    box-shadow: none;
}

.af-balance-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.af-balance-card__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    line-height: 1.2;
    color: rgba(25, 21, 15, 0.84);
}

.af-balance-card__label svg {
    width: 20px;
    height: 20px;
}

.af-balance-card strong {
    font-size: 26px;
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 800;
}

.af-balance-card span:last-child {
    color: rgba(25, 21, 15, 0.62);
    font-size: 15px;
}

.af-quick-grid,
.af-action-grid,
.af-stat-grid {
    display: grid;
    gap: 14px;
}

.af-quick-grid,
.af-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.af-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.af-quick-card,
.af-action-card,
.af-stat-card {
    min-width: 0;
    border-radius: var(--af-radius-lg);
    border: 1px solid var(--af-line);
    background: var(--af-surface);
    color: var(--af-text);
    text-align: left;
}

.af-quick-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 150px;
    padding: 22px;
}

.af-quick-card__icon,
.af-action-card__badge,
.af-stat-card__icon,
.af-menu-row__icon,
.af-promo-card__icon,
.af-product-summary__icon,
.af-pay-method__icon,
.af-transaction-card__icon,
.af-referral-row__avatar {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    flex-shrink: 0;
}

.af-quick-card__icon,
.af-action-card__badge,
.af-stat-card__icon,
.af-menu-row__icon,
.af-promo-card__icon,
.af-product-summary__icon,
.af-pay-method__icon,
.af-transaction-card__icon {
    background: rgba(247, 212, 81, 0.12);
    color: var(--af-accent);
}

.af-quick-card__icon svg,
.af-action-card__badge svg,
.af-stat-card__icon svg,
.af-menu-row__icon svg,
.af-promo-card__icon svg,
.af-product-summary__icon svg,
.af-pay-method__icon svg,
.af-transaction-card__icon svg {
    width: 24px;
    height: 24px;
}

.af-quick-card strong,
.af-action-card strong,
.af-menu-row__copy strong,
.af-product-summary__copy strong,
.af-referral-balance strong,
.af-link-card strong,
.af-how-card strong,
.af-list-block h3,
.af-section-title,
.af-pay-method__copy strong,
.af-top-three__item strong,
.af-leader-card__copy strong,
.af-transaction-card__copy strong,
.af-order-card__copy strong,
.af-position-card__copy strong,
.af-profile-copy strong {
    margin: 0;
    font-size: 17px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.af-quick-card span,
.af-menu-row__copy span,
.af-product-summary__copy span,
.af-stat-card span,
.af-info-row span,
.af-summary-card__row span,
.af-pay-method__copy span,
.af-profile-copy span,
.af-profile-copy em,
.af-referral-balance span,
.af-leader-card__copy span,
.af-top-three__item span,
.af-transaction-card__copy span,
.af-order-card__stamp span,
.af-order-card__stamp small,
.af-step-item span,
.af-referral-row__copy span,
.af-link-card__box,
.af-note-card,
.af-note-banner {
    color: var(--af-muted);
    font-size: 14px;
    line-height: 1.36;
}

.af-contest-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    text-align: left;
    background: linear-gradient(135deg, rgba(247, 212, 81, 0.18), rgba(247, 212, 81, 0.06));
}

:root[data-theme="dark"] .af-contest-card {
    background: linear-gradient(135deg, rgba(247, 212, 81, 0.12), rgba(247, 212, 81, 0.04));
}

.af-contest-card__media {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(247, 212, 81, 0.12);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.af-contest-card__media img,
.af-contest-detail__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.af-contest-card__placeholder,
.af-contest-detail__media span {
    color: var(--af-accent);
}

.af-contest-card__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    text-align: left;
}

.af-contest-card__copy strong {
    font-size: 18px;
    line-height: 1.12;
    word-break: break-word;
}

.af-contest-card__copy span {
    color: var(--af-muted);
    font-size: 14px;
    line-height: 1.32;
    word-break: break-word;
}

.af-contest-card__copy em,
.af-contest-card__copy b {
    display: block;
    font-style: normal;
    text-align: left;
}

.af-contest-card__copy em {
    color: var(--af-muted);
    font-size: 12px;
}

.af-contest-card__copy b {
    color: var(--af-accent);
    font-size: 14px;
    font-weight: 700;
}

.af-row-stack,
.af-list-stack,
.af-field-stack,
.af-copy-stack,
.af-pay-methods,
.af-plan-stack,
.af-radio-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.af-field-stack--air {
    gap: 10px;
}

.af-menu-row,
.af-pay-method,
.af-referral-row,
.af-transaction-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 92px;
    padding: 18px;
    border-radius: var(--af-radius-lg);
    border: 1px solid var(--af-line);
    background: var(--af-surface);
    text-align: left;
}

.af-transaction-card {
    min-height: 80px;
    padding: 12px 14px;
    border-radius: 16px;
}

.af-transaction-card .af-transaction-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.af-transaction-card__copy strong {
    font-size: 15px;
    line-height: 1.14;
}

.af-transaction-card__copy span {
    font-size: 12px;
}

.af-transaction-card__value {
    font-size: 15px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.af-menu-row__copy,
.af-pay-method__copy,
.af-transaction-card__copy,
.af-referral-row__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.af-menu-row__arrow {
    color: var(--af-muted);
    flex-shrink: 0;
}

.af-action-card {
    min-height: 154px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 22px 20px;
}

.af-action-card.is-active {
    background: var(--af-accent-card);
    border-color: rgba(247, 212, 81, 0.28);
    color: #17140f;
}

.af-action-card.is-active .af-action-card__badge {
    background: rgba(17, 14, 10, 0.09);
    color: #17140f;
}

.af-action-card.is-outlined {
    box-shadow: inset 0 0 0 1px rgba(247, 212, 81, 0.44);
}

.af-action-card[data-action="open-stars-buy-sheet"],
.af-action-card[data-action="open-ton-buy-sheet"],
.af-action-card.is-active[data-action="open-stars-buy-sheet"],
.af-action-card.is-active[data-action="open-ton-buy-sheet"] {
    background: var(--af-accent-card);
    border-color: rgba(247, 212, 81, 0.28);
    color: #17140f;
}

.af-action-card[data-action="open-stars-buy-sheet"] .af-action-card__badge,
.af-action-card[data-action="open-ton-buy-sheet"] .af-action-card__badge,
.af-action-card.is-active[data-action="open-stars-buy-sheet"] .af-action-card__badge,
.af-action-card.is-active[data-action="open-ton-buy-sheet"] .af-action-card__badge {
    background: rgba(23, 20, 15, 0.14);
    color: #17140f;
}

.af-action-card[data-action="open-stars-sell-sheet"],
.af-action-card[data-action="open-ton-sell-sheet"],
.af-action-card.is-active[data-action="open-stars-sell-sheet"],
.af-action-card.is-active[data-action="open-ton-sell-sheet"] {
    background: var(--af-surface);
    border-color: var(--af-line);
    color: var(--af-text);
    box-shadow: none;
}

.af-action-card[data-action="open-stars-sell-sheet"] .af-action-card__badge,
.af-action-card[data-action="open-ton-sell-sheet"] .af-action-card__badge {
    background: rgba(247, 212, 81, 0.12);
    color: var(--af-accent);
}

.af-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 12px;
    min-height: 122px;
    text-align: center;
}

.af-stat-card strong {
    font-size: 18px;
    line-height: 1.04;
    word-break: break-word;
}

.af-stat-card strong.fit-sm {
    font-size: 17px;
}

.af-stat-card strong.fit-xs,
.af-stat-card strong.fit-xxs {
    font-size: 15px;
}

.af-stat-card span {
    text-align: center;
}

.af-info-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--af-surface);
}

.af-info-row,
.af-summary-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.af-info-row strong,
.af-summary-card__row strong {
    text-align: right;
    font-size: 15px;
    line-height: 1.28;
}

.af-status-pill {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.af-status-pill.is-completed {
    color: var(--af-success);
}

.af-status-pill.is-pending {
    color: var(--af-warning);
}

.af-status-pill.is-cancelled {
    color: var(--af-danger);
}

.af-product-summary__status {
    display: block;
    margin-top: 4px;
    color: inherit !important;
}

.af-mini-ton-rate {
    gap: 10px;
}

.af-mini-ton-rate__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.af-mini-ton-rate__row span {
    color: var(--af-muted);
    font-size: 14px;
}

.af-mini-ton-rate__row strong {
    font-size: 15px;
}

.af-section-card {
    padding: 18px;
}

.af-section-title {
    margin-bottom: 12px;
}

.af-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.af-field-group--tight {
    gap: 10px;
}

.af-field-label {
    color: var(--af-muted);
    font-size: 14px;
    line-height: 1.2;
}

.af-input,
.af-self-btn,
.af-toggle-row__item,
.af-choice-btn,
.af-primary-btn,
.af-secondary-btn,
.af-pay-method,
.af-radio-card,
.af-plan-card {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.af-input {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--af-line);
    background: var(--af-surface-2);
}

.af-input:focus-within:not(.is-invalid),
.af-textarea:focus-within:not(.is-invalid) {
    border-color: rgba(247, 212, 81, 0.55);
    box-shadow: 0 0 0 2px rgba(247, 212, 81, 0.16);
}

.af-input.is-invalid {
    border-color: rgba(255, 90, 87, 0.92);
    box-shadow: 0 0 0 2px rgba(255, 90, 87, 0.14);
    animation: af-field-shake 240ms ease;
}

.af-input input {
    width: 100%;
    min-width: 0;
    font-size: 18px;
    line-height: 1.2;
    color: var(--af-text);
}

.af-input input::placeholder {
    color: var(--af-muted);
}

.af-textarea {
    width: 100%;
    display: block;
    border-radius: 16px;
    border: 1px solid var(--af-line);
    background: var(--af-surface-2);
    padding: 12px 14px;
}

.af-textarea textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    font-size: 15px;
    line-height: 1.45;
    color: var(--af-text);
}

.af-textarea textarea::placeholder {
    color: rgba(175, 178, 185, 0.42);
}

.af-input input:focus,
.af-input input:focus-visible,
.af-textarea textarea:focus,
.af-textarea textarea:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: transparent;
}

.af-market-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--af-muted);
    font-size: 12px;
    line-height: 1.45;
}

.af-market-message-meta strong {
    flex-shrink: 0;
    color: var(--af-accent);
    font-size: 13px;
}

.af-input__leading {
    display: inline-flex;
    color: var(--af-accent);
    flex-shrink: 0;
}

.af-input__leading svg {
    width: 20px;
    height: 20px;
}

.af-input--recipient input,
#stars-recipient,
#premium-recipient {
    color: var(--af-text);
    background-image: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: var(--af-text);
    caret-color: var(--af-text);
}

.af-input--recipient {
    gap: 0;
}

.af-input--recipient input::placeholder,
#stars-recipient::placeholder,
#premium-recipient::placeholder {
    color: rgba(175, 178, 185, 0.38);
    opacity: 1;
}

.af-recipient-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.af-recipient-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 10px;
}

.af-self-btn {
    min-height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
    color: var(--af-text);
    font-size: 16px;
    font-weight: 600;
}

.af-self-btn.is-active {
    background: rgba(247, 212, 81, 0.12);
    border-color: rgba(247, 212, 81, 0.38);
    color: var(--af-accent);
}

.af-input--recipient.is-invalid {
    border-color: rgba(255, 90, 87, 0.92);
    box-shadow: 0 0 0 2px rgba(255, 90, 87, 0.14);
    animation: af-field-shake 240ms ease;
}

.af-recipient-meta {
    font-size: 12px;
    color: var(--af-muted);
    padding-left: 2px;
}

.af-field-meta {
    font-size: 12px;
    color: var(--af-muted);
    padding-left: 2px;
}

.af-recipient-meta.is-error {
    color: #ff615d;
}

.af-field-meta.is-error {
    color: #ff615d;
}

.af-recipient-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
}

.af-recipient-preview.is-enter {
    animation: af-recipient-rise 320ms var(--af-ease);
}

.af-recipient-preview__avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--af-accent-card);
    color: #19150f;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.af-recipient-preview__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.af-recipient-preview__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.af-recipient-preview__copy strong {
    font-size: 15px;
}

.af-recipient-preview__copy span {
    color: var(--af-muted);
    font-size: 13px;
}

.af-choice-grid {
    display: grid;
    grid-template-columns: repeat(var(--af-grid-columns, 3), minmax(0, 1fr));
    gap: 10px;
}

.af-choice-btn {
    min-height: 52px;
    padding: 0 12px;
    border-radius: 16px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
    color: var(--af-text);
    font-size: 16px;
    font-weight: 600;
}

.af-choice-btn,
.af-toggle-row__item,
.af-pay-method {
    position: relative;
    overflow: hidden;
}

.af-choice-btn::after,
.af-toggle-row__item::after,
.af-pay-method::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(247, 212, 81, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.af-choice-btn.is-active {
    background: rgba(247, 212, 81, 0.12);
    border-color: rgba(247, 212, 81, 0.55);
    color: var(--af-accent);
    box-shadow: inset 0 0 0 1px rgba(247, 212, 81, 0.4);
}

.af-choice-btn.is-active::after,
.af-choice-btn.is-entering::after,
.af-toggle-row__item.is-active::after,
.af-toggle-row__item.is-entering::after,
.af-pay-method.is-active::after,
.af-pay-method.is-entering::after {
    opacity: 1;
}

.af-choice-btn.is-entering,
.af-toggle-row__item.is-entering,
.af-pay-method.is-entering {
    background: rgba(247, 212, 81, 0.12);
    border-color: rgba(247, 212, 81, 0.55);
    color: var(--af-accent);
    box-shadow: inset 0 0 0 1px rgba(247, 212, 81, 0.4);
}

.af-choice-btn.is-leaving,
.af-toggle-row__item.is-leaving,
.af-pay-method.is-leaving {
    background: var(--af-surface);
    border-color: var(--af-line);
    color: var(--af-text);
    box-shadow: none;
}

.af-choice-btn.is-leaving::after,
.af-toggle-row__item.is-leaving::after,
.af-pay-method.is-leaving::after {
    opacity: 0;
}

.af-toggle-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.af-toggle-row__item {
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.af-toggle-row__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--af-accent);
    flex-shrink: 0;
}

.af-toggle-row__icon svg {
    width: 18px;
    height: 18px;
}

.af-toggle-row__item.is-active {
    border-color: rgba(247, 212, 81, 0.55);
    background: rgba(247, 212, 81, 0.12);
    color: var(--af-accent);
}

.af-summary-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.af-summary-card--checkout {
    gap: 9px;
}

.af-summary-card__divider {
    height: 1px;
    background: var(--af-line);
}

.af-summary-card__row.is-total strong {
    font-size: 18px;
    color: var(--af-text);
}

.af-summary-card--checkout .af-summary-card__row.is-total strong {
    font-size: clamp(22px, 6.5vw, 28px);
    line-height: 1;
    letter-spacing: -0.03em;
}

.af-summary-old-total {
    margin-top: -2px;
    text-align: right;
    color: var(--af-muted);
    font-size: 14px;
    line-height: 1;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.af-summary-promo {
    margin: 0 -14px;
    padding: 8px 14px;
    border-block: 1px solid rgba(247, 212, 81, 0.24);
    background: linear-gradient(135deg, rgba(247, 212, 81, 0.13), rgba(247, 212, 81, 0.05));
}

.af-summary-promo__head,
.af-summary-promo__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.af-summary-promo__head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.af-summary-promo__head span svg {
    width: 16px;
    height: 16px;
}

.af-summary-promo__head strong {
    color: var(--af-accent);
    font-size: 14px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.af-summary-promo__code {
    margin: 4px 0 6px;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--af-accent);
}

.af-summary-promo__meta span {
    color: var(--af-muted);
    font-size: 12px;
}

.af-summary-promo__meta strong {
    color: var(--af-accent);
    font-size: 13px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.af-summary-card--checkout .af-summary-card__row span {
    font-size: 13px;
}

.af-summary-card--checkout .af-summary-card__row strong {
    font-size: 14px;
}

.af-summary-card--checkout .af-summary-card__divider {
    margin-top: 2px;
}

.af-note-banner,
.af-note-card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(247, 212, 81, 0.14);
    background: rgba(247, 212, 81, 0.08);
}

.af-discount-ok {
    margin-top: 2px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(8, 179, 87, 0.36);
    background: linear-gradient(135deg, rgba(8, 179, 87, 0.24), rgba(8, 179, 87, 0.13));
    color: #8ee8bb;
}

.af-discount-ok__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0dd06d;
}

.af-discount-ok__title svg {
    width: 20px;
    height: 20px;
}

.af-discount-ok span {
    display: block;
    color: rgba(214, 255, 231, 0.9);
}

.af-primary-btn,
.af-secondary-btn {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.af-primary-btn {
    background: var(--af-accent-card);
    color: #17140f;
    border: 1px solid rgba(247, 212, 81, 0.24);
}

.af-primary-btn.is-soft {
    background: rgba(247, 212, 81, 0.65);
}

.af-promo-apply-btn {
    color: rgba(23, 20, 15, 0.86);
    border-color: rgba(247, 212, 81, 0.24);
    background: rgba(247, 212, 81, 0.58);
}

.af-promo-apply-btn.is-ready {
    background: var(--af-accent-card);
    color: #17140f;
    border-color: rgba(247, 212, 81, 0.34);
    box-shadow: 0 8px 20px rgba(247, 212, 81, 0.14);
}

.af-primary-btn--small {
    width: auto;
    min-width: 140px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
    border-radius: 14px;
}

.af-secondary-btn {
    background: var(--af-surface);
    border: 1px solid var(--af-line);
    color: var(--af-text);
}

.af-full-btn {
    margin-top: 2px;
}

.af-plan-card,
.af-radio-card {
    width: 100%;
    display: flex;
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
    text-align: left;
}

.af-plan-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(247, 212, 81, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.af-plan-card.is-active,
.af-plan-card.is-entering,
.af-radio-card.is-active {
    border-color: rgba(247, 212, 81, 0.55);
    background: rgba(247, 212, 81, 0.08);
}

.af-plan-card.is-active::after,
.af-plan-card.is-entering::after {
    opacity: 1;
}

.af-plan-card.is-leaving {
    border-color: var(--af-line);
    background: var(--af-surface);
}

.af-plan-card.is-leaving::after {
    opacity: 0;
}

.af-plan-card__left,
.af-plan-card__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.af-plan-card__left {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.af-plan-card__left strong {
    font-size: 16px;
}

.af-plan-card__left small,
.af-plan-card__right em {
    font-size: 13px;
    line-height: 1.3;
    color: var(--af-muted);
}

.af-plan-card__right .af-plan-card__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(247, 212, 81, 0.2);
    color: var(--af-accent);
    font-size: 13px;
    font-weight: 700;
}

.af-plan-card__right .af-plan-card__manual {
    color: var(--af-accent);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.af-check-dot {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--af-line-strong);
    color: transparent;
    flex-shrink: 0;
    background: transparent;
    transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.af-check-dot__icon {
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 180ms ease, transform 220ms var(--af-ease);
}

.af-check-dot svg {
    width: 14px;
    height: 14px;
}

.af-check-dot.is-active,
.af-plan-card.is-entering .af-check-dot {
    background: var(--af-accent);
    border-color: var(--af-accent);
    color: #17140f;
}

.af-check-dot.is-active .af-check-dot__icon,
.af-plan-card.is-entering .af-check-dot__icon {
    opacity: 1;
    transform: scale(1);
}

.af-plan-card.is-leaving .af-check-dot {
    background: transparent;
    border-color: var(--af-line-strong);
    color: transparent;
}

.af-plan-card.is-leaving .af-check-dot__icon {
    opacity: 0;
    transform: scale(0.72);
}

.af-product-summary,
.af-amount-card,
.af-position-card,
.af-link-card,
.af-how-card,
.af-order-summary,
.af-copy-card {
    background: var(--af-surface);
}

.af-product-summary {
    display: flex;
    align-items: center;
    gap: 14px;
}

.af-product-summary--checkout {
    gap: 10px;
    padding: 12px 14px;
}

.af-product-summary__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.af-product-summary--checkout .af-product-summary__copy strong {
    font-size: 14px;
    line-height: 1.2;
}

.af-product-summary--checkout .af-product-summary__copy span {
    font-size: 12px;
}

.af-amount-card {
    text-align: center;
}

.af-amount-card span {
    color: var(--af-muted);
    font-size: 15px;
}

.af-amount-card strong {
    display: block;
    margin-top: 6px;
    font-size: 30px;
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.af-pay-method.is-active {
    border-color: rgba(247, 212, 81, 0.55);
    background: rgba(247, 212, 81, 0.1);
}

.af-pay-method.is-disabled {
    opacity: 0.45;
}

.af-pay-method__soon {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(247, 212, 81, 0.12);
    color: var(--af-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.af-copy-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--af-line);
}

.af-copy-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.af-copy-card__body span {
    color: var(--af-muted);
    font-size: 13px;
}

.af-copy-card__mono {
    font-size: 15px;
    line-height: 1.32;
    word-break: break-all;
}

.af-copy-card__btn {
    width: 110px;
    min-width: 110px;
    min-height: 46px;
    border-radius: 14px;
}

.af-inline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.af-ton-sell-flow-summary .af-summary-card {
    border-color: rgba(247, 212, 81, 0.42);
    background: linear-gradient(135deg, rgba(247, 212, 81, 0.16), rgba(247, 212, 81, 0.08));
}

.af-ton-sell-flow-summary .af-summary-card__row span {
    color: var(--af-muted);
}

.af-ton-sell-flow-summary .af-summary-card__row strong,
.af-ton-sell-flow-summary .af-summary-card__row.is-total strong {
    color: var(--af-text);
}

.af-ton-sell-flow-summary .af-summary-card__divider {
    background: rgba(247, 212, 81, 0.4);
}

.af-inline-actions .af-secondary-btn.af-ton-sell-check-btn {
    background: rgba(22, 177, 90, 0.14);
    border-color: rgba(22, 177, 90, 0.9);
    color: #09b455;
}

.af-inline-actions .af-secondary-btn.af-ton-sell-cancel-btn {
    background: rgba(255, 59, 48, 0.14);
    border-color: rgba(255, 59, 48, 0.92);
    color: #ff3b30;
}

.af-ton-sell-flow-copy .af-copy-card {
    align-items: center;
}

.af-ton-sell-flow-copy .af-copy-card__btn {
    align-self: center;
}

.af-market-grid {
    display: grid;
    gap: 12px;
}

.af-market-meta {
    margin-top: 2px;
    color: var(--af-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.af-market-grid.is-gifts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.af-market-grid.is-nft {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.af-market-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
}

.af-market-card--gift {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease;
}

.af-market-card--gift:active {
    transform: scale(0.985);
}

.af-market-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(247, 212, 81, 0.94);
    color: #241f16;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.af-market-card__art {
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    background: rgba(247, 212, 81, 0.12);
    display: grid;
    place-items: center;
    font-size: 46px;
}

.af-market-card--gift .af-market-card__art {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 72%),
        linear-gradient(135deg, var(--gift-accent, #6d5df6), #24211d);
    color: #fff7da;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.af-market-card__art img,
.af-market-card__art video,
.af-market-art-tgs,
.af-market-detail__art img,
.af-market-detail__art video,
.af-market-detail__art .af-market-art-tgs {
    width: 72%;
    height: 72%;
    display: block;
}

.af-market-card__art img,
.af-market-card__art video,
.af-market-detail__art img,
.af-market-detail__art video {
    object-fit: contain;
}

.af-market-art-tgs {
    position: relative;
    display: grid;
    place-items: center;
}

.af-market-art-tgs__stage,
.af-market-art-tgs__stage > svg {
    width: 100%;
    height: 100%;
}

.af-market-art-emoji {
    display: inline-block;
    line-height: 1;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.18));
}

.af-market-art-fallback[hidden] {
    display: none !important;
}

.af-market-art-tgs:not(.is-fallback) .af-market-art-fallback {
    display: none !important;
}

.af-market-art-icon svg {
    width: 32px;
    height: 32px;
}

.af-market-card strong {
    font-size: 13px;
    line-height: 1.2;
}

.af-market-card__price {
    color: #f2d159;
    font-size: 12px;
    font-weight: 700;
}

.af-about-card p {
    margin: 10px 0 0;
    color: var(--af-muted);
    font-size: 14px;
    line-height: 1.52;
}

.af-market-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.af-market-confirm-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--af-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 74%),
        var(--af-surface);
}

.af-market-confirm-card__art {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gift-accent, #6d5df6), #27231d);
    color: #fff3c7;
    font-size: 28px;
}

.af-market-confirm-card__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.af-market-confirm-card__copy strong {
    font-size: 16px;
    line-height: 1.18;
}

.af-market-confirm-card__copy span {
    color: var(--af-muted);
    font-size: 13px;
}

.af-market-detail__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 20px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(247, 212, 81, 0.14) 0%, transparent 48%),
        var(--af-surface-2);
    border: 1px solid var(--af-line);
    text-align: center;
}

.af-market-detail__art {
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--gift-accent, #6d5df6), #2a2721);
    color: #fff4cc;
    font-size: 48px;
}

.af-market-detail__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(247, 212, 81, 0.16);
    border: 1px solid rgba(247, 212, 81, 0.24);
    color: #f2d159;
    font-size: 12px;
    font-weight: 700;
}

.af-market-detail__hero strong {
    font-size: 30px;
    line-height: 1.1;
}

.af-market-detail__hero span {
    color: #f2d159;
    font-size: 16px;
    font-weight: 700;
}

.af-market-note-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(247, 212, 81, 0.08);
    border-color: rgba(247, 212, 81, 0.12);
}

.af-market-note-card__icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(247, 212, 81, 0.12);
    color: #f2d159;
}

.af-market-note-card__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.af-market-note-card__copy strong {
    font-size: 15px;
}

.af-market-note-card__copy span {
    color: var(--af-muted);
    font-size: 14px;
    line-height: 1.45;
}

.af-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.af-profile-avatar {
    width: 98px;
    height: 98px;
    display: grid;
    place-items: center;
    border-radius: 30px;
    background: var(--af-accent-card);
    color: #17140f;
    font-size: 34px;
    font-weight: 700;
    flex-shrink: 0;
}

.af-profile-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    text-align: left;
}

.af-profile-copy strong {
    font-size: 22px;
}

.af-profile-copy span,
.af-profile-copy em {
    font-style: normal;
    font-size: 15px;
}

.af-promo-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0;
}

.af-promo-card.af-promo-card--compact {
    padding: 14px;
}

.af-promo-card.af-promo-card--compact > * + * {
    margin-top: 9px;
}

.af-promo-card.af-promo-card--compact .af-promo-card__head {
    gap: 10px;
}

.af-promo-card.af-promo-card--compact .af-promo-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.af-promo-card.af-promo-card--compact .af-promo-card__head strong {
    font-size: 15px;
    line-height: 1.14;
}

.af-promo-card.af-promo-card--compact .af-promo-card__head span {
    font-size: 13px;
    line-height: 1.3;
}

.af-promo-card.af-promo-card--compact .af-input {
    min-height: 50px;
    border-radius: 14px;
    padding: 0 14px;
}

.af-promo-card.af-promo-card--compact .af-input input {
    font-size: 16px;
}

.af-promo-card.af-promo-card--compact .af-primary-btn {
    min-height: 50px;
    border-radius: 15px;
    font-size: 17px;
}

.af-promo-card__head div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.af-promo-active {
    margin-bottom: 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(247, 212, 81, 0.34);
    background: linear-gradient(135deg, rgba(247, 212, 81, 0.14), rgba(247, 212, 81, 0.06));
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.af-promo-active.af-promo-active--compact {
    padding: 11px 12px;
    border-radius: 14px;
    gap: 6px;
}

:root[data-theme="dark"] .af-promo-active {
    background: linear-gradient(135deg, rgba(247, 212, 81, 0.2), rgba(247, 212, 81, 0.08));
}

.af-promo-active__head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.af-promo-active__head strong {
    font-size: 16px;
}

.af-promo-active.af-promo-active--compact .af-promo-active__head strong {
    font-size: 14px;
}

.af-promo-active__check {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(247, 212, 81, 0.2);
    color: var(--af-accent);
    flex-shrink: 0;
}

.af-promo-active__check svg {
    width: 14px;
    height: 14px;
}

.af-promo-active.af-promo-active--compact .af-promo-active__check {
    width: 18px;
    height: 18px;
}

.af-promo-active.af-promo-active--compact .af-promo-active__check svg {
    width: 12px;
    height: 12px;
}

.af-promo-active__code {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.af-promo-active__code b {
    margin: 0;
    font-size: 18px;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--af-accent);
    font-weight: 700;
}

.af-promo-active.af-promo-active--compact .af-promo-active__code b {
    font-size: 16px;
}

.af-promo-active__code em {
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    color: var(--af-accent);
}

.af-promo-active.af-promo-active--compact .af-promo-active__code em {
    font-size: 14px;
}

.af-promo-active p {
    margin: 0;
    color: var(--af-muted);
    font-size: 14px;
}

.af-promo-active.af-promo-active--compact p {
    font-size: 12px;
    line-height: 1.3;
}

.af-settings-block h3,
.af-list-block h3 {
    margin: 0 0 2px;
}

.af-referral-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--af-accent-card);
    color: #17140f;
}

.af-referral-balance .af-primary-btn--small {
    background: rgba(35, 31, 32, 0.2);
    color: #231f20;
    border-color: rgba(255, 255, 255, 0.14);
}

.af-referral-balance__copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.af-referral-balance__label {
    color: #231f20 !important;
    font-weight: 600;
}

.af-link-card__box {
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--af-line);
    background: var(--af-surface-2);
    word-break: break-all;
}

.af-how-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.af-step-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.af-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--af-surface-2);
    border: 1px solid var(--af-line);
}

.af-step-item b {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(247, 212, 81, 0.12);
    color: var(--af-accent);
    flex-shrink: 0;
}

.af-referral-row__avatar {
    background: var(--af-accent-card);
    color: #17140f;
    font-weight: 700;
}

.af-top-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.af-top-three__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.af-top-three__item.is-rank-1 {
    padding-bottom: 10px;
}

.af-top-three__badge {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(247, 212, 81, 0.12);
    font-size: 32px;
}

.af-top-three__item.is-rank-1 .af-top-three__badge {
    width: 92px;
    height: 92px;
}

.af-top-three__item strong {
    font-size: 16px;
}

.af-top-three__item span {
    font-size: 13px;
}

.af-top-three__item em {
    font-style: normal;
    color: var(--af-accent);
    font-size: 14px;
    font-weight: 700;
}

.af-leader-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
}

.af-leader-card.is-top {
    background: rgba(247, 212, 81, 0.08);
    border-color: rgba(247, 212, 81, 0.24);
}

.af-leader-card__left,
.af-order-card__top,
.af-order-card__bottom {
    display: flex;
    align-items: center;
    gap: 12px;
}

.af-leader-card__left {
    min-width: 0;
    flex: 1;
}

.af-leader-card__rank {
    width: 40px;
    min-width: 40px;
    text-align: center;
    color: var(--af-muted);
    font-size: 20px;
}

.af-leader-card__copy,
.af-order-card__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.af-leader-card__copy strong {
    font-size: 15px;
    word-break: break-word;
}

.af-leader-card__copy span {
    font-size: 13px;
}

.af-leader-card__right {
    text-align: right;
}

.af-leader-card__right strong {
    display: block;
    font-size: 15px;
    line-height: 1.18;
}

.af-leader-card__right span {
    color: var(--af-muted);
    font-size: 12px;
}

.af-position-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(247, 212, 81, 0.18), rgba(247, 212, 81, 0.07));
}

.af-position-card__avatar {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--af-accent-card);
    color: #17140f;
    font-weight: 700;
    flex-shrink: 0;
}

.af-position-card__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.af-position-card__meta {
    text-align: right;
}

.af-position-card__meta strong {
    display: block;
    font-size: 22px;
}

.af-position-card__meta span {
    color: var(--af-muted);
    font-size: 14px;
}

.af-order-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 20px;
    border: 1px solid var(--af-line);
    background: var(--af-surface);
}

.af-order-card[data-action] {
    cursor: pointer;
}

.af-order-card__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(247, 212, 81, 0.12);
    color: var(--af-accent);
    flex-shrink: 0;
}

.af-order-card__icon svg {
    width: 22px;
    height: 22px;
}

.af-order-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.af-order-card__meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.af-order-card__copy strong {
    font-size: 15px;
}

.af-order-card__copy span {
    font-size: 13px;
    color: var(--af-muted);
}

.af-order-card__status {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.af-order-card__status.is-completed {
    color: var(--af-success);
}

.af-order-card__status.is-pending {
    color: var(--af-warning);
}

.af-order-card__status.is-cancelled {
    color: var(--af-danger);
}

.af-order-card__stamp {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.af-order-card__stamp span,
.af-order-card__stamp small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.af-order-card__stamp small {
    font-size: 12px;
    color: var(--af-muted);
}

.af-order-card__bottom strong {
    font-size: clamp(14px, 4.2vw, 16px);
    text-align: right;
    line-height: 1.16;
    flex-shrink: 0;
    transform: translateY(-7px);
}

.af-order-card__amount {
    margin: 0;
    font-size: clamp(14px, 4.2vw, 16px);
    text-align: right;
    line-height: 1.16;
}

.af-sheet-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--af-space-md);
    width: 100%;
    max-height: min(88vh, 860px);
    overflow: auto;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    background: var(--af-bg);
    box-shadow: 0 -28px 60px rgba(0, 0, 0, 0.22);
}

.af-sheet-card--tall {
    max-height: 90vh;
}

.af-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 0;
    padding-bottom: 8px;
}

.af-sheet-head.is-sticky {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, var(--af-bg) 0%, var(--af-bg) 78%, rgba(0, 0, 0, 0) 100%);
}

:root[data-theme="light"] .af-sheet-head.is-sticky {
    background: linear-gradient(180deg, var(--af-bg) 0%, var(--af-bg) 78%, rgba(255, 255, 255, 0) 100%);
}

.af-sheet-card--tall > .af-sheet-head.is-sticky {
    background: var(--af-bg);
    border-bottom: 1px solid var(--af-line);
    margin-bottom: 2px;
}

.af-sheet-head > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.af-sheet-head strong {
    font-size: 22px;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.af-sheet-head span {
    color: var(--af-muted);
    font-size: 14px;
    line-height: 1.34;
}

.app-main.af-view-enter > .af-screen,
.app-main.af-view-enter > .af-screen-block,
.app-main.af-view-enter > .af-profile-shell {
    animation: af-fade-in var(--af-anim-fast) var(--af-ease) both;
}

.app-main.af-view-enter :is(
    .af-card,
    .af-balance-card,
    .af-quick-card,
    .af-action-card,
    .af-stat-card,
    .af-menu-row,
    .af-pay-method,
    .af-transaction-card,
    .af-order-card,
    .af-market-card,
    .af-position-card,
    .af-leader-card,
    .af-referral-balance,
    .af-segment,
    .af-primary-btn,
    .af-secondary-btn
) {
    animation: af-rise-in var(--af-anim-mid) var(--af-ease) both;
}

.app-main.af-view-enter :is(.af-list-stack, .af-market-grid, .af-stat-grid, .af-quick-grid, .af-action-grid) > *:nth-child(1) { animation-delay: 20ms; }
.app-main.af-view-enter :is(.af-list-stack, .af-market-grid, .af-stat-grid, .af-quick-grid, .af-action-grid) > *:nth-child(2) { animation-delay: 45ms; }
.app-main.af-view-enter :is(.af-list-stack, .af-market-grid, .af-stat-grid, .af-quick-grid, .af-action-grid) > *:nth-child(3) { animation-delay: 70ms; }
.app-main.af-view-enter :is(.af-list-stack, .af-market-grid, .af-stat-grid, .af-quick-grid, .af-action-grid) > *:nth-child(4) { animation-delay: 95ms; }
.app-main.af-view-enter :is(.af-list-stack, .af-market-grid, .af-stat-grid, .af-quick-grid, .af-action-grid) > *:nth-child(5) { animation-delay: 120ms; }
.app-main.af-view-enter :is(.af-list-stack, .af-market-grid, .af-stat-grid, .af-quick-grid, .af-action-grid) > *:nth-child(6) { animation-delay: 145ms; }

.sheet-root.af-sheet-enter .sheet-backdrop {
    animation: af-fade-in var(--af-anim-fast) var(--af-ease) both;
}

.sheet-root.af-sheet-enter .sheet-shell {
    animation: af-sheet-up var(--af-anim-sheet) var(--af-ease) both;
}

.sheet-root.af-sheet-leave {
    pointer-events: none;
}

.sheet-root.af-sheet-leave .sheet-backdrop {
    animation: af-fade-out 220ms var(--af-ease) both;
}

.sheet-root.af-sheet-leave .sheet-shell {
    animation: af-sheet-down var(--af-anim-sheet) var(--af-ease) both;
}

.af-bottom-nav__item {
    transition: color var(--af-anim-fast) var(--af-ease), transform var(--af-anim-fast) var(--af-ease);
}

.af-bottom-nav__item:active {
    transform: scale(0.98);
}

.af-bottom-nav__item.is-active {
    transform: translateY(-1px);
}

.af-segment {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border-radius: 18px;
    background: var(--af-surface-2);
    border: 1px solid var(--af-line);
}

.af-segment:not(.af-segment--four):not(.af-segment--scroll) button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.af-segment:not(.af-segment--four):not(.af-segment--scroll) button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.af-segment--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.af-segment--scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px;
}

.af-segment button {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 14px;
    color: var(--af-muted);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.af-segment button.is-active {
    background: var(--af-surface);
    color: var(--af-text);
    box-shadow: inset 0 0 0 1px rgba(247, 212, 81, 0.45);
}

.af-segment--market-switch {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.af-segment--market-switch .af-segment__thumb {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc(50% - 10px);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(61, 58, 49, 0.96), rgba(43, 41, 37, 0.96));
    box-shadow:
        inset 0 0 0 1px rgba(247, 212, 81, 0.45),
        0 8px 18px rgba(0, 0, 0, 0.18);
    transition: transform 220ms var(--af-ease), box-shadow 220ms var(--af-ease);
    z-index: 0;
    pointer-events: none;
}

.af-segment--market-switch.is-nft .af-segment__thumb {
    transform: translateX(calc(100% + 8px));
}

.af-segment--market-switch button {
    position: relative;
    z-index: 1;
    background: transparent;
    box-shadow: none;
}

.af-segment--market-switch button.is-active {
    background: transparent;
    box-shadow: none;
}

.af-bottom-nav {
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--af-surface);
    border-top: 1px solid var(--af-line);
}

.af-bottom-nav__item {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--af-muted);
    transition: color 220ms var(--af-ease), opacity 220ms var(--af-ease);
    will-change: opacity, color;
}

.af-bottom-nav__icon svg {
    width: 22px;
    height: 22px;
}

.af-bottom-nav__item strong {
    font-size: 13px;
    line-height: 1.1;
    font-weight: 500;
}

.af-bottom-nav__icon,
.af-bottom-nav__item strong {
    transition: opacity 220ms var(--af-ease);
}

.af-bottom-nav__item.is-active {
    color: var(--af-accent);
}

.af-bottom-nav__item.is-entering {
    animation: af-bottom-nav-enter 240ms var(--af-ease) both;
}

.af-bottom-nav__item.is-leaving {
    animation: af-bottom-nav-leave 240ms var(--af-ease) both;
}

@keyframes af-bottom-nav-enter {
    0% {
        opacity: 0.64;
    }
    100% {
        opacity: 1;
    }
}

@keyframes af-bottom-nav-leave {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.68;
    }
}

.af-contest-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.af-contest-detail__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--af-line);
    background: rgba(247, 212, 81, 0.08);
    display: grid;
    place-items: center;
}

.af-contest-detail__prize {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.af-contest-detail__prize span {
    display: block;
    margin-bottom: 8px;
    color: var(--af-muted);
    font-size: 14px;
}

.af-contest-meta {
    gap: 12px;
}

.contest-inline-link {
    width: 100%;
    display: block;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    color: var(--af-text);
    font-size: 18px;
    line-height: 1.28;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: normal;
}

.contest-inline-link::-webkit-scrollbar {
    height: 0;
}

.af-radio-list {
    gap: 10px;
}

.af-radio-card {
    min-height: 58px;
}

.af-promo-card > * + *,
.af-settings-block > * + *,
.af-list-block > * + *,
.af-card.af-link-card > * + * {
    margin-top: var(--af-space-sm);
}

@media (max-width: 390px) {
    .app-main {
        padding: 0 14px;
    }

    .af-card,
    .af-quick-card,
    .af-action-card,
    .af-menu-row,
    .af-pay-method,
    .af-sheet-card,
    .af-order-card,
    .af-market-card,
    .af-stat-card {
        border-radius: 18px;
    }

    .af-balance-card {
        padding: 18px;
    }

    .af-quick-card,
    .af-action-card {
        min-height: 136px;
        padding: 18px;
    }

    .af-quick-card__icon,
    .af-action-card__badge,
    .af-stat-card__icon,
    .af-menu-row__icon,
    .af-promo-card__icon,
    .af-product-summary__icon,
    .af-pay-method__icon {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .af-hero__badge {
        width: 84px;
        height: 84px;
        border-radius: 24px;
    }

    .af-hero h1,
    .af-screen-title,
    .af-page-header__copy strong,
    .af-back-header strong {
        font-size: 21px;
    }

    .af-recipient-row {
        grid-template-columns: minmax(0, 1fr) 96px;
    }

    .af-market-grid.is-gifts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .af-market-card {
        padding: 12px;
    }

    .af-market-card strong {
        font-size: 12px;
    }

    .af-order-card__status {
        font-size: 12px;
    }

}

.af-sheet-card.af-sheet-card--payment.af-sheet-card--card-flow {
    background: linear-gradient(180deg, rgba(31, 31, 31, 0.98), rgba(24, 24, 24, 0.98));
    border-color: rgba(255, 255, 255, 0.08);
}

.af-card-payment-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.af-card-payment-shell__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.af-card-payment-shell__head strong {
    display: block;
    font-size: 31px;
    letter-spacing: -0.04em;
    line-height: 1.02;
    color: #f3f3f3;
}

.af-card-payment-shell__head span {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(244, 244, 245, 0.72);
}

.af-card-payment-shell__close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid rgba(247, 212, 81, 0.4);
    background: rgba(247, 212, 81, 0.08);
    color: #f7d451;
    flex-shrink: 0;
}

.af-card-payment-receipt .af-card-payment-shell__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.af-card-payment-shell__close svg {
    width: 14px;
    height: 14px;
}

.af-card-payment-panel,
.af-card-payment-receipt {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.af-card-payment-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.05);
}

.af-card-payment-timer span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: rgba(244, 244, 245, 0.74);
}

.af-card-payment-timer span svg {
    width: 14px;
    height: 14px;
    color: #f7d451;
}

.af-card-payment-timer strong {
    font-size: 23px;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #f7d451;
}

.af-card-payment-section-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(244, 244, 245, 0.52);
}

.af-card-payment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.af-card-payment-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    min-height: 76px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.af-card-payment-row.is-no-copy {
    grid-template-columns: auto minmax(0, 1fr);
}

.af-card-payment-row__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(244, 244, 245, 0.7);
}

.af-card-payment-row__icon svg {
    width: 14px;
    height: 14px;
}

.af-card-payment-row__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.af-card-payment-row__copy small {
    color: rgba(244, 244, 245, 0.5);
    font-size: 12px;
}

.af-card-payment-row__copy strong {
    color: #f5f5f5;
    font-size: 16px;
    line-height: 1.12;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.af-card-copy-btn {
    min-width: 58px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(247, 212, 81, 0.52);
    background: rgba(247, 212, 81, 0.08);
    color: #f7d451;
    font-size: 12px;
    font-weight: 600;
    padding: 0 10px;
}

.af-card-payment-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 13px;
    border-radius: 14px;
    border: 1px solid rgba(247, 212, 81, 0.2);
    background: rgba(247, 212, 81, 0.07);
}

.af-card-payment-info strong {
    color: #f6dda4;
    font-size: 13px;
}

.af-card-payment-info span,
.af-card-payment-info em {
    color: rgba(245, 243, 236, 0.72);
    font-size: 13px;
    line-height: 1.4;
    font-style: normal;
}

.af-card-payment-submit {
    min-height: 56px;
    border-radius: 17px;
    font-size: 20px;
    font-weight: 700;
}

.af-card-payment-cancel {
    min-height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.09);
    color: rgba(244, 244, 245, 0.9);
}

.af-card-payment-cancel svg {
    width: 13px;
    height: 13px;
}

.af-card-payment-receipt {
    position: relative;
    align-items: center;
    text-align: center;
}

.af-card-payment-receipt__badge {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4ad36b;
    background: linear-gradient(180deg, rgba(31, 77, 41, 0.58), rgba(25, 59, 34, 0.42));
    border: 1px solid rgba(89, 216, 117, 0.3);
}

.af-card-payment-receipt__badge svg {
    width: 30px;
    height: 30px;
}

.af-card-payment-receipt__badge.is-pending {
    color: #f4d451;
    background: linear-gradient(180deg, rgba(98, 84, 22, 0.58), rgba(84, 70, 18, 0.42));
    border-color: rgba(244, 212, 81, 0.28);
}

.af-card-payment-receipt__badge.is-error {
    color: #ff6b6b;
    background: linear-gradient(180deg, rgba(114, 36, 36, 0.58), rgba(88, 27, 27, 0.42));
    border-color: rgba(255, 107, 107, 0.28);
}

.af-card-payment-receipt__title {
    margin-top: 4px;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.05em;
    color: #f5f5f5;
}

.af-card-payment-receipt__subtitle {
    font-size: 14px;
    color: rgba(244, 244, 245, 0.7);
}

.af-card-payment-receipt-box {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.af-card-payment-receipt-box__label {
    text-align: left;
    padding: 11px 13px;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(244, 244, 245, 0.56);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.af-card-payment-receipt-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.af-card-payment-receipt-row:first-of-type {
    border-top: 0;
}

.af-card-payment-receipt-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: rgba(244, 244, 245, 0.7);
    text-align: left;
}

.af-card-payment-receipt-row span svg {
    width: 13px;
    height: 13px;
}

.af-card-payment-receipt-row strong {
    font-size: 13px;
    color: #f4f4f5;
    text-align: right;
}

.af-card-payment-total {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 15px;
    border: 1px solid rgba(74, 211, 107, 0.36);
    background: rgba(39, 94, 52, 0.34);
}

.af-card-payment-total span {
    font-size: 14px;
    color: rgba(221, 242, 227, 0.9);
}

.af-card-payment-total strong {
    color: #5ae57e;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.af-card-payment-total.is-pending {
    border-color: rgba(244, 212, 81, 0.34);
    background: rgba(98, 84, 22, 0.28);
}

.af-card-payment-total.is-pending span {
    color: rgba(250, 235, 176, 0.92);
}

.af-card-payment-total.is-pending strong {
    color: #f4d451;
}

.af-card-payment-total.is-error {
    border-color: rgba(255, 107, 107, 0.32);
    background: rgba(110, 33, 33, 0.3);
}

.af-card-payment-total.is-error span {
    color: rgba(255, 221, 221, 0.92);
}

.af-card-payment-total.is-error strong {
    color: #ff8b8b;
}

.af-card-payment-receipt-hint {
    width: 100%;
    text-align: left;
    font-size: 12px;
    color: rgba(244, 244, 245, 0.7);
}

@media (prefers-reduced-motion: reduce) {
    .app-main.af-view-enter > .af-screen,
    .app-main.af-view-enter > .af-screen-block,
    .app-main.af-view-enter > .af-profile-shell,
    .app-main.af-view-enter :is(.af-card, .af-balance-card, .af-quick-card, .af-action-card, .af-stat-card, .af-menu-row, .af-pay-method, .af-transaction-card, .af-order-card, .af-market-card, .af-position-card, .af-leader-card, .af-referral-balance, .af-segment, .af-primary-btn, .af-secondary-btn),
    .sheet-root.af-sheet-enter .sheet-backdrop,
    .sheet-root.af-sheet-enter .sheet-shell,
    .sheet-root.af-sheet-leave .sheet-backdrop,
    .sheet-root.af-sheet-leave .sheet-shell,
    .toast,
    .toast.is-leaving {
        animation: none !important;
    }
}

@media (max-width: 520px) {
    .af-card-payment-shell__head strong,
    .af-card-payment-receipt__title {
        font-size: 28px;
    }

    .af-card-payment-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 72px;
    }

    .af-card-copy-btn {
        grid-column: auto;
        justify-self: end;
        min-width: 54px;
        height: 30px;
        padding: 0 8px;
    }

    .af-card-payment-row__copy strong {
        font-size: 14px;
    }

    .af-card-payment-total strong {
        font-size: 21px;
    }
}

/* =================================================================
   POLISH & REFINEMENTS v2
   Performance, accessibility, micro-interactions
   ================================================================= */

/* Global rendering & touch polish */
html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
    touch-action: manipulation;
}

* {
    -webkit-tap-highlight-color: transparent;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* Remove iOS/Android native button styles for consistency */
button {
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}

/* Keyboard focus — visible only for keyboard users (not mouse/touch) */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--af-accent-strong, #f0c938);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Text selection */
::selection {
    background: var(--af-accent-soft, rgba(247, 212, 81, 0.35));
    color: var(--af-text, #211d18);
}

/* Smooth tap feedback for all clickable surfaces */
.af-btn,
.af-card-copy-btn,
.app-dock__item,
button[class*="af-"],
[role="button"] {
    transition:
        transform 140ms var(--af-ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
        opacity 140ms var(--af-ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
        background-color 180ms var(--af-ease, cubic-bezier(0.22, 0.61, 0.36, 1));
    will-change: transform;
}

.af-btn:active,
.af-card-copy-btn:active,
button[class*="af-"]:active,
[role="button"]:active {
    transform: scale(0.97);
}

/* Skeleton shimmer for loading states */
@keyframes afShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.af-skeleton {
    background: linear-gradient(
        90deg,
        var(--af-surface-2, #fbf8f3) 0%,
        var(--af-surface-3, #f1ede7) 50%,
        var(--af-surface-2, #fbf8f3) 100%
    );
    background-size: 200% 100%;
    animation: afShimmer 1.4s ease-in-out infinite;
    border-radius: var(--af-radius-sm, 13px);
}

:root[data-theme="dark"] .af-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .af-skeleton {
        animation: none;
    }
}

/* Hairline border crispness on retina */
@media (min-resolution: 2dppx) {
    .af-card,
    .af-row,
    .af-btn--outline {
        border-width: 0.5px;
    }
}

/* Safe-area for notched devices */
.app-shell {
    padding-top: var(--af-top-offset);
    padding-bottom: var(--af-bottom-offset);
}

/* Hide content on print (defensive) */
@media print {
    body {
        display: none !important;
    }
}
