:root {
    --site-banner-height: 0px;
    --site-banner-bg: var(--fg);
    --site-banner-fg: var(--bg);
}

.site-banner {
    position: relative;
    z-index: 5;
    background: var(--site-banner-bg);
    color: var(--site-banner-fg);
    border: 0;
}

.site-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.25rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.site-banner-hit {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    color: inherit;
    text-decoration: none;
    border: 0;
}

.site-banner-hit:hover .site-banner-text {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.site-banner-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    max-width: 7rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--site-banner-fg);
}

.site-banner-text {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.82rem;
    font-weight: 550;
    line-height: 1.35;
    color: var(--site-banner-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .site-banner-inner {
        min-height: 2.4rem;
    }
    .site-banner-text {
        font-size: 0.78rem;
    }
}

.site-banner-presence {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
    user-select: none;
}

.site-banner-presence-dot {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: site-banner-presence-pulse 1.8s ease-out infinite;
    flex-shrink: 0;
}

.site-banner-presence-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: inherit;
}

.site-banner-presence-label {
    font-weight: 400;
}

@keyframes site-banner-presence-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    70% {
        box-shadow: 0 0 0 0.4rem rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@media (max-width: 479px) {
    .site-banner-presence-label {
        display: none;
    }

    .site-banner-presence::after {
        content: "人";
        font-weight: 400;
    }
}
