.referral-section {
    position: relative; width: 100%;
    display: flex; align-items: stretch;
    background-size: 100% 100%;
    background-repeat: no-repeat; background-position: center;
    background-color: transparent;
    min-height: 106px; overflow: hidden;
}

.referral-box-left {
    flex-shrink: 0; width: 106px;
    display: flex; align-items: center; justify-content: center;
    padding: 6px;
}

.referral-box-left img {
    width: 100%; height: auto; max-height: 90px;
    object-fit: contain; object-position: center; display: block;
}

.referral-center {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 8px 4px; gap: 5px;
}

.referral-title {
    font-size: 0.6rem; color: #fff; font-weight: 700;
    text-align: center; line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0,0,0,.22);
    margin-bottom: 2px;
}

.referral-stats {
    width: 100%;
    background: rgba(0,40,120,.32);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 4px; padding: 4px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}

.referral-stats p {
    font-size: 0.625rem; color: #fff; font-weight: 600;
    text-align: center; white-space: nowrap;
}

.referral-box-right {
    flex-shrink: 0; width: 100px;
    background-size: 100% 100%; background-repeat: no-repeat;
    background-position: center;
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end;
    padding-bottom: 8px; gap: 5px;
}

.referral-amount {
    font-size: 1.25rem; font-weight: 700; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
    margin-top: auto; padding-top: 14px;
}

.referral-invite-btn {
    width: 90px; min-height: 28px;
    background-size: 100% 100%; background-repeat: no-repeat;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
}

.referral-invite-btn p {
    font-size: 0.5rem; font-weight: 700; color: #fff;
    text-align: center; line-height: 1.2; padding: 3px 5px; pointer-events: none;
}

.referral-invite-btn:active { filter: brightness(.9); }