.uap-reward {
    position: relative;
    box-sizing: border-box;
    margin: 36px 0 24px;
    padding: 28px 24px;
    border: 1px solid var(--uap-border-subtle, rgba(15, 23, 42, 0.08));
    border-radius: 20px;
    background:
        radial-gradient(circle at 94% 4%, rgba(255, 107, 107, .06), transparent 30%),
        radial-gradient(circle at 4% 100%, rgba(245, 158, 11, .04), transparent 27%),
        var(--uap-surface, #ffffff);
    color: #182230;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -4px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: var(--uap-transition, all 0.3s cubic-bezier(0.16, 1, 0.3, 1));
}

.uap-reward::before {
    position: absolute;
    top: -1px;
    right: 34px;
    left: 34px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, .4) 30%, rgba(255, 107, 107, .6) 52%, rgba(245, 158, 11, .35) 72%, transparent);
    content: '';
    pointer-events: none;
}

.uap-reward * {
    box-sizing: border-box;
}

.uap-reward__lead {
    margin: 0 0 16px;
    color: var(--uap-text-secondary, #64748b);
    font-size: 14.5px;
    line-height: 1.7;
    font-weight: 500;
}

.uap-reward__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: linear-gradient(135deg, #182230 0%, #0f172a 100%);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    transition: var(--uap-transition-bounce, all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1));
}

.uap-reward__button:hover {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
}

.uap-reward__button:active {
    transform: scale(0.96);
}

.uap-reward__button svg {
    width: 17px;
    height: 17px;
    fill: #ff6b6b;
    filter: drop-shadow(0 1px 2px rgba(255, 107, 107, 0.4));
    transition: transform 0.2s;
}

.uap-reward__button:hover svg {
    transform: scale(1.15);
}

.uap-reward__count {
    display: block;
    margin: 14px auto 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--uap-text-secondary, #64748b);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    cursor: default;
}

.uap-reward__avatars {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.uap-reward__count[hidden],
.uap-reward__avatars[hidden],
.uap-reward-anonymous[hidden] {
    display: none !important;
}

.uap-reward__avatars img {
    width: 32px;
    height: 32px;
    margin-left: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s, z-index 0.2s;
}

.uap-reward__avatars img:first-child {
    margin-left: 0;
}

.uap-reward__avatars img:hover {
    transform: scale(1.15) translateY(-2px);
    z-index: 2;
}

.uap-reward-modal[hidden] {
    display: none;
}

.uap-reward-modal {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.uap-reward-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.uap-reward-modal__dialog {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 32px 28px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: #ffffff;
    text-align: left;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05);
    animation: uapModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.uap-reward .uap-reward-modal .uap-reward-modal__dialog > .uap-reward-modal__title {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-family: inherit;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.02em;
    text-align: left;
}

.uap-reward .uap-reward-modal .uap-reward-modal__dialog .uap-reward-selection > .uap-reward-modal__hint {
    display: block;
    margin: 8px 0 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--uap-text-secondary, #64748b);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
}

.uap-reward-loading {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--uap-text-secondary, #64748b);
    font-size: 13.5px;
}

.uap-reward-loading[hidden] {
    display: none;
}

.uap-reward-loading__spinner {
    width: 26px;
    height: 26px;
    border: 2.5px solid #e2e8f0;
    border-top-color: var(--uap-primary, #4f46e5);
    border-radius: 50%;
    animation: uap-reward-spin .7s linear infinite;
}

.uap-reward-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--uap-transition, all 0.2s);
}

.uap-reward-modal__close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

.uap-reward-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.uap-reward-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 50px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: var(--uap-transition, all 0.2s cubic-bezier(0.16, 1, 0.3, 1));
    font-feature-settings: "tnum";
}

.uap-reward-amount:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
}

