/* Leaderboard card — Phase 3 pack-home surface.
 *
 * Forest/sand palette mirroring the rest of the hub. Mobile-first sizing:
 * fits inside the same horizontal rhythm as the .hub-community-grid section
 * directly above it.
 */
.lb-card {
    background: #fbfaf5;
    border: 1px solid #e7e3d4;
    border-radius: 14px;
    padding: 16px;
    margin: 16px auto;
    max-width: 720px;
    box-shadow: 0 1px 3px rgba(20, 40, 26, 0.04);
}

.lb-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.lb-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--forest-800, #1a3a2a);
    font-family: 'Fraunces', Georgia, serif;
    letter-spacing: 0.01em;
}

.lb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.lb-row.is-clickable {
    cursor: pointer;
}

.lb-row.is-clickable:hover,
.lb-row.is-clickable:focus-within {
    background: #f3efe1;
}

/* Avatar — square slot, image fills + crops if needed. Initial fallback
 * is a soft sage circle so the row reads consistently regardless of
 * whether we have an avatar URL. */
.lb-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #d5dcc7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #355e3b;
    font-weight: 600;
    font-size: 0.95rem;
}

.lb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lb-avatar-initial {
    line-height: 1;
}

.lb-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lb-headline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--forest-800, #1a3a2a);
    font-weight: 600;
    font-size: 0.95rem;
}

/* userLinkEl renders either <a class="user-link"> or <span class="user-name">.
 * In this card both should look identical except for hover underline. */
.lb-headline .user-link,
.lb-headline .user-name {
    color: inherit;
}

.lb-tier {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
}

.lb-tier-expert {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #78350f;
    border-color: #fcd34d;
}

.lb-tier-emoji {
    font-size: 0.85rem;
    line-height: 1;
}

.lb-guide-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.lb-areas {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.lb-area-chip {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    background: #f3efe1;
    color: #5a4d2c;
    border: 1px solid #e7e3d4;
}

.lb-area-more {
    font-size: 0.7rem;
    color: #6b7280;
}

.lb-stat {
    font-size: 0.78rem;
    color: #6b7280;
}

.lb-see-all {
    display: block;
    margin-top: 12px;
    text-align: right;
    color: var(--forest-600, #2d5a3d);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.lb-see-all:hover,
.lb-see-all:focus-visible {
    text-decoration: underline;
}
