.referral-section {
    padding: 40px 0 80px!important
}

.referral-banner {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    align-items: center;
    gap: 30px;
    padding: 48px 56px;
    background: radial-gradient(ellipse at 85% 20%,#397aff55,transparent 60%),linear-gradient(120deg,#103fba,#0b247d);
    border-radius: 30px;
    overflow: hidden;
    color: white;
    position: relative
}

.referral-banner-copy {
    position: relative;
    z-index: 1
}

.referral-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #bcf5df;
    font-weight: 700;
    letter-spacing: .04em
}

.referral-eyebrow:before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a5f2dd
}

.referral-banner h2 {
    font-size: clamp(29px,3.4vw,44px);
    font-weight: 750;
    line-height: 1.45;
    margin: 15px 0 18px;
    color: #fff
}

.referral-banner p {
    font-size: 15px;
    line-height: 1.95;
    color: #e0eaff;
    margin: 0 0 24px
}

.referral-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    border-radius: 14px;
    background: #a5f2dd;
    color: #123c55!important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s,transform .2s
}

.referral-start:hover {
    background: #c4ffe9;
    transform: translateY(-2px)
}

.referral-banner small {
    display: block;
    font-size: 11px;
    line-height: 1.9;
    color: #c4d5fb;
    margin-top: 20px;
    max-width: 430px
}

.referral-banner-art {
    display: block;
    width: 100%;
    height: auto;
    max-width: 530px;
    justify-self: center
}

.referral-top-gift {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid #ad98ed77;
    border-radius: 12px;
    background: #eee8ff;
    color: #7852d0;
    flex-shrink: 0;
    transition: background .2s,transform .2s;
    text-decoration: none
}

.referral-top-gift:hover {
    background: #e0d4ff;
    transform: translateY(-2px)
}

.referral-top-gift svg {
    width: 23px;
    height: 23px
}

.referral-top-gift:focus-visible,.referral-start:focus-visible {
    outline: 3px solid #b39bff;
    outline-offset: 4px
}

.referral-wrap {
    max-width: 1180px!important
}

.referral-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px
}

.referral-heading h1 {
    font-size: clamp(28px,4vw,40px)
}

.referral-dashboard-top {
    display: grid;
    grid-template-columns: minmax(0,1fr) 280px;
    gap: 20px;
    margin-bottom: 24px
}

.referral-wrap section.referral-progress-card,.referral-balance-card {
    border: 1px solid #e1e6f2;
    border-radius: 22px;
    background: white;
    padding: 26px;
    min-width: 0
}

.referral-card-title {
    display: flex;
    align-items: center;
    gap: 16px
}

.referral-card-title h2 {
    font-size: 22px;
    margin: 0 0 6px;
    color: #182c51
}

.referral-card-title p {
    margin: 0;
    font-size: 12px;
    line-height: 1.8;
    color: #70809a
}

.referral-gift-emblem {
    display: grid;
    place-items: center;
    background: #f1ebff;
    border-radius: 16px;
    width: 60px;
    height: 60px;
    font-size: 31px;
    flex-shrink: 0
}

.referral-milestones {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    position: relative;
    margin: 28px 0 22px;
    padding-top: 0;
    isolation: isolate
}

.referral-progress-track {
    position: absolute;
    inset-inline: 10%;
    top: 51px;
    height: 6px;
    border-radius: 12px;
    background: #e9e5f1;
    z-index: -1;
    overflow: hidden
}

.referral-progress-track span {
    display: block;
    height: 100%;
    width: var(--referral-progress);
    border-radius: 12px;
    background: linear-gradient(90deg,#9371e6,#38bc8b)
}

.referral-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    gap: 7px
}

.referral-milestone-icon {
    font-size: 24px;
    line-height: 34px;
    filter: grayscale(1);
    opacity: .5
}

.referral-milestone-dot {
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 3px solid #cec6dd;
    border-radius: 50%;
    background: #fff;
    font-size: 10px;
    display: grid;
    place-items: center;
    line-height: 1
}

