.add-friend-page-header {
    position: relative;
}

.add-friend-ai-assist-entry {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 76px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid rgba(117, 87, 126, .2);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(239, 232, 246, .92));
    color: #654d70;
    box-shadow: 0 4px 14px rgba(92, 67, 105, .11);
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    z-index: 2;
}

.add-friend-ai-assist-entry[hidden] {
    display: none !important;
}

.add-friend-ai-assist-entry svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.add-friend-ai-assist-entry:active {
    transform: translateY(-50%) scale(.97);
}

/* 老虎咪聊天窗口顶部的协助操作条 */
.role-card-assist-bar {
    flex: 0 0 auto;
    padding: 8px 10px 0;
    position: relative;
    z-index: 12;
    background: linear-gradient(180deg, rgba(247, 247, 247, .98), rgba(247, 247, 247, .82));
}

.role-card-assist-bar-card {
    border: 1px solid rgba(105, 77, 116, .18);
    border-radius: 15px;
    padding: 10px 12px 11px;
    background:
        radial-gradient(circle at 88% 0%, rgba(139, 185, 214, .2), transparent 35%),
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(246, 239, 249, .97));
    box-shadow: 0 7px 20px rgba(74, 52, 85, .09);
}

.role-card-assist-bar-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-card-assist-bar-spark {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(145deg, #8f6ea0, #78aeca);
    color: #fff;
    box-shadow: 0 4px 10px rgba(101, 76, 113, .2);
}

.role-card-assist-bar-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.role-card-assist-bar-title strong {
    color: #4f3d58;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-card-assist-bar-title small {
    color: #8b738f;
    font-size: 10.5px;
}

.role-card-assist-bar-hint,
.role-card-assist-bar-error {
    margin: 8px 0 0;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 10.5px;
    line-height: 1.5;
}

.role-card-assist-bar-hint {
    background: rgba(122, 175, 199, .1);
    color: #526f80;
}

.role-card-assist-bar-error {
    background: rgba(253, 240, 239, .8);
    color: #98585c;
}

.role-card-assist-bar-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(121, 166, 192, .1);
    color: #526f80;
    font-size: 11px;
    line-height: 1.45;
}

.role-card-assist-bar-progress > span {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid rgba(82, 111, 128, .2);
    border-top-color: #668ca1;
    border-radius: 50%;
    animation: roleCardAssistSpin .85s linear infinite;
}

@keyframes roleCardAssistSpin {
    to { transform: rotate(360deg); }
}

.role-card-assist-bar-actions {
    display: flex;
    gap: 7px;
    margin-top: 8px;
}

.role-card-assist-bar-btn {
    flex: 1 1 auto;
    min-height: 33px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 750;
    white-space: nowrap;
}

.role-card-assist-bar-btn--primary {
    border: 1px solid rgba(105, 77, 116, .16);
    background: linear-gradient(145deg, #846592, #719fb8);
    color: #fff;
    box-shadow: 0 5px 13px rgba(101, 76, 113, .18);
}

.role-card-assist-bar-btn--danger {
    flex: 0 0 auto;
    border: 1px solid rgba(155, 87, 93, .18);
    background: rgba(255, 255, 255, .84);
    color: #9b575d;
}

.role-card-assist-bar-btn:active {
    transform: scale(.97);
}

@media (prefers-reduced-motion: reduce) {
    .role-card-assist-bar-progress > span {
        animation-duration: 1.8s;
    }
}
