@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(244, 63, 94, 0.6); }
    50% { box-shadow: 0 0 30px rgba(244, 63, 94, 0.9); }
}
.glow-btn { animation: pulse-glow 2s infinite; }
.bg-gradient-dark {
    background: radial-gradient(circle at top, #181324 0%, #050508 100%);
}
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.i18n-pending body { visibility: hidden; }
.profile-modal-open { overflow: hidden; }

/* 私密聊天夜空：背景与消息层解耦，避免动态消息列表重绘星光元素。 */
.chat-night-shell {
    isolation: isolate;
    overflow: hidden;
    background: #03030b;
}
.chat-night-sky {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 72% 12%, rgba(124, 58, 237, .17), transparent 30%),
        radial-gradient(circle at 12% 72%, rgba(219, 39, 119, .13), transparent 34%),
        linear-gradient(165deg, #090817 0%, #05050f 46%, #09030d 100%);
}
.chat-night-sky::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .72;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(244,114,182,.72) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(196,181,253,.7) 0 1px, transparent 1.35px);
    background-position: 0 0, 1.8rem 3.2rem, 4.5rem 1.2rem;
    background-size: 5.7rem 6.8rem, 7.4rem 8.6rem, 9.2rem 7.8rem;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.88) 62%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.88) 62%, transparent 100%);
    animation: chat-stars-breathe 5.5s ease-in-out infinite alternate;
}
.chat-night-sky::after {
    content: "";
    position: absolute;
    right: -20%;
    bottom: -16%;
    width: 75%;
    height: 48%;
    border-radius: 50%;
    background: rgba(190, 24, 93, .12);
    filter: blur(5rem);
}
.chat-night-moon {
    position: absolute;
    top: clamp(5.25rem, 12vh, 7.5rem);
    right: clamp(1.5rem, 8vw, 5rem);
    width: clamp(3.3rem, 13vw, 5.25rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #f5e9ff 38%, #c4b5fd 100%);
    box-shadow:
        0 0 1.25rem rgba(221, 214, 254, .38),
        0 0 3.5rem rgba(168, 85, 247, .2);
    opacity: .84;
}
.chat-night-moon::after {
    content: "";
    position: absolute;
    top: -.42rem;
    left: .92rem;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #080715;
    box-shadow: inset .4rem -.2rem .8rem rgba(124,58,237,.08);
}
.chat-night-haze {
    position: absolute;
    right: 12%;
    bottom: 12%;
    left: 12%;
    height: 9rem;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(124,58,237,.08), rgba(236,72,153,.11), transparent);
    filter: blur(3rem);
}
.chat-shooting-star {
    position: absolute;
    width: 4.8rem;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.92));
    filter: drop-shadow(0 0 .3rem rgba(196,181,253,.8));
    opacity: 0;
    transform: rotate(-32deg);
}
.chat-shooting-star::after {
    content: "";
    position: absolute;
    right: 0;
    top: -.1rem;
    width: .2rem;
    height: .2rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 .55rem #fff;
}
.chat-shooting-star--one {
    top: 22%;
    left: 18%;
    animation: chat-star-flight 7s ease-in-out 1.2s infinite;
}
.chat-shooting-star--two {
    top: 42%;
    left: 62%;
    transform: rotate(-24deg) scale(.7);
    animation: chat-star-flight 9s ease-in-out 4.6s infinite;
}
.chat-night-header,
.chat-night-messages,
.chat-night-composer {
    position: relative;
    z-index: 2;
}
.chat-night-header {
    background: linear-gradient(180deg, rgba(5,5,14,.94), rgba(8,7,18,.76));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 .8rem 2.2rem rgba(0,0,0,.22);
}
.chat-night-header #chat-box-avatar {
    border: 1px solid rgba(244,114,182,.55);
    box-shadow: 0 0 1rem rgba(236,72,153,.22);
}
.chat-night-messages {
    background: linear-gradient(180deg, rgba(3,3,11,.08), rgba(3,3,11,.28));
}
.chat-night-composer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    background: rgba(5,5,13,.82);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 -1rem 2.8rem rgba(0,0,0,.24);
}
.chat-message-row {
    position: relative;
    z-index: 1;
}
.chat-message-bubble {
    border: 1px solid rgba(255,255,255,.09);
    line-height: 1.55;
    overflow-wrap: anywhere;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.chat-message-bubble--peer {
    color: #f4f4f5;
    background: linear-gradient(145deg, rgba(35,31,48,.9), rgba(18,17,28,.88));
    box-shadow: 0 .7rem 1.8rem rgba(0,0,0,.2);
}
.chat-message-bubble--mine {
    border-color: rgba(251,113,133,.3);
    color: #fff;
    background: linear-gradient(135deg, rgba(225,29,72,.94), rgba(192,38,211,.9));
    box-shadow:
        0 .75rem 1.8rem rgba(190,24,93,.22),
        inset 0 1px 0 rgba(255,255,255,.13);
}
@keyframes chat-stars-breathe {
    from { opacity: .5; transform: scale(1); }
    to { opacity: .82; transform: scale(1.018); }
}
@keyframes chat-star-flight {
    0%, 76% { opacity: 0; translate: -2rem 1.25rem; }
    80% { opacity: .95; }
    91%, 100% { opacity: 0; translate: 8rem -4.8rem; }
}
@media (prefers-reduced-motion: reduce) {
    .chat-night-sky::before,
    .chat-shooting-star { animation: none; }
    .chat-shooting-star { display: none; }
}

/* 私密会话列表页：沿用聊天弹层的夜空语言，但保持独立层级与滚动区域。 */
.private-night-page {
    position: relative;
    isolation: isolate;
    min-height: calc(100dvh - 9rem);
    overflow: hidden;
    padding: 1rem 0 2.5rem;
    border-radius: 1.75rem 1.75rem 0 0;
    background: #05050d;
}
.private-night-page-sky {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 86% 4%, rgba(124,58,237,.23), transparent 27%),
        radial-gradient(circle at 8% 56%, rgba(190,24,93,.16), transparent 38%),
        linear-gradient(168deg, #0a0918 0%, #05050d 48%, #0b030d 100%);
}
.private-night-page-sky::before,
.private-night-page-sky::after {
    content: "";
    position: absolute;
    inset: 0;
}
.private-night-page-sky::before {
    opacity: .72;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.88) 0 1px, transparent 1.45px),
        radial-gradient(circle, rgba(244,114,182,.74) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(196,181,253,.7) 0 1px, transparent 1.4px);
    background-position: 0 0, 2.4rem 3.8rem, 4.8rem 1.5rem;
    background-size: 6.2rem 7.3rem, 8.5rem 9.1rem, 10.2rem 8.4rem;
    animation: private-stars-drift 12s ease-in-out infinite alternate;
}
.private-night-page-sky::after {
    top: 8rem;
    left: -35%;
    width: 95%;
    height: 18rem;
    border-radius: 50%;
    background: rgba(219,39,119,.11);
    filter: blur(5rem);
    transform: rotate(-14deg);
}
.private-night-page-moon {
    position: absolute;
    top: 1.35rem;
    right: 1.7rem;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 32%, #fff, #ede9fe 45%, #a78bfa);
    box-shadow:
        0 0 1.4rem rgba(221,214,254,.36),
        0 0 4rem rgba(139,92,246,.22);
    opacity: .82;
}
.private-night-page-moon::after {
    content: "";
    position: absolute;
    top: -.35rem;
    left: 1.08rem;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #090817;
}
.private-night-page-glow {
    position: absolute;
    right: -5rem;
    bottom: 5rem;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: rgba(190,24,93,.13);
    filter: blur(4.5rem);
}
.private-night-content {
    position: relative;
    z-index: 1;
}
.private-night-intro {
    position: relative;
    overflow: hidden;
    min-height: 8.5rem;
    padding: 1.35rem 1.4rem;
    border: 1px solid rgba(244,114,182,.16);
    border-radius: 1.45rem;
    background:
        linear-gradient(120deg, rgba(19,17,34,.84), rgba(35,12,33,.52)),
        rgba(5,5,13,.36);
    box-shadow:
        0 1.2rem 3rem rgba(0,0,0,.26),
        inset 0 1px 0 rgba(255,255,255,.04);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.private-night-intro::after {
    content: "✦  ·  ✧";
    position: absolute;
    right: 1.15rem;
    bottom: 1rem;
    color: rgba(244,114,182,.58);
    font-size: .75rem;
    letter-spacing: .55rem;
}
.private-night-intro span {
    color: #f472b6;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .16em;
}
.private-night-intro h2 {
    margin: .35rem 0 0;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -.04em;
}
.private-night-intro p {
    margin: .35rem 0 0;
    color: #a1a1aa;
    font-size: .72rem;
}
.private-night-section,
.private-conversation-list {
    padding: .85rem;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 1.25rem;
    background: rgba(11,10,20,.58);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.private-night-section > h3,
.private-conversation-heading {
    color: #c4b5fd;
}
.private-match-card {
    min-width: 4.65rem;
    padding: .55rem .45rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.private-match-card:hover {
    border-color: rgba(244,114,182,.2);
    background: rgba(255,255,255,.04);
    transform: translateY(-2px);
}
.private-match-card > div {
    box-shadow: 0 0 1.3rem rgba(219,39,119,.2);
}
.private-conversation-card {
    min-height: 4.65rem;
    border: 1px solid rgba(255,255,255,.075);
    color: #f4f4f5;
    background:
        linear-gradient(135deg, rgba(33,29,46,.76), rgba(15,14,25,.68));
    box-shadow: 0 .7rem 1.6rem rgba(0,0,0,.16);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.private-conversation-card:hover,
.private-conversation-card:active {
    transform: translateY(-1px);
    border-color: rgba(244,114,182,.28);
    background:
        linear-gradient(135deg, rgba(63,28,55,.78), rgba(22,17,34,.76));
}
.private-conversation-avatar,
.private-conversation-card img {
    flex: 0 0 auto;
    border: 1px solid rgba(244,114,182,.38);
    background: #18151d;
    box-shadow: 0 0 1rem rgba(219,39,119,.16);
}
.private-conversation-time {
    color: #777383;
    font-size: .65rem;
}
.private-conversation-unread {
    flex: 0 0 auto;
    min-width: 1.45rem;
    text-align: center;
    background: linear-gradient(135deg, #f43f5e, #db2777);
    box-shadow: 0 .35rem 1rem rgba(225,29,72,.32);
}
.private-conversation-empty {
    color: #85808f;
}
@keyframes private-stars-drift {
    from { opacity: .52; transform: translate3d(0,0,0); }
    to { opacity: .82; transform: translate3d(.8rem,-.45rem,0); }
}
@media (prefers-reduced-motion: reduce) {
    .private-night-page-sky::before { animation: none; }
}

/* 广场仅保留发布入口，编辑流程在独立全屏页面完成。 */
.square-compose-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(244,114,182,.16);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 8% 0%, rgba(219,39,119,.14), transparent 40%),
        linear-gradient(135deg, rgba(29,24,41,.84), rgba(13,12,20,.86));
    box-shadow: 0 1rem 2.5rem rgba(0,0,0,.22);
}
.square-compose-entry-copy {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
}
.square-compose-entry-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid rgba(244,114,182,.24);
    border-radius: .9rem;
    color: #f9a8d4;
    background: rgba(190,24,93,.14);
    box-shadow: 0 0 1.3rem rgba(219,39,119,.14);
}
.square-compose-entry strong {
    display: block;
    color: #fafafa;
    font-size: .8rem;
}
.square-compose-entry p {
    overflow: hidden;
    margin: .22rem 0 0;
    color: #85808f;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#open-moment-compose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    flex: 0 0 auto;
    min-height: 2.55rem;
    padding: 0 .95rem;
    border-radius: .85rem;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #db2777);
    box-shadow: 0 .65rem 1.5rem rgba(219,39,119,.25);
    font-size: .7rem;
    font-weight: 800;
}
.moment-compose-open {
    overflow: hidden;
}
.moment-compose-page {
    position: fixed;
    z-index: 95;
    inset: 0;
    isolation: isolate;
    overflow: hidden auto;
    color: #f4f4f5;
    background: #05050d;
    overscroll-behavior: contain;
}
.moment-compose-page.hidden {
    display: none;
}
.moment-compose-sky {
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 82% 8%, rgba(124,58,237,.22), transparent 27%),
        radial-gradient(circle at 12% 72%, rgba(190,24,93,.17), transparent 36%),
        linear-gradient(165deg, #0a0918 0%, #05050d 48%, #0b030d 100%);
}
.moment-compose-sky::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .62;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.45px),
        radial-gradient(circle, rgba(244,114,182,.72) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(196,181,253,.7) 0 1px, transparent 1.35px);
    background-position: 0 0, 2.2rem 3.4rem, 4.8rem 1.1rem;
    background-size: 6.4rem 7.5rem, 8.8rem 9.5rem, 10.5rem 8.1rem;
    animation: private-stars-drift 14s ease-in-out infinite alternate;
}
.moment-compose-orbit {
    position: absolute;
    top: -5rem;
    right: -6.5rem;
    width: 18rem;
    height: 18rem;
    border: 1px solid rgba(196,181,253,.1);
    border-radius: 50%;
    box-shadow:
        0 0 0 2.4rem rgba(139,92,246,.025),
        0 0 0 5.4rem rgba(219,39,119,.018);
}
.moment-compose-glow {
    position: absolute;
    left: -8rem;
    bottom: 5%;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    background: rgba(190,24,93,.13);
    filter: blur(5.5rem);
}
.moment-compose-header {
    position: sticky;
    z-index: 3;
    top: 0;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    min-height: 4.75rem;
    padding:
        max(.7rem, env(safe-area-inset-top, .7rem))
        max(1rem, env(safe-area-inset-right, 1rem))
        .7rem
        max(1rem, env(safe-area-inset-left, 1rem));
    border-bottom: 1px solid rgba(255,255,255,.075);
    background: rgba(5,5,13,.82);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
}
#moment-compose-close {
    display: grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: .9rem;
    color: #d4d4d8;
    background: rgba(255,255,255,.035);
}
.moment-compose-header div {
    min-width: 0;
}
.moment-compose-header span {
    display: block;
    color: #f472b6;
    font-size: .52rem;
    font-weight: 900;
    letter-spacing: .16em;
}
.moment-compose-header h2 {
    margin: .12rem 0 0;
    font-size: 1rem;
    font-weight: 900;
}
#moment-compose-submit {
    min-width: 4.2rem;
    min-height: 2.55rem;
    padding: 0 .9rem;
    border-radius: .85rem;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #db2777);
    box-shadow: 0 .65rem 1.5rem rgba(219,39,119,.25);
    font-size: .72rem;
    font-weight: 900;
}
#moment-compose-submit:disabled {
    opacity: .55;
    cursor: wait;
}
.moment-compose-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
    width: min(42rem, 100%);
    margin: 0 auto;
    padding:
        1.25rem
        max(1rem, env(safe-area-inset-right, 1rem))
        max(2rem, env(safe-area-inset-bottom, 2rem))
        max(1rem, env(safe-area-inset-left, 1rem));
}
.moment-compose-author {
    display: flex;
    align-items: center;
    gap: .8rem;
}
.moment-compose-avatar {
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(244,114,182,.42);
    border-radius: 50%;
    object-fit: cover;
    background: #18151d;
    box-shadow: 0 0 1.25rem rgba(219,39,119,.18);
}
.moment-compose-author strong {
    display: block;
    font-size: .82rem;
}
.moment-compose-author span {
    display: block;
    margin-top: .2rem;
    color: #a78bfa;
    font-size: .62rem;
}
.moment-compose-editor {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 1.35rem;
    background: rgba(15,14,25,.72);
    box-shadow: 0 1rem 2.8rem rgba(0,0,0,.2);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.moment-compose-editor textarea {
    display: block;
    width: 100%;
    min-height: 15rem;
    resize: vertical;
    padding: 1.15rem;
    border: 0;
    outline: 0;
    color: #fafafa;
    background: transparent;
    font-size: .92rem;
    line-height: 1.75;
}
.moment-compose-editor textarea::placeholder {
    color: #625e6b;
}
.moment-compose-editor:focus-within {
    border-color: rgba(244,114,182,.3);
    box-shadow:
        0 1rem 2.8rem rgba(0,0,0,.22),
        0 0 0 3px rgba(219,39,119,.07);
}
.moment-compose-editor-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border-top: 1px solid rgba(255,255,255,.055);
    color: #777383;
    font-size: .62rem;
}
.moment-compose-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}
.moment-compose-preview.hidden {
    display: none;
}
.moment-compose-preview figure {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    margin: 0;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1rem;
    background: #14121d;
}
.moment-compose-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.moment-compose-preview button {
    position: absolute;
    top: .38rem;
    right: .38rem;
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    color: #fff;
    background: rgba(0,0,0,.68);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.moment-compose-image-picker {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .9rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.15rem;
    background: rgba(15,14,25,.68);
    cursor: pointer;
}
.moment-compose-image-picker > span {
    display: grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: .85rem;
    color: #f9a8d4;
    background: rgba(190,24,93,.14);
}
.moment-compose-image-picker strong,
.moment-compose-image-picker small {
    display: block;
}
.moment-compose-image-picker strong {
    font-size: .75rem;
}
.moment-compose-image-picker small {
    margin-top: .18rem;
    color: #777383;
    font-size: .6rem;
}
.moment-compose-image-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    min-height: 1.65rem;
    padding: 0 .5rem;
    border: 1px solid rgba(244,114,182,.16);
    border-radius: 999px;
    color: #f9a8d4;
    background: rgba(190,24,93,.1);
    font-size: .6rem;
    font-weight: 800;
    white-space: nowrap;
}
.moment-compose-note {
    display: flex;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(167,139,250,.13);
    border-radius: 1rem;
    color: #a78bfa;
    background: rgba(76,29,149,.08);
}
.moment-compose-note > i {
    margin-top: .12rem;
}
.moment-compose-note p {
    margin: 0;
}
.moment-compose-note strong,
.moment-compose-note span {
    display: block;
}
.moment-compose-note strong {
    color: #c4b5fd;
    font-size: .68rem;
}
.moment-compose-note span {
    margin-top: .2rem;
    color: #777383;
    font-size: .6rem;
    line-height: 1.55;
}
@media (max-width: 420px) {
    .square-compose-entry p { max-width: 10rem; }
    .square-compose-entry button span { display: none; }
    #open-moment-compose { min-width: 2.55rem; padding: 0; }
    .moment-compose-editor textarea { min-height: 13rem; }
}
@media (prefers-reduced-motion: reduce) {
    .moment-compose-sky::before { animation: none; }
}

