:root {
    --share-blue: #3159ad;
    --share-blue-dark: #1f3f87;
    --share-ink: #142440;
    --share-muted: #718099;
    --share-line: #dbe4f1;
    --share-warm: #fff9ee;
    --share-gold: #e8a934;
}

.rg-share-modal[hidden] {
    display: none;
}

.rg-share-mobile-trigger {
    display: none;
}

.rg-share-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", sans-serif;
}

.rg-share-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 24, 45, .68);
    backdrop-filter: blur(4px);
}

.rg-share-panel {
    position: relative;
    z-index: 1;
    width: min(850px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(6, 21, 49, .32);
}

.rg-share-close {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--share-blue-dark);
    cursor: pointer;
    font-size: 28px;
    line-height: 38px;
}

.rg-share-hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 26px;
    align-items: center;
    padding: 42px 48px 32px;
    border-radius: 22px 22px 0 0;
    background:
        radial-gradient(circle at 82% 20%, rgba(255, 208, 98, .33), transparent 25%),
        linear-gradient(135deg, #fffdf7 0%, #fff6e6 100%);
}

.rg-share-eyebrow {
    margin: 0 0 9px;
    color: var(--share-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
}

.rg-share-hero h2 {
    margin: 0;
    color: var(--share-ink);
    font-size: clamp(28px, 4vw, 43px);
    line-height: 1.14;
}

.rg-share-hero p {
    margin: 13px 0 0;
    color: #5f6f86;
    font-size: 15px;
    line-height: 1.75;
}

.rg-share-gift {
    position: relative;
    min-height: 190px;
    display: grid;
    place-items: center;
}

.rg-share-gift::before,
.rg-share-gift::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(49, 89, 173, .1);
}

.rg-share-gift::before {
    width: 180px;
    height: 180px;
}

.rg-share-gift::after {
    width: 125px;
    height: 125px;
    background: rgba(232, 169, 52, .18);
}

.rg-share-gift span {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 15px 18px rgba(115, 73, 5, .2));
    font-size: 104px;
    transform: rotate(-4deg);
}

.rg-share-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 24px 48px 0;
}

.rg-share-benefit {
    padding: 18px;
    border: 1px solid var(--share-line);
    border-radius: 14px;
    background: #fbfcff;
}

.rg-share-benefit strong {
    display: block;
    margin-bottom: 8px;
    color: var(--share-ink);
    font-size: 15px;
}

.rg-share-benefit p {
    margin: 0;
    color: var(--share-muted);
    font-size: 13px;
    line-height: 1.65;
}

.rg-share-tools {
    padding: 24px 48px 42px;
}

.rg-share-tools h3 {
    margin: 0 0 12px;
    color: var(--share-ink);
    font-size: 15px;
}

.rg-share-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.rg-share-socials button,
.rg-share-socials a {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--share-line);
    border-radius: 999px;
    background: #fff;
    color: #31445f;
    cursor: pointer;
    font-size: 13px;
    line-height: 38px;
    text-decoration: none;
}

.rg-share-socials button:hover,
.rg-share-socials a:hover {
    border-color: #9fb4d8;
    background: #f4f7fd;
}

.rg-share-link-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 150px;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: #f5f8fd;
}

.rg-share-link-box input {
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #d8e1ee;
    border-radius: 9px;
    background: #fff;
    color: #435571;
}

.rg-share-copy {
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 9px;
    background: var(--share-blue);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.rg-share-copy:hover {
    background: var(--share-blue-dark);
}

.rg-share-qr {
    min-height: 132px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff;
}

.rg-share-qr canvas,
.rg-share-qr img {
    width: 122px !important;
    height: 122px !important;
}

.rg-share-toast {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    padding: 9px 16px;
    border-radius: 999px;
    background: #132743;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: .2s ease;
}

.rg-share-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.rg-share-public {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(49, 89, 173, .15), transparent 28%),
        #f4f7fc;
    color: var(--share-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", sans-serif;
}

.rg-share-public-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
    border-bottom: 1px solid var(--share-line);
    background: rgba(255, 255, 255, .92);
}

.rg-share-public-header a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--share-ink);
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.rg-share-public-header img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.rg-share-language {
    display: flex;
    gap: 6px;
}

.rg-share-language button {
    height: 34px;
    padding: 0 13px;
    border: 1px solid var(--share-line);
    border-radius: 999px;
    background: #fff;
    color: var(--share-muted);
    cursor: pointer;
}

.rg-share-language button.active {
    border-color: var(--share-blue);
    background: var(--share-blue);
    color: #fff;
}

.rg-share-public-main {
    width: min(980px, calc(100% - 36px));
    margin: 54px auto;
}

.rg-share-public-card {
    overflow: hidden;
    border: 1px solid #dce5f2;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(29, 56, 101, .12);
}

.rg-share-public-card .rg-share-hero {
    border-radius: 0;
}

.rg-shared-report {
    padding: 32px 48px 42px;
}

.rg-shared-report small {
    color: var(--share-blue);
    font-weight: 800;
    letter-spacing: .12em;
}

.rg-shared-report h1 {
    margin: 10px 0 12px;
    font-size: clamp(25px, 4vw, 40px);
    line-height: 1.25;
}

.rg-shared-report p {
    color: var(--share-muted);
    line-height: 1.8;
}

.rg-share-open {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    margin-top: 12px;
    padding: 0 24px;
    border-radius: 9px;
    background: var(--share-blue);
    color: #fff;
    font-weight: 750;
    text-decoration: none;
}

@media (max-width: 700px) {
    .rg-share-modal {
        align-items: flex-end;
        padding: 0;
    }

    .rg-share-panel {
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
    }

    .rg-share-hero {
        grid-template-columns: 1fr;
        padding: 36px 22px 24px;
    }

    .rg-share-gift {
        min-height: 118px;
    }

    .rg-share-gift::before {
        width: 120px;
        height: 120px;
    }

    .rg-share-gift::after {
        width: 84px;
        height: 84px;
    }

    .rg-share-gift span {
        font-size: 72px;
    }

    .rg-share-benefits {
        grid-template-columns: 1fr;
        padding: 18px 22px 0;
    }

    .rg-share-tools {
        padding: 20px 22px 30px;
    }

    .rg-share-link-box {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .rg-share-qr {
        grid-column: 1 / -1;
        min-height: 146px;
    }

    .rg-share-public-header {
        padding: 0 18px;
    }

    .rg-share-public-main {
        margin: 24px auto;
    }

    .rg-shared-report {
        padding: 26px 22px 34px;
    }
}

@media (max-width: 1100px) {
    .rg-share-mobile-trigger {
        position: fixed;
        right: 18px;
        bottom: 22px;
        z-index: 1100;
        display: inline-flex;
        min-height: 46px;
        align-items: center;
        gap: 6px;
        padding: 0 18px;
        border: 0;
        border-radius: 999px;
        background: var(--share-blue);
        box-shadow: 0 12px 30px rgba(26, 54, 105, .28);
        color: #fff;
        cursor: pointer;
        font-weight: 750;
    }
}