.referral-milestone b {
    font-size: 12px;
    color: #79859a
}

.referral-milestone small {
    font-size: 10px;
    color: #7f8da3;
    line-height: 1.6;
    overflow-wrap: anywhere
}

.referral-milestone.is-complete .referral-milestone-icon {
    filter: none;
    opacity: 1
}

.referral-milestone.is-complete .referral-milestone-dot {
    background: #2cb583;
    border-color: #2cb583;
    color: #fff
}

.referral-milestone.is-complete b {
    color: #176c53
}

.referral-goal,.referral-success {
    font-size: 12px;
    line-height: 1.9;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f5f3fc;
    color: #6b5d8b
}

.referral-success {
    background: #eafaf2;
    color: #1b7658
}

.referral-goal b {
    color: #7652d0
}

.referral-balance-card {
    background: linear-gradient(150deg,#182a4a,#11223f);
    border-color: #29405f;
    color: white
}

.referral-balance-card>span {
    font-size: 12px;
    color: #bdcee7
}

.referral-balance-card>strong {
    display: block;
    font-size: 38px;
    line-height: 1.5;
    color: #aff3dc;
    margin: 6px 0 18px;
    font-variant-numeric: tabular-nums
}

.referral-balance-card dl {
    margin: 0;
    display: grid;
    gap: 12px
}

.referral-balance-card dl>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px
}

.referral-balance-card dt {
    font-size: 11px;
    color: #b6c7df
}

.referral-balance-card dd {
    margin: 0;
    font-size: 14px;
    font-weight: 750
}

.referral-wrap section.referral-link-card h2,.referral-wrap section.referral-members h2,.referral-wrap section.referral-rules h2 {
    font-size: 20px;
    margin: 0 0 10px;
    color: #233d60
}

.referral-wrap section.referral-link-card p {
    font-size: 13px;
    line-height: 1.9;
    color: #72839c
}

.referral-link-control {
    display: flex;
    gap: 12px;
    margin-top: 20px
}

.referral-link-control input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid #d4deef;
    border-radius: 12px;
    background: #f7faff;
    color: #244b85;
    font-size: 15px;
    box-sizing: border-box
}

.referral-link-control .btn {
    flex-shrink: 0
}

.referral-copy-status {
    min-height: 20px;
    margin-bottom: 0!important;
    color: #228363!important
}

.referral-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px
}

.referral-list-heading>span {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f0ebfc;
    color: #7953c4;
    font-size: 12px;
    font-weight: 700
}

.referral-table-wrap {
    overflow: auto
}

.referral-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    text-align: start
}

.referral-table th {
    font-size: 11px;
    font-weight: 600;
    color: #8090a7;
    background: #f7f9fd;
    padding: 14px;
    text-align: start
}

.referral-table td {
    padding: 17px 14px;
    border-bottom: 1px solid #edf0f6;
    font-size: 13px;
    color: #354e70
}

.referral-table td:first-child {
    white-space: normal;
    min-width: 130px;
    overflow-wrap: anywhere
}

.referral-table td>time {
    display: block;
    font-size: 10px;
    color: #94a0b1;
    margin-top: 6px
}

.referral-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 6px 9px;
    border-radius: 9px
}

.referral-status.is-done {
    background: #eaf8f1;
    color: #227859
}

.referral-status.is-pending {
    background: #fff5e4;
    color: #986821
}

.referral-empty {
    text-align: center;
    padding: 40px 20px
}

.referral-empty>span {
    display: inline-block;
    font-size: 40px;
    margin-bottom: 12px
}

.referral-empty h3 {
    font-size: 18px;
    color: #344c6c
}

.referral-empty p {
    font-size: 13px;
    line-height: 1.8;
    color: #8290a4
}

.referral-wrap section.referral-rules {
    padding: 20px 8px
}

.referral-wrap section.referral-rules ol {
    padding-inline-start:22px;font-size: 12px;
    line-height: 2.1;
    color: #73839b
}

.referral-wrap section.referral-rules li {
    padding-inline-start:5px;margin-bottom: 9px
}