.public-profile-back {
    left: max(1rem, calc(50vw - 13rem));
    top: max(1rem, env(safe-area-inset-top, 1rem));
}
.public-profile-actions {
    position: fixed;
    z-index: 89;
    right: 0;
    bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    left: 0;
    width: min(28rem, calc(100vw - 2rem));
    margin: auto;
    padding: .65rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 1.25rem;
    background: rgba(17, 16, 22, .9);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .48);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}
.public-profile-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    min-height: 3rem;
    border-radius: .9rem;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #db2777);
    box-shadow: 0 .8rem 1.8rem rgba(219, 39, 119, .3);
    font-size: .82rem;
    font-weight: 800;
}
.public-profile-actions button:disabled {
    opacity: .6;
    cursor: wait;
}
.public-profile-actions.hidden {
    display: none;
}

.friend-center-shell {
    color: #f4f4f5;
}
.friend-center-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
    min-height: 9.5rem;
    padding: 1.4rem;
    border: 1px solid rgba(244, 63, 94, .2);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 85% 0%, rgba(219, 39, 119, .24), transparent 44%),
        linear-gradient(135deg, rgba(39, 24, 51, .96), rgba(13, 12, 19, .96));
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.friend-center-hero::after {
    content: "";
    position: absolute;
    width: 8rem;
    height: 8rem;
    right: -2.5rem;
    bottom: -4rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 1.5rem rgba(255, 255, 255, .018);
}
.friend-center-kicker {
    margin-bottom: .45rem;
    color: #fb7185;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .16em;
}
.friend-center-hero h2 {
    margin: 0;
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    font-weight: 900;
    letter-spacing: -.04em;
}
.friend-center-hero p {
    max-width: 34rem;
    margin: .45rem 0 0;
    color: #a1a1aa;
    font-size: .78rem;
    line-height: 1.65;
}
.friend-center-live {
    z-index: 1;
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: .12rem .35rem;
    flex: 0 0 auto;
    padding: .65rem .8rem;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 1rem;
    background: rgba(0, 0, 0, .2);
}
.friend-center-live span {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 .7rem rgba(52, 211, 153, .75);
}
.friend-center-live strong {
    font-size: 1rem;
}
.friend-center-live small {
    grid-column: 1 / -1;
    color: #71717a;
    font-size: .58rem;
}
.friend-center-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) auto;
    gap: .7rem;
    align-items: center;
    padding: .8rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, .035);
}
.friend-center-genders {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.friend-center-genders::-webkit-scrollbar { display: none; }
.friend-center-genders button {
    flex: 0 0 auto;
    padding: .58rem .82rem;
    border: 1px solid transparent;
    border-radius: .75rem;
    color: #a1a1aa;
    background: transparent;
    font-size: .72rem;
    font-weight: 700;
}
.friend-center-genders button.is-active {
    border-color: rgba(244, 63, 94, .32);
    color: #fff;
    background: linear-gradient(135deg, rgba(244, 63, 94, .9), rgba(219, 39, 119, .88));
    box-shadow: 0 .5rem 1.3rem rgba(219, 39, 119, .18);
}
.friend-center-region {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    padding: 0 .8rem;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: .8rem;
    background: #111016;
    color: #71717a;
}
.friend-center-region select {
    min-width: 0;
    width: 100%;
    padding: .65rem 0;
    border: 0;
    outline: 0;
    color: #e4e4e7;
    background: #111016;
    color-scheme: dark;
    font-size: .72rem;
    cursor: pointer;
}
.friend-center-region select option {
    color: #f4f4f5;
    background: #18151d;
}
.friend-center-region select option:checked {
    color: #fff;
    background: #be185d;
}
#profileEditForm select {
    color-scheme: dark;
}
#profileEditForm select option {
    color: #f4f4f5;
    background: #18151d;
}
.friend-center-search,
.friend-center-more {
    padding: .7rem 1rem;
    border-radius: .8rem;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #db2777);
    font-size: .72rem;
    font-weight: 800;
    box-shadow: 0 .7rem 1.6rem rgba(225, 29, 72, .18);
}
.friend-center-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #71717a;
    font-size: .68rem;
}
.friend-center-summary button {
    color: #f472b6;
    font-weight: 700;
}
.friend-center-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}
.friend-center-card {
    position: relative;
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    min-height: 10rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1.15rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .022));
    text-align: left;
    box-shadow: 0 .8rem 2.2rem rgba(0, 0, 0, .18);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.friend-center-card:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 63, 94, .34);
    background: linear-gradient(145deg, rgba(244, 63, 94, .075), rgba(255, 255, 255, .026));
}
.friend-center-avatar-wrap {
    position: relative;
    min-height: 100%;
    background: #18151d;
}
.friend-center-avatar {
    width: 100%;
    height: 100%;
    min-height: 10rem;
    object-fit: cover;
}
.friend-center-online {
    position: absolute;
    top: .65rem;
    left: .65rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .5rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(5, 8, 8, .7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: .55rem;
}
.friend-center-online::before {
    content: "";
    width: .35rem;
    height: .35rem;
    border-radius: 50%;
    background: #34d399;
}
.friend-center-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem;
}
.friend-center-card-title {
    display: flex;
    align-items: center;
    gap: .45rem;
}
.friend-center-card-title strong {
    overflow: hidden;
    color: #fff;
    font-size: .95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.friend-center-age {
    flex: 0 0 auto;
    padding: .16rem .4rem;
    border-radius: 999px;
    color: #fbcfe8;
    background: rgba(219, 39, 119, .16);
    font-size: .58rem;
}
.friend-center-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .75rem;
    margin-top: .42rem;
    color: #8b8791;
    font-size: .62rem;
}
.friend-center-meta i {
    margin-right: .25rem;
    color: #f472b6;
}
.friend-center-bio {
    display: -webkit-box;
    overflow: hidden;
    margin: .72rem 0 0;
    color: #c8c5cc;
    font-size: .7rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.friend-center-tags {
    display: flex;
    gap: .35rem;
    overflow: hidden;
    margin-top: auto;
    padding-top: .7rem;
}
.friend-center-tags span {
    flex: 0 0 auto;
    padding: .2rem .42rem;
    border-radius: 999px;
    color: #a8a3ad;
    background: rgba(255, 255, 255, .055);
    font-size: .55rem;
}
.friend-center-arrow {
    position: absolute;
    right: .8rem;
    bottom: .75rem;
    color: rgba(244, 114, 182, .75);
    font-size: .7rem;
}
.friend-center-loading,
.friend-center-empty {
    grid-column: 1 / -1;
    padding: 4rem 1rem;
    border: 1px dashed rgba(255, 255, 255, .09);
    border-radius: 1.2rem;
    color: #71717a;
    text-align: center;
    font-size: .75rem;
}
.friend-center-loading i {
    margin-right: .4rem;
    color: #f472b6;
}
.friend-center-more {
    display: block;
    width: min(18rem, 100%);
    margin: 1rem auto 0;
}
.friend-center-more.hidden { display: none; }

@media (max-width: 720px) {
    .friend-center-filter {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .friend-center-genders {
        grid-column: 1 / -1;
    }
    .friend-center-list {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 420px) {
    .friend-center-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.15rem;
    }
    .friend-center-live {
        align-self: stretch;
        grid-template-columns: auto auto 1fr;
        justify-content: start;
    }
    .friend-center-live small {
        grid-column: auto;
    }
    .friend-center-card {
        grid-template-columns: 6.8rem minmax(0, 1fr);
    }
    .friend-center-avatar {
        min-height: 10.5rem;
    }
}

/* 全局即时消息横幅：在任意业务页面之上显示，保持与聊天弹层解耦。 */
.pulse-message-popups {
    position: fixed;
    z-index: 120;
    top: max(4.5rem, calc(env(safe-area-inset-top, 0px) + 1rem));
    left: 50%;
    width: min(26rem, calc(100vw - 1.5rem));
    transform: translateX(-50%);
    display: grid;
    gap: .65rem;
    pointer-events: none;
}
.pulse-message-popup {
    position: relative;
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    overflow: hidden;
    padding: .8rem .8rem .8rem .85rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 1rem;
    background: rgba(28, 27, 35, .94);
    box-shadow: 0 16px 45px rgba(0,0,0,.48), 0 0 0 1px rgba(244,63,94,.06);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    pointer-events: auto;
    cursor: pointer;
    animation: pulse-message-in .28s cubic-bezier(.2,.8,.2,1) both;
}
.pulse-message-popup.is-leaving {
    animation: pulse-message-out .2s ease-in both;
}
.pulse-message-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    object-fit: cover;
    background: #27232f;
    border: 1px solid rgba(255,255,255,.1);
}
.pulse-message-copy {
    min-width: 0;
}
.pulse-message-heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}
.pulse-message-heading strong {
    overflow: hidden;
    color: #fff;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pulse-message-heading span {
    flex: 0 0 auto;
    color: #85808e;
    font-size: .62rem;
}
.pulse-message-copy p {
    overflow: hidden;
    margin: .22rem 0 0;
    color: #c4bfca;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pulse-message-close {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #77727e;
    font-size: 1rem;
    cursor: pointer;
}
.pulse-message-close:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
}
.pulse-message-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #fb7185, #db2777);
    transform-origin: left;
    animation: pulse-message-progress 6s linear both;
}
@keyframes pulse-message-in {
    from { opacity: 0; transform: translateY(-14px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse-message-out {
    to { opacity: 0; transform: translateY(-8px) scale(.98); }
}
@keyframes pulse-message-progress {
    to { transform: scaleX(0); }
}
@media (min-width: 900px) {
    .pulse-message-popups {
        left: auto;
        right: 1.5rem;
        transform: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .pulse-message-popup,
    .pulse-message-popup.is-leaving,
    .pulse-message-progress { animation: none; }
}
