/* 回家卡 — Figma PC 未登录 2538:6333 / 登录 2594:5405；H5 未登录 2740:12174 / 登录 2681:6748 */

body.hg-home-card-page {
    --hg-hc-accent: var(--hg-accent, #fe2e62);
}

.hg-home-card {
    position: relative;
    min-height: 28rem;
}

.hg-hc-member[hidden],
.hg-hc-guest[hidden] {
    display: none !important;
}
/* —— Guest —— */
.hg-hc-guest {
    position: relative;
    min-height: 22rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2.5rem 0 4rem;
    box-sizing: border-box;
}

.hg-hc-guest-modal {
    position: relative;
    width: 37.5rem; /* 600px */
    max-width: 100%;
    min-height: 29.6875rem; /* 475px */
    padding: 6.1875rem 2.6875rem 2.5rem; /* 对齐稿面内容区 */
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 77, 184, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    overflow: hidden;
}

.hg-hc-guest-modal__glow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.9;
}

.hg-hc-guest-modal__close {
    position: absolute;
    top: 1.1875rem;
    right: 1.3125rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.hg-hc-guest-modal__close img {
    display: block;
    width: 0.9375rem;
    height: 0.9375rem;
}

.hg-hc-guest-modal__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hg-hc-guest-modal__avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 1.067px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
    margin-bottom: 1.25rem;
}

.hg-hc-guest-modal__title {
    margin: 0 0 0.375rem;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
}

.hg-hc-guest-modal__desc {
    margin: 0 0 3.125rem;
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

.hg-hc-guest-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 32rem;
    height: 3.25rem;
    border: 0;
    border-radius: 0.3125rem;
    background: var(--hg-hc-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 30, 148, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.hg-hc-guest-modal__btn:hover {
    filter: brightness(1.05);
}

/* —— Member card (Figma 2594:5422) —— */
.hg-hc-member {
    display: flex;
    justify-content: center;
    padding: 0 0 5rem;
    box-sizing: border-box;
}

.hg-hc-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem; /* 20px */
    width: 36.25rem; /* 580px */
    max-width: 100%;
}

.hg-hc-panel {
    position: relative;
    isolation: isolate; /* 蒙层与内容分层，避免盖住 head */
    width: 100%;
    height: 54.1875rem; /* 867px 稿面定高 */
    border-radius: 1.25rem; /* 20px */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 77, 184, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    overflow: hidden;
}

.hg-hc-panel__mask {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 17.5rem; /* 仅顶部光晕带，不再铺满遮挡 */
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
    z-index: 0;
}

.hg-hc-panel__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* 20px：资料区与入口区 */
    width: 33.75rem; /* 540px */
    max-width: calc(100% - 2.375rem);
    margin: 1.1875rem auto 0; /* top/left 19px */
    box-sizing: border-box;
}

.hg-hc-panel__head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 1.25rem; /* 20px */
    width: 100%;
    min-height: 5.625rem; /* 90px：与头像同高，防塌陷 */
    box-sizing: border-box;
}

.hg-hc-panel__avatar-wrap {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 5.625rem; /* 90px */
    height: 5.625rem;
    min-width: 5.625rem;
    min-height: 5.625rem;
    border-radius: 1.25rem; /* 20px 圆角方头像 */
    border: 2px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
}

.hg-hc-panel__avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hg-hc-panel__titles {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
}

.hg-hc-panel__title {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.875rem !important; /* 30px，压过主题 h1 */
    font-weight: 600;
    line-height: 2.8125rem !important; /* 45px */
    height: auto !important;
    min-height: 2.8125rem;
    color: #fff;
    letter-spacing: -0.0128rem;
    white-space: nowrap;
    overflow: visible;
}

.hg-hc-panel__title-pc {
    display: inline;
}

.hg-hc-panel__title-h5 {
    display: none;
}

.hg-hc-panel__subtitle {
    display: block;
    margin: 0;
    font-size: 0.875rem; /* 14px */
    line-height: 1.38125rem; /* 22.1px */
    min-height: 1.38125rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: -0.0048rem;
}

.hg-hc-fields {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* 20px */
    margin: 0;
    padding: 0;
}

.hg-hc-fields__item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem; /* 6px */
    margin: 0;
}

.hg-hc-fields__item dt {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: normal;
    color: rgba(255, 255, 255, 0.65);
}

.hg-hc-fields__item dd {
    margin: 0;
    font-size: 1rem; /* 16px */
    font-weight: 600;
    line-height: normal;
    color: #fff;
    word-break: break-all;
}

.hg-hc-entries {
    display: flex;
    flex-direction: column;
    gap: 0.625rem; /* 10px */
}

.hg-hc-entries__title {
    margin: 0;
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    line-height: normal;
    color: #fff;
}

.hg-hc-entries__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem; /* 10px */
    width: 100%;
}

.hg-hc-entries__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.625rem; /* 10px */
    width: 100%;
    padding: 1.25rem 0.625rem; /* 20px 10px */
    border-radius: 0.625rem; /* 10px */
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #171719;
    box-sizing: border-box;
}

.hg-hc-entries__label {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: normal;
    color: rgba(255, 255, 255, 0.65);
}

.hg-hc-entries__url {
    font-size: 1.125rem; /* 18px */
    font-weight: 500;
    line-height: normal;
    color: #fe2e62;
    text-decoration: none;
    word-break: break-all;
}

.hg-hc-entries__url:hover {
    text-decoration: underline;
}

/* 稿面：左右各 170px padding 的胶囊宽按钮，非整卡宽 */
.hg-hc-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: 3.125rem; /* 50px */
    padding: 0.625rem 10.625rem; /* 10px 170px */
    border: 0;
    border-radius: 0.625rem; /* 10px */
    background: #fe2e62;
    color: #fff;
    font-size: 1.25rem; /* 20px */
    font-weight: 500;
    line-height: 1.21875rem;
    letter-spacing: -0.0048rem;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
}

