/* Official communities beside the persistent server-status bot. */
.community-widget {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 258px;
    max-width: calc(100vw - 24px);
}
.community-widget .telegram-bot-button {
    position: static;
    justify-content: center;
    box-sizing: border-box;
}
.community-widget__links {
    display: flex;
    gap: 6px;
}
.community-widget__link {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    color: #fff !important;
    background: #182735;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .35);
    font: 600 12px/1.2 "Open Sans", Helvetica, Arial, sans-serif;
    text-decoration: none !important;
    transition: border-color .18s ease, background .18s ease;
}
.community-widget__link--telegram { background: #166b94; }
.community-widget__link--vk { background: #15549b; }
.community-widget__link--discord { background: #4148a5; }
.community-widget__link:hover { border-color: #fff; }
.community-widget__link:focus-visible {
    outline: 3px solid #c9eaff;
    outline-offset: 3px;
}
@media (max-width: 767px) {
    .community-widget {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        width: 246px;
        gap: 6px;
    }
    .community-widget__link { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .community-widget__link { transition: none; }
}

.community-widget__toggle { display:none; }
.community-widget__content { display:flex; flex-direction:column; gap:8px; }
@media (min-width:768px) { .community-widget:not([open]) > .community-widget__content { display:flex; } }
@media (max-width:767px) {
 .community-widget { width:auto; max-width:246px; }
 .community-widget__toggle { display:block; cursor:pointer; padding:10px 16px; border:1px solid #53758a; border-radius:22px; color:#fff; background:#182735; font:600 13px/1.4 sans-serif; list-style:none; }
 .community-widget__toggle::-webkit-details-marker { display:none; }
 .community-widget__toggle:focus-visible { outline:3px solid #c9eaff; outline-offset:3px; }
 .community-widget[open] { width:246px; }
 .community-widget:not([open]) > .community-widget__content { display:none; }
}