.uap-reward-amount.is-selected {
    border-color: var(--uap-primary, #4f46e5);
    background: rgba(var(--uap-primary-rgb, 79, 70, 229), 0.04);
    color: var(--uap-action-bg, #4f46e5);
    box-shadow: 0 0 0 2px var(--uap-primary, #4f46e5), 0 4px 14px rgba(var(--uap-primary-rgb, 79, 70, 229), 0.12);
    font-weight: 700;
}

.uap-reward-amount__currency {
    color: inherit;
    opacity: 0.75;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    transform: translateY(-1px);
}

.uap-reward-amount__value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.015em;
}

.uap-reward-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    color: #475569;
    font-size: 13.5px;
    font-weight: 500;
}

.uap-reward-custom__input {
    display: flex;
    align-items: center;
    width: 150px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    transition: var(--uap-transition, all 0.2s);
}

.uap-reward-custom__input:focus-within {
    border-color: var(--uap-primary, #4f46e5);
    box-shadow: 0 0 0 3.5px rgba(var(--uap-primary-rgb, 79, 70, 229), 0.12);
}

.uap-reward-custom__input b {
    margin-right: 6px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.uap-reward-custom input {
    width: 100%;
    height: 42px;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    line-height: 42px;
    font-feature-settings: "tnum";
}

.uap-reward-anonymous {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
    color: var(--uap-text-secondary, #64748b);
    font-size: 13px;
    font-weight: 500;
}

.uap-reward-anonymous input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--uap-primary, #4f46e5);
    border-radius: 4px;
    cursor: pointer;
}

.uap-reward-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.uap-reward-method {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 60px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    color: #334155;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}

.uap-reward-method:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
}

.uap-reward-method.is-selected {
    border-color: var(--uap-primary, #4f46e5);
    background: rgba(var(--uap-primary-rgb, 79, 70, 229), 0.03);
    box-shadow: 0 0 0 1px var(--uap-primary, #4f46e5), 0 4px 14px rgba(var(--uap-primary-rgb, 79, 70, 229), 0.08);
}

.uap-reward-method__icon {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #f1f5f9;
}

.uap-reward-method__icon svg {
    width: 32px;
    height: 32px;
}

.uap-reward-method__icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.uap-reward-method__icon--cash svg {
    width: 24px;
    height: 24px;
}

.uap-reward-method__info {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.uap-reward-method__name {
    overflow: hidden;
    color: #0f172a;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uap-reward-method__desc {
    overflow: hidden;
    margin-top: 2px;
    color: var(--uap-text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uap-reward-method__radio {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1.5px solid #cbd5e1;
    border-radius: 50%;
    background: #ffffff;
    transition: border-color .18s, background .18s;
}

.uap-reward-method.is-selected .uap-reward-method__radio {
    border-color: var(--uap-primary, #4f46e5);
    background: var(--uap-action-bg, #4f46e5);
}

.uap-reward-method.is-selected .uap-reward-method__radio::after {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #ffffff;
    content: '';
}

.uap-reward-submit {
    width: 100%;
    height: 48px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--uap-action-bg, #4f46e5) 0%, var(--uap-action-end, #5b55c7) 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(var(--uap-primary-rgb, 79, 70, 229), 0.25);
    transition: var(--uap-transition-bounce, all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1));
}

.uap-reward-submit:hover {
    background: linear-gradient(135deg, var(--uap-action-hover, #4338ca) 0%, var(--uap-action-bg, #4f46e5) 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 8px 24px -2px rgba(var(--uap-primary-rgb, 79, 70, 229), 0.35);
}

.uap-reward-submit:active {
    transform: scale(0.98);
}

.uap-reward-submit:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.uap-reward-message {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--uap-text-secondary, #64748b);
    font-size: 13px;
    text-align: center;
}

.uap-reward-message:empty {
    display: none;
}

.uap-reward-message.is-error {
    color: #dc2626;
}

.uap-reward-qr {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.uap-reward-checkout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    text-align: left;
}

.uap-reward .uap-payment-method-display.uap-reward-payment-method-display {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
}

.uap-reward-current-method__info {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.uap-reward-current-method__name {
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uap-reward-current-method__desc {
    margin-top: 2px;
    color: var(--uap-text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.35;
}

.uap-reward-switch-method {
    flex: none;
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--uap-transition, all 0.18s);
}

.uap-reward-switch-method:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.uap-reward-switch-method:focus-visible {
    outline: 2px solid var(--uap-primary, #4f46e5);
    outline-offset: 2px;
}

.uap-reward-switch-method:disabled {
    opacity: .45;
    cursor: wait;
}

.uap-reward-qr__image {
    display: inline-flex;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.uap-reward-qr__image img {
    display: block;
    width: 196px;
    height: 196px;
    object-fit: contain;
}

.uap-reward .uap-qrcode-tip {
    max-width: none;
    margin: 14px 0 0;
    color: var(--uap-text-secondary, #64748b);
    font-size: 13.5px;
    line-height: 1.6;
}

.uap-reward .uap-qrcode-tip strong {
    color: #0f172a;
    font-weight: 700;
}

.uap-reward .uap-payment-footer.uap-reward-payment-footer {
    position: relative;
    z-index: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--uap-text-secondary, #64748b);
}

.uap-reward .uap-status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.uap-reward .uap-status-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: var(--uap-primary, #4f46e5);
    border-radius: 50%;
    animation: uap-reward-spin .8s linear infinite;
}

.uap-reward .uap-status-text {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
}

.uap-reward .uap-status-tips {
    margin: 0;
    color: var(--uap-text-secondary, #64748b);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.uap-reward .uap-security-notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 3px 0 0;
    color: #059669;
    font-size: 12px;
    font-weight: 600;
    opacity: .9;
}

.uap-reward .uap-security-notice svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.uap-reward-qr.is-preparing .uap-reward-qr__image,
.uap-reward-qr.is-preparing .uap-qrcode-tip,
.uap-reward-qr.is-preparing .uap-status-tips {
    display: none;
}

.uap-reward-open {
    overflow: hidden;
}

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

@media (prefers-reduced-motion: reduce) {
    .uap-reward .uap-status-spinner,
    .uap-reward-loading__spinner {
        animation-duration: 1.6s;
    }
}

@media (max-width: 520px) {
    .uap-reward {
        padding: 22px 16px;
    }

    .uap-reward::before {
        right: 24px;
        left: 24px;
    }

    .uap-reward-modal {
        align-items: end;
        padding: 0;
    }

    .uap-reward-modal__dialog {
        width: 100%;
        max-height: 90vh;
        padding: 28px 20px;
        border-radius: 22px 22px 0 0;
    }

    .uap-reward-amounts {
        grid-template-columns: repeat(3, 1fr);
    }

    .uap-reward-qr__image img {
        width: min(196px, 52vw);
        height: min(196px, 52vw);
    }
}
