:root {
    --notice-height: 44px;
}

.community-notice {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: var(--notice-height);
    padding: 8px 24px;
    border-bottom: 1px solid #79bfff40;
    background: #17242d;
    color: #c7ddeb;
}

.community-notice-label {
    flex-shrink: 0;
    padding: 3px 7px;
    border: 1px solid #79bfff45;
    border-radius: 3px;
    color: #9ecef9;
    font: 700 8px/1.5 Manrope, Arial, sans-serif;
    letter-spacing: 0.9px;
}

.community-notice p {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    text-align: center;
    text-wrap: pretty;
}

.community-notice strong {
    color: #edf6ff;
    font-weight: 700;
}

.site-header {
    top: var(--notice-height);
}

.sidebar {
    top: calc(var(--header) + var(--notice-height));
}

.reading-track {
    top: calc(var(--header) + var(--notice-height) - 1px);
}

.rail-inner {
    top: calc(120px + var(--notice-height));
    max-height: calc(100vh - 146px - var(--notice-height));
}

html {
    scroll-padding-top: calc(114px + var(--notice-height));
}

@media (max-width: 1000px) {
    :root {
        --notice-height: 56px;
    }

    .community-notice-label {
        display: none;
    }
}

@media (max-width: 800px) {
    #sidebar-backdrop.is-open {
        inset: calc(var(--header) + var(--notice-height)) 0 0;
    }
}

@media (max-width: 570px) {
    :root {
        --notice-height: 84px;
    }

    .community-notice {
        padding: 9px 18px;
    }
}

@media print {
    :root {
        --notice-height: 0px;
    }

    .community-notice {
        position: static;
        height: auto;
        color: #111;
        background: white;
    }

    .community-notice strong {
        color: #111;
    }
}
