/* ============================================================================ Карта связей (экран «Связи»): canvas-карта, панель фильтров, кнопки масштаба, карточка выбранного человека, заметка и обозначения. Сама карта рисуется в canvas (js/pages/network/graph-canvas.js): цвета он берёт из токенов темы, поэтому здесь нет стилей точек и линий. Без blur-фильтров, backdrop-filter и бесконечных CSS-анимаций: они и грели ноутбук. ========================================================================== */ .network-screen, .net-legend-sheet, .net-group-menu { --net-family: #ff8a65; --net-close: var(--rel-family); --net-friend: var(--info); --net-contact: var(--text-secondary); /* Острова «Компаний» и «Интересов»: подложки на карте, точки у названий в списке и карточке. */ --net-island-0: #a891ff; --net-island-1: #56b2ff; --net-island-2: #ffbe56; --net-island-3: #ff7a98; --net-island-4: #4ad0be; --net-island-5: #ff9660; --net-island-6: #8490ff; --net-island-7: #ec84da; } :root[data-theme='light'] .network-screen, :root[data-theme='light'] .net-legend-sheet, :root[data-theme='light'] .net-group-menu { --net-family: #c2502a; --net-island-0: #6a4cd6; --net-island-1: #1676ce; --net-island-2: #b07800; --net-island-3: #cc3a64; --net-island-4: #008c7a; --net-island-5: #d2601e; --net-island-6: #424ece; --net-island-7: #b43aa0; } .net-board { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } .net-canvas { position: absolute; inset: 0; display: block; touch-action: none; cursor: grab; } .net-canvas.is-over-node { cursor: pointer; } .net-canvas.is-panning, .net-canvas.is-dragging { cursor: grabbing; } /* Нижний слой (сетка, кольца групп, аура) только рисует – нажатия ловит верхний. */ .net-canvas--back { pointer-events: none; } /* Через этот элемент движок узнаёт итоговые цвета токенов темы. */ .net-color-probe { position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; } /* Кнопки масштаба: справа внизу, над нижним меню и карточкой (bottom задаёт JS). */ .net-zoom { position: absolute; right: var(--page-gutter, 14px); bottom: 12px; z-index: 11; display: grid; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; } .net-zoom[hidden] { display: none; } .net-zoom__btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 0; color: var(--text-secondary); } .net-zoom__btn + .net-zoom__btn { border-top: 1px solid var(--border-subtle); } .net-zoom__btn:active { color: var(--text-primary); background: var(--surface-raised); } @media (hover: hover) { .net-zoom__btn:hover { color: var(--text-primary); background: var(--surface-raised); } } .net-zoom__btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; } .net-zoom__btn svg { width: 20px; height: 20px; } /* Карточка выбранного человека: аватар, имя, кто это вам, действия. */ .net-card { position: absolute; left: var(--page-gutter, 14px); right: var(--page-gutter, 14px); bottom: 12px; z-index: 12; max-width: 520px; margin-inline: auto; display: grid; gap: 10px; padding: 12px 12px 12px 14px; border: 1px solid var(--border-subtle); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); } .net-card[hidden] { display: none; } .net-card__head { display: flex; align-items: center; gap: 12px; } .net-card__avatar { flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; } .net-card__avatar.is-shining .avatar { border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rel-shining); } .net-card__answer { width: 100%; min-height: 40px; } .net-card__titles { flex: 1; min-width: 0; display: grid; gap: 2px; } .net-card__name { font-size: 16px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .net-card__meta { font-size: 12.5px; color: var(--text-secondary); } .net-card__close { flex: 0 0 auto; align-self: flex-start; width: 32px; height: 32px; display: grid; place-items: center; margin: -4px -2px 0 0; border-radius: 50%; color: var(--text-secondary); } .net-card__close svg { width: 18px; height: 18px; } .net-card__actions { display: flex; gap: 6px; } .net-card__action { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 7px; border-radius: 12px; background: var(--surface-raised); color: var(--text-primary); font-size: 11.5px; line-height: 1.2; } .net-card__action span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .net-card__action svg { width: 20px; height: 20px; color: var(--accent); } .net-card__action .spinner { width: 20px; height: 20px; } .net-card__action:active { background: var(--surface-selected); } @media (hover: hover) { .net-card__action:hover { background: var(--surface-selected); } } .net-card__action:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; } .net-card__action[aria-pressed='true'] { background: var(--surface-selected); } .net-card__action:disabled { color: var(--disabled-text); cursor: default; } .net-card__hint { margin: 0; font-size: 12px; color: var(--text-secondary); } /* Группы («Компании», «Интересы»): цветная точка острова, плашка группы, карточка группы. */ .net-group-dot { flex: 0 0 auto; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--group-color, var(--accent)); } .net-group-dot--rest { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-secondary); } .dropdown-menu__icon .net-group-dot { width: 12px; height: 12px; } .net-card__group-row { display: flex; align-items: center; gap: 8px; min-width: 0; } .net-group-chip { min-width: 0; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 9px; border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text-primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; } .net-group-chip svg { flex: 0 0 auto; width: 14px; height: 14px; color: var(--accent); } .net-group-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .net-group-chip:active { background: var(--surface-selected); } @media (hover: hover) { .net-group-chip:hover { background: var(--surface-selected); } } .net-group-chip:focus-visible, .net-card__move:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; } .net-card__move { flex: 0 0 auto; height: 30px; margin-left: auto; padding: 0 4px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; } .net-card__move:active { opacity: .7; } @media (hover: hover) { .net-card__move:hover { text-decoration: underline; } } /* Лица группы – три аватара внахлёст с ободком цвета острова. */ .net-card__faces { flex: 0 0 auto; display: flex; align-items: center; } .net-card__faces .avatar { border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--group-color, var(--border-subtle)); } .net-card__faces .avatar + .avatar { margin-left: -10px; } .net-card__related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; } .net-card__related-label, .net-card__related-text { color: var(--text-secondary); font-size: 12.5px; } /* Обозначения */ .net-legend { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; } .net-legend__row { display: flex; align-items: center; gap: 12px; color: var(--text-primary); } .net-legend__sample { flex: 0 0 32px; height: 16px; display: block; position: relative; } .net-legend__sample--line::before, .net-legend__sample--dash::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; border-top: 2.5px solid var(--net-contact); } .net-legend__sample--dash::before { border-top-style: dashed; } .net-legend__sample[data-type='close_friend']::before { border-top-color: var(--net-close); } .net-legend__sample[data-type='friend']::before { border-top-color: var(--net-friend); } .net-legend__sample[data-type='family']::before { border-top-color: var(--net-family); } .net-legend__sample[data-type='contact']::before { border-top-color: var(--net-contact); opacity: .6; } .net-legend__sample--aura { height: 32px; border-radius: 50%; background: radial-gradient(circle, var(--rel-shining) 0 34%, color-mix(in srgb, var(--rel-shining) 30%, transparent) 46%, transparent 70%); } .net-legend__sample--badge::before, .net-legend__sample--mark::before { content: ""; position: absolute; left: 8px; top: 0; width: 16px; height: 16px; border-radius: 50%; background: rgb(47, 140, 255); } .net-legend__sample--mark::before { background: var(--note-mark-green); } .net-legend__tips { display: grid; gap: 8px; margin: 8px 0 0; padding-left: 18px; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-sm, 1.45); } /* Поиск по связям поверх карты: найденные на карте и во всей сети. */ .net-search-panel { position: absolute; left: 0; right: 0; z-index: 13; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--page-gutter) var(--space-4); background: var(--background); scrollbar-width: none; } .net-search-panel::-webkit-scrollbar { display: none; } .net-search-panel[hidden] { display: none; } .net-search-note { margin: var(--space-4) 0; color: var(--text-secondary); font-size: var(--text-sm); text-align: center; } .net-search-loading { padding: var(--space-3) 0; }