.share-announcement-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.share-announcement-btn:hover,
.share-announcement-btn:focus-visible {
    background: #f4f6f8;
    border-color: rgba(0, 0, 0, 0.2);
    outline: none;
}

.share-announcement-btn__icon {
    width: 1.1rem;
    height: 1.1rem;
    flex: none;
    color: #4361ee;
}

.share-announcement-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.share-copy-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 13000;
    max-width: min(92vw, 420px);
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    background: #0f766e;
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.share-copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.share-copy-toast--error {
    background: #b91c1c;
}

.share-copy-toast[hidden] {
    display: none !important;
}

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.share-modal[hidden] {
    display: none !important;
}

.share-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.share-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 16px;
    background: #fff;
    color: #111;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 1.25rem 1.25rem 1rem;
}

.share-modal__title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.share-modal__hint {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    color: #555;
}

.share-modal__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.share-modal__textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid #ccd3da;
    border-radius: 10px;
    padding: 0.75rem;
    font: inherit;
    line-height: 1.45;
}

.share-modal__textarea:focus {
    outline: 2px solid rgba(14, 116, 144, 0.35);
    border-color: #0e7490;
}

.share-modal__counter {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #666;
}

.share-modal__counter--warn {
    color: #b45309;
}

.share-modal__url {
    margin: 0.85rem 0 1rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 0.85rem;
    word-break: break-all;
}

.share-modal__networks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.share-modal__network {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
}

.share-modal__network:hover,
.share-modal__network:focus-visible {
    border-color: #0e7490;
    background: #f0fdfa;
    outline: none;
}

.share-modal__network-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.share-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.share-modal__btn {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font: inherit;
    cursor: pointer;
}

.share-modal__btn--secondary {
    background: #eef2f7;
    color: #111;
}

.share-modal__btn--primary {
    background: #0e7490;
    color: #fff;
}

.share-modal__toast {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: #047857;
}

.share-modal__toast--error {
    color: #b91c1c;
}

@media (max-width: 520px) {
    .share-modal__networks {
        grid-template-columns: 1fr;
    }
}

.album-genealogy-context-menu__item--submenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.album-genealogy-context-menu-stack {
    position: absolute;
    z-index: 100010;
}

.album-genealogy-context-menu-stack > .album-genealogy-context-menu:not(.album-genealogy-context-menu--flyout) {
    position: relative;
    top: auto;
    left: auto;
}

.album-genealogy-context-menu {
    position: absolute;
    z-index: 100010;
    min-width: 220px;
    padding: 6px 0;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.dark .album-genealogy-context-menu {
    background: #0e1726;
    border-color: rgba(255, 255, 255, 0.08);
}

.album-genealogy-context-menu-stack > .album-genealogy-context-menu--flyout {
    position: absolute;
    left: calc(100% + 12px);
    min-width: 170px;
    z-index: 100011;
}

.album-genealogy-context-menu__item {
    display: block;
    width: 100%;
    padding: 9px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 14px;
    line-height: 1.3;
    color: #3b3f5c;
    cursor: pointer;
}

.dark .album-genealogy-context-menu__item {
    color: #e0e6ed;
}

.album-genealogy-context-menu__item:hover,
.album-genealogy-context-menu__item.is-active {
    background: rgba(67, 97, 238, 0.08);
}

.album-genealogy-context-menu__item:disabled {
    opacity: 0.45;
    cursor: default;
}

footer .social-link.bg-vk {
    background: #0077ff;
}

footer .social-link.bg-ok {
    background: #ee8208;
}

footer .social-link.bg-zenfeed {
    background: #111;
    color: #fff;
}

footer .social-link.bg-zenfeed:focus,
footer .social-link.bg-zenfeed:hover {
    background: #000;
    color: #fff;
}

footer .social-link {
    overflow: hidden;
    padding: 0;
}

footer .social-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

footer .social-link:focus img,
footer .social-link:hover img {
    filter: brightness(1.08);
}
