.friends-page {
    min-height: 100vh;
    padding: 120px 0 64px;
    background: var(--bg-secondary);
}

.friends-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.friends-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.friends-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0;
}

.friends-header h1 {
    margin: 0;
    font-size: 2.4rem;
    color: var(--text-primary);
}

.friends-header p {
    margin: 8px 0 0;
    color: var(--text-secondary);
}

.friends-load-more button,
.friends-login-card button {
    min-height: 52px;
    border: 0;
    border-radius: var(--radius-full);
    padding: 0 24px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(255, 107, 53, 0.2);
}

.friends-state {
    min-height: 24px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.friends-state.error {
    color: #dc2626;
}

.friends-state.info,
.friends-state.muted {
    color: var(--text-muted);
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.friend-card,
.friends-login-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.friend-card {
    overflow: hidden;
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.friend-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 107, 53, 0.32);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09);
}

.friend-avatar-button {
    width: 100%;
    display: block;
}

.friend-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #fff0eb;
}

.friend-body {
    padding: 16px;
}

.friend-body h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.friend-meta {
    margin: 0 0 12px;
    color: var(--primary-color);
    font-size: 0.86rem;
    font-weight: 600;
}

.friend-owner {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font: inherit;
    text-align: left;
}

.friend-owner small {
    color: var(--text-muted);
}

.friend-card:hover .friend-owner span {
    color: var(--primary-color);
}

.friends-login-card {
    grid-column: 1 / -1;
    padding: 32px;
    text-align: center;
}

.friends-login-card h2 {
    margin: 0 0 8px;
}

.friends-login-card p {
    margin: 0 auto 20px;
    max-width: 480px;
    color: var(--text-secondary);
}

.friends-load-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

@media (max-width: 720px) {
    .friends-page {
        padding-top: 96px;
    }

    .friends-shell {
        width: min(100% - 28px, 1180px);
    }

    .friends-header h1 {
        font-size: 1.9rem;
    }

}
