.fad-messages-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.fad-unread-badge:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #ef476f;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

/* Keep crowded bottom menus on one line with horizontal scrolling. */
.bottom-nav {
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    box-sizing: border-box;
    padding: 10px 14px;
}

.bottom-nav > a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 7px 10px;
}

/* Keep unread counters visible inside both header and bottom navigation. */
.fad-messages-link {
    overflow: visible;
    flex-shrink: 0;
}

.fad-unread-badge:not([hidden]) {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

/* Members page: make the message link stand out in its top header. */
.site-header nav .fad-messages-link {
    background: #172d4e;
    border: 1px solid #385b86;
    border-radius: 9px;
    padding: 9px 11px;
    color: #e8f2ff;
}

.site-header nav .fad-unread-badge:not([hidden]) {
    background: #ef476f;
    color: #fff;
}