.hg-hc-download:hover {
    filter: brightness(1.05);
}

/* —— H5 —— */
@media (max-width: 767px) {
    body.hg-home-card-page #body > .container {
        padding-left: 0.6667rem;
        padding-right: 0.6667rem;
    }

    .hg-hc-guest {
        padding: 1.5rem 0 3rem;
        min-height: 16rem;
    }

    .hg-hc-guest-modal {
        width: 100%;
        min-height: 12.08rem;
        padding: 1.3067rem 0.7733rem 1.0667rem;
        border-radius: 0.5333rem;
    }

    .hg-hc-guest-modal__glow {
        opacity: 0.55;
        transform: scale(1.4);
        transform-origin: top center;
    }

    .hg-hc-guest-modal__close {
        display: none;
    }

    .hg-hc-guest-modal__avatar {
        width: 2.4rem;
        height: 2.4rem;
        border-radius: 0.5333rem;
        border-width: 0.1067rem;
        margin-bottom: 0.5333rem;
    }

    .hg-hc-guest-modal__title {
        font-size: 0.96rem;
        line-height: 1.2rem;
        margin-bottom: 0.4267rem;
    }

    .hg-hc-guest-modal__desc {
        font-size: 0.64rem;
        line-height: 0.9rem;
        color: rgba(255, 255, 255, 0.65);
        margin-bottom: 1.2rem;
        padding: 0 0.4rem;
    }

    .hg-hc-guest-modal__btn {
        height: 2.0533rem;
        max-width: none;
        border-radius: 0.5333rem;
        font-size: 0.8rem;
        background: linear-gradient(90deg, #fe2e62, #ff5781);
        box-shadow: 0 0 0.48rem rgba(254, 46, 98, 0.48);
    }

    .hg-hc-member {
        padding-bottom: 3rem;
    }

    .hg-hc-stack {
        width: 100%;
        gap: 1.3333rem;
    }

    .hg-hc-panel {
        height: auto;
        min-height: 0;
        border-radius: 0.5333rem;
    }

    .hg-hc-panel__mask {
        height: 6.4rem;
        opacity: 0.9;
    }

    .hg-hc-panel__body {
        width: auto;
        max-width: none;
        margin: 1.3067rem 0.5067rem 1.0667rem;
        gap: 0.5333rem;
    }

    .hg-hc-panel__head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5333rem; /* 20@37.5：头像与标题 */
        min-height: 0; /* 覆盖 PC 90px 定高，避免列排布被压扁 */
        height: auto;
        flex-shrink: 0;
    }

    .hg-hc-panel__titles {
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.32rem; /* 12@37.5：标题与副标题 */
        width: 100%;
        min-width: 0;
        min-height: 0;
        position: relative;
        z-index: 2;
    }

    .hg-hc-panel__avatar-wrap {
        width: 2.4rem;
        height: 2.4rem;
        border-radius: 0.5333rem;
        border-width: 0.1067rem;
    }

    /* 必须 !important：覆盖 PC 侧 font-size/line-height/min-height，否则 H5 标题盒过大叠到资料区 */
    .hg-hc-panel__title {
        font-size: 0.96rem !important; /* 36@37.5 */
        line-height: 1.2rem !important; /* 45@37.5 */
        min-height: 0 !important;
        height: auto !important;
        white-space: normal;
        overflow: visible;
    }

    .hg-hc-panel__title-pc {
        display: none;
    }

    .hg-hc-panel__title-h5 {
        display: inline;
    }

    .hg-hc-panel__subtitle {
        font-size: 0.64rem; /* 24@37.5 */
        line-height: 0.9rem;
        min-height: 0;
        margin-top: 0; /* 间距改由 titles gap 控制 */
    }

    .hg-hc-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5333rem;
        margin-bottom: 0.5333rem;
    }

    .hg-hc-fields__item {
        min-height: 3.5733rem;
        padding: 0.5333rem 0.2667rem;
        border-radius: 0.2667rem;
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: #171719;
        justify-content: center;
        box-sizing: border-box;
        gap: 0.5333rem;
    }

    .hg-hc-fields__item dt {
        font-size: 0.64rem;
        font-weight: 400;
        color: #999;
    }

    .hg-hc-fields__item dd {
        font-size: 0.8rem;
    }

    .hg-hc-entries__title {
        font-size: 0.8rem;
        margin-bottom: 0.5333rem;
    }

    .hg-hc-entries__list {
        gap: 0.2667rem;
    }

    .hg-hc-entries__item {
        flex-direction: row;
        align-items: center;
        gap: 0.5333rem; /* 20px：标签与地址间距 */
        padding: 0.3733rem 0.2667rem;
        border-radius: 0.2667rem;
    }

    /* Figma 2681:6806：标签槽固定 120px，地址列左缘对齐 */
    .hg-hc-entries__label {
        flex: 0 0 3.2rem; /* 120px @ 37.5 */
        width: 3.2rem;
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.16rem 0.32rem;
        border-radius: 0.1333rem;
        background: rgba(255, 255, 255, 0.1);
        font-size: 0.64rem;
        color: #999;
        white-space: nowrap;
    }

    .hg-hc-entries__url {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.8rem;
        text-align: left;
    }

    .hg-hc-download {
        width: 100%;
        height: 2.0533rem;
        border-radius: 0.5333rem;
        font-size: 0.6933rem;
        font-weight: 600;
        background: linear-gradient(90deg, #fe2e62, #ff5781);
        box-shadow: 0 0 0.48rem rgba(254, 46, 98, 0.48);
        letter-spacing: 0.04em;
    }
}