.referral-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0
}

@media(max-width: 900px) {
    .referral-banner {
        padding:32px;
        gap: 15px
    }

    .referral-dashboard-top {
        grid-template-columns: minmax(0,1fr)
    }

    .referral-balance-card dl {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 14px 30px
    }

    .referral-balance-card>strong {
        font-size: 34px
    }

    .referral-wrap section.referral-progress-card {
        padding: 22px
    }
}

@media(max-width: 600px) {
    .referral-section {
        padding:20px 0 45px!important
    }

    .referral-banner {
        grid-template-columns: minmax(0,1fr);
        padding: 28px 24px;
        border-radius: 23px;
        gap: 10px
    }

    .referral-banner h2 {
        font-size: 29px
    }

    .referral-banner p {
        font-size: 13px
    }

    .referral-start {
        width: 100%;
        box-sizing: border-box
    }

    .referral-banner-art {
        max-width: 350px
    }

    .referral-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px
    }

    .referral-heading .btn {
        font-size: 12px
    }

    .referral-wrap section.referral-progress-card,.referral-balance-card {
        padding: 18px;
        border-radius: 18px
    }

    .referral-card-title {
        gap: 10px
    }

    .referral-gift-emblem {
        width: 46px;
        height: 46px;
        font-size: 25px;
        border-radius: 12px
    }

    .referral-card-title h2 {
        font-size: 19px
    }

    .referral-card-title p {
        font-size: 11px
    }

    .referral-milestone small {
        font-size: 9px
    }

    .referral-milestone-icon {
        font-size: 21px
    }

    .referral-milestone b {
        font-size: 10px
    }

    .referral-balance-card dl {
        gap: 13px 16px
    }

    .referral-link-control {
        flex-direction: column
    }

    .referral-link-control input {
        font-size: 13px;
        padding: 13px
    }

    .referral-link-control .btn {
        justify-content: center;
        min-height: 44px
    }

    .referral-table th,.referral-table td {
        padding: 12px 9px
    }

    .referral-status {
        padding: 5px;
        font-size: 10px
    }

    .referral-top-gift {
        width: 34px;
        height: 34px;
        border-radius: 10px
    }

    .referral-top-gift svg {
        width: 20px;
        height: 20px
    }
}

@media(prefers-reduced-motion:reduce) {
    .referral-start,.referral-top-gift {
        transition: none
    }

    .referral-start:hover,.referral-top-gift:hover {
        transform: none
    }
}

.referral-account-entry {
    margin-bottom: 24px
}

.referral-account-entry .btn {
    font-size: 13px
}

.referral-wrap .referral-heading {
    max-width: none;
    text-align: start;
    margin-bottom: 28px
}

.referral-wrap section.referral-link-card,.referral-wrap section.referral-members {
    padding: 28px;
    margin-bottom: 24px
}

.referral-wrap section.referral-rules {
    padding: 20px 8px
}

@media(max-width: 600px) {
    .referral-wrap section.referral-link-card,.referral-wrap section.referral-members {
        padding:18px
    }

    .referral-wrap section.referral-rules {
        padding: 16px 4px
    }
}

/* The gift changes on explicit hover/focus, including reduced-motion devices. */
.referral-top-gift {
    position: relative;
    overflow: hidden;
    background: #2f2f2f;
    border-color: #000;
    transform: none
}

.referral-top-gift:hover,.referral-top-gift:focus-visible {
    background: #2f2f2f;
    transform: none
}

.referral-top-gift .referral-gift-static {
    display: block;
    width: 18px;
    height: 19px;
    object-fit: contain;
    pointer-events: none
}

.referral-top-gift .referral-gift-animated {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none
}

.referral-top-gift:hover .referral-gift-static,.referral-top-gift:focus-visible .referral-gift-static {
    visibility: hidden
}

.referral-top-gift:hover .referral-gift-animated,.referral-top-gift:focus-visible .referral-gift-animated {
    opacity: 1;
    visibility: visible
}
