/* =====================================================
   InfinityOS // SOCIAL_LINKS.EXE
   ===================================================== */

#charModal.is-character-switching .modal-box {
    filter: drop-shadow(-4px 0 0 var(--neon-cyan)) drop-shadow(4px 0 0 var(--neon-magenta));
    transform: translateX(3px);
}

.relationship-map-launch {
    position: relative;
    align-self: center;
    min-height: 48px;
    margin: 0 20px 20px;
    padding: 10px 18px;
    overflow: hidden;
    color: #fff;
    border: 3px solid var(--neon-cyan);
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.14), rgba(138, 43, 226, 0.18), rgba(255, 61, 242, 0.14)), #10071c;
    box-shadow: 5px 5px 0 #000, inset 0 0 16px rgba(0, 255, 255, 0.08);
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.3vw, 13px);
    line-height: 1.25;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 120ms steps(2), color 120ms, background-color 120ms, box-shadow 120ms;
}

.relationship-map-launch::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.4) 46%, transparent 72%);
    transform: translateX(-130%);
    animation: relationship-launch-scan 3.8s ease-in-out infinite;
}

.relationship-map-launch:hover,
.relationship-map-launch:focus-visible,
.relationship-map-launch.is-active {
    color: #05000a;
    border-color: #fff;
    background: var(--neon-cyan);
    box-shadow: -4px 4px 0 var(--neon-magenta), 0 0 18px rgba(0, 255, 255, 0.34);
    transform: translate(3px, -3px);
}

.relationship-map-launch:focus-visible,
.relationship-map button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.relationship-map[hidden] {
    display: none;
}

.relationship-map {
    position: fixed;
    inset: clamp(18px, 4vh, 42px) clamp(12px, 4vw, 44px);
    z-index: 100260;
    display: flex;
    flex-direction: column;
    width: min(1180px, calc(100vw - clamp(24px, 8vw, 88px)));
    max-height: calc(100dvh - clamp(36px, 8vh, 84px));
    margin: auto;
    overflow: hidden auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    color: #fff;
    border: 3px solid color-mix(in srgb, var(--relationship-active, var(--neon-cyan)) 78%, #fff);
    background:
        linear-gradient(rgba(0, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 61, 242, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--relationship-active, var(--neon-cyan)) 16%, transparent), transparent 32%),
        linear-gradient(145deg, #0d0718, #05030a 64%, #10061a);
    background-size: 24px 24px, 24px 24px, auto, auto;
    box-shadow: 8px 8px 0 #000, 0 0 24px color-mix(in srgb, var(--relationship-active, var(--neon-cyan)) 24%, transparent);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 150ms ease, transform 150ms steps(3), border-color 150ms;
    scrollbar-color: #c0c0c0 #9a9a9a;
    scrollbar-width: auto;
    -webkit-overflow-scrolling: touch;
}

.relationship-map::-webkit-scrollbar {
    width: 24px;
    height: 24px;
    background: #c0c0c0;
}

.relationship-map::-webkit-scrollbar-track {
    background:
        repeating-linear-gradient(45deg, #bdbdbd 0 2px, #9f9f9f 2px 4px);
    border-left: 2px solid #05000a;
    box-shadow:
        inset 2px 2px 0 #808080,
        inset -2px -2px 0 #ffffff;
}

.relationship-map::-webkit-scrollbar-thumb {
    min-height: 54px;
    background:
        linear-gradient(90deg, transparent 45%, rgba(0, 0, 0, 0.18) 45% 55%, transparent 55%),
        linear-gradient(#d8d8d8, #b8b8b8);
    border: 3px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow:
        inset 1px 1px 0 #f2f2f2,
        inset -1px -1px 0 #808080,
        0 0 0 1px #05000a;
}

.relationship-map::-webkit-scrollbar-button:vertical {
    height: 24px;
    background: #c0c0c0;
    border: 3px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: inset 1px 1px 0 #f2f2f2, inset -1px -1px 0 #808080;
}

.relationship-map::-webkit-scrollbar-button:vertical:decrement {
    background:
        linear-gradient(135deg, transparent 50%, #05000a 50%) 8px 9px / 8px 8px no-repeat,
        linear-gradient(225deg, transparent 50%, #05000a 50%) 8px 9px / 8px 8px no-repeat,
        #c0c0c0;
}

.relationship-map::-webkit-scrollbar-button:vertical:increment {
    background:
        linear-gradient(45deg, transparent 50%, #05000a 50%) 8px 7px / 8px 8px no-repeat,
        linear-gradient(315deg, transparent 50%, #05000a 50%) 8px 7px / 8px 8px no-repeat,
        #c0c0c0;
}

.relationship-map.is-ready {
    opacity: 1;
    transform: none;
}

.relationship-map-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px 10px;
    border-bottom: 3px solid var(--relationship-active, var(--neon-cyan));
    background: linear-gradient(90deg, color-mix(in srgb, var(--relationship-active, var(--neon-cyan)) 25%, #0a0612), #0a0612 70%);
}

.relationship-map-path,
.relationship-map-header p,
.relationship-map-instructions,
.relationship-node-status,
.relationship-detail-signal,
.relationship-detail-field > span,
.relationship-detail-comment > span,
.relationship-hologram small {
    font-family: var(--font-pixel);
    letter-spacing: 0.045em;
}

.relationship-map-path {
    display: block;
    margin-bottom: 5px;
    color: var(--neon-cyan);
    font-size: 9px;
}

.relationship-map-header h3 {
    margin: 0;
    color: #fff;
    font-family: var(--font-pixel);
    font-size: clamp(18px, 2.7vw, 28px);
    line-height: 1;
    text-shadow: 3px 3px 0 #000, 0 0 12px var(--relationship-active, var(--neon-magenta));
}

.relationship-map-header p {
    margin: 7px 0 0;
    color: #d8d3e2;
    font-size: 9px;
}

.relationship-map-close {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    color: #fff;
    border: 2px solid #fff;
    background: #250c32;
    font-family: var(--font-pixel);
    cursor: pointer;
}

.relationship-map-close:hover,
.relationship-map-close:focus-visible {
    color: #05000a;
    background: var(--neon-magenta);
}

.relationship-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.46);
}

.relationship-legend-item {
    --link-color: #aaa6b6;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #e9e5ef;
    font-family: var(--font-pixel);
    font-size: 8px;
    line-height: 1.25;
}

.relationship-legend-item i {
    width: 22px;
    height: 4px;
    border: 1px solid #fff;
    background: var(--link-color);
    box-shadow: 0 0 7px var(--link-color);
}

.relationship-map-instructions {
    margin: 0;
    padding: 8px 14px 0;
    color: #c8c3d1;
    font-size: 8px;
    line-height: 1.5;
}

.relationship-map-layout {
    display: grid;
    flex: 1 1 auto;
    gap: 14px;
    padding: 12px;
}

.relationship-stage {
    position: relative;
    min-width: 0;
    min-height: 390px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background:
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--relationship-active, var(--neon-cyan)) 12%, transparent), transparent 26%),
        linear-gradient(rgba(0, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 61, 242, 0.03) 1px, transparent 1px),
        rgba(0, 0, 0, 0.34);
    background-size: auto, 32px 32px, 32px 32px, auto;
    isolation: isolate;
}

.relationship-stage::after {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) top left / 48px 2px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) top left / 2px 48px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) top right / 48px 2px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) top right / 2px 48px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) bottom left / 48px 2px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) bottom left / 2px 48px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) bottom right / 48px 2px no-repeat,
        linear-gradient(var(--neon-cyan), var(--neon-cyan)) bottom right / 2px 48px no-repeat;
    opacity: 0.44;
}

.relationship-stage-hud {
    position: absolute;
    inset: 12px 14px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.52);
    font-family: var(--font-pixel);
    font-size: 7px;
    letter-spacing: 0.08em;
}

.relationship-stage-hud span:nth-child(2) {
    position: absolute;
    bottom: 0;
    left: 0;
    color: var(--neon-cyan);
}

.relationship-stage-hud span:nth-child(3) {
    color: var(--relationship-active, var(--neon-magenta));
}

.relationship-stage-scan {
    position: absolute;
    top: -16%;
    right: 0;
    left: 0;
    z-index: 2;
    height: 56px;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 255, 0.06), rgba(255, 255, 255, 0.12), transparent);
    mix-blend-mode: screen;
    animation: relationship-stage-scan 6s linear infinite;
}

.relationship-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.relationship-lines line {
    stroke: var(--link-color, #aaa6b6);
    stroke-width: 3;
    stroke-dasharray: 7 9;
    vector-effect: non-scaling-stroke;
    opacity: 0.38;
    filter: drop-shadow(0 0 2px var(--link-color));
    transition: opacity 150ms, stroke-width 150ms, filter 150ms;
}

.relationship-lines line.is-preview {
    stroke-width: 5;
    opacity: 0.78;
}

.relationship-lines line.is-selected {
    stroke-width: 7;
    stroke-dasharray: none;
    opacity: 1;
    filter: drop-shadow(0 0 6px var(--link-color));
}

.relationship-active-node,
.relationship-node {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    border: 2px solid var(--node-accent, var(--relationship-active, var(--neon-cyan)));
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 45%), rgba(12, 7, 20, 0.94);
    box-shadow: 4px 4px 0 #000, 0 0 12px color-mix(in srgb, var(--node-accent, var(--relationship-active, var(--neon-cyan))) 34%, transparent);
}

.relationship-active-node {
    --node-accent: var(--relationship-active, var(--neon-cyan));
    top: 50%;
    left: 50%;
    width: 142px;
    min-height: 166px;
    padding: 8px;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    transform: translate(calc(-50% + var(--pointer-x, 0px)), calc(-50% + var(--pointer-y, 0px)));
    transition: transform 220ms ease-out;
}

.relationship-active-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 94px;
    height: 94px;
    margin: 5px auto 4px;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: color-mix(in srgb, var(--relationship-active, var(--neon-cyan)) 18%, #07040d);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5), 0 0 14px color-mix(in srgb, var(--relationship-active, var(--neon-cyan)) 45%, transparent);
}

.relationship-active-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    animation: relationship-icon-float 3.4s ease-in-out infinite;
}

.relationship-active-node strong {
    display: block;
    color: #05000a;
    padding: 5px 8px;
    border: 2px solid #fff;
    background: var(--relationship-active, var(--neon-cyan));
    box-shadow: 3px 3px 0 #000;
    font-family: var(--font-pixel);
    font-size: 12px;
    text-transform: uppercase;
}

.relationship-active-node > small {
    margin-top: 6px;
    color: #d5cfdd;
    font-family: var(--font-pixel);
    font-size: 6px;
    letter-spacing: 0.06em;
}

.relationship-node-status {
    color: #fff;
    font-size: 7px;
    text-shadow: 0 0 8px var(--relationship-active, var(--neon-cyan));
}

.relationship-nodes {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.relationship-node {
    --link-color: #aaa6b6;
    width: 124px;
    min-height: 82px;
    gap: 5px;
    padding: 7px;
    cursor: pointer;
    touch-action: manipulation;
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
    transition: transform 140ms steps(2), border-color 140ms, box-shadow 140ms, filter 140ms;
}

.relationship-node::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border: 1px solid #fff;
    border-radius: 50%;
    background: var(--link-color);
    box-shadow: 0 0 7px var(--link-color);
}

.relationship-node-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border: 2px solid var(--node-accent);
    border-radius: 50%;
    background: #08050e;
}

.relationship-node-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 160ms ease, filter 160ms ease;
}

.relationship-node-copy {
    min-width: 0;
    text-align: center;
}

.relationship-node strong,
.relationship-node small {
    display: block;
    overflow-wrap: anywhere;
}

.relationship-node strong {
    color: #fff;
    font-family: var(--font-pixel);
    font-size: 9px;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
}

.relationship-node small {
    margin-top: 3px;
    color: var(--link-color);
    font-family: var(--font-pixel);
    font-size: 5px;
    line-height: 1.2;
}

.relationship-node[data-slot="1"] { top: 18%; left: 17%; transform: translate(-50%, -50%); }
.relationship-node[data-slot="2"] { top: 18%; left: 83%; transform: translate(-50%, -50%); }
.relationship-node[data-slot="3"] { top: 50%; left: 10%; transform: translate(-50%, -50%); }
.relationship-node[data-slot="4"] { top: 50%; left: 90%; transform: translate(-50%, -50%); }
.relationship-node[data-slot="5"] { top: 82%; left: 22%; transform: translate(-50%, -50%); }
.relationship-node[data-slot="6"] { top: 82%; left: 78%; transform: translate(-50%, -50%); }

.relationship-node.is-preview,
.relationship-node:hover,
.relationship-node:focus-visible {
    filter: brightness(1.15) saturate(1.08);
}

.relationship-node.is-selected {
    z-index: 5;
    border-color: #fff;
    filter: brightness(1.2) saturate(1.12);
    box-shadow: -4px 4px 0 var(--link-color), 0 0 18px color-mix(in srgb, var(--link-color) 54%, transparent);
}

.relationship-node.is-selected .relationship-node-portrait img,
.relationship-node:hover .relationship-node-portrait img,
.relationship-node:focus-visible .relationship-node-portrait img {
    filter: drop-shadow(0 0 6px var(--node-accent));
    transform: scale(1.08);
}

.relationship-node[data-slot]:hover,
.relationship-node[data-slot]:focus-visible,
.relationship-node[data-slot].is-preview,
.relationship-node[data-slot].is-selected {
    transform: translate(calc(-50% + 3px), calc(-50% - 4px)) scale(1.04);
}

.relationship-map.is-ready .relationship-node {
    animation: relationship-node-arrive 320ms steps(4) both;
    animation-delay: calc(var(--slot-index, 0) * 45ms + 60ms);
}

.relationship-detail {
    --link-color: #aaa6b6;
    position: relative;
    min-width: 0;
    padding: 13px;
    overflow: hidden;
    border: 3px solid var(--link-color);
    background:
        linear-gradient(155deg, color-mix(in srgb, var(--link-color) 9%, transparent), transparent 42%),
        rgba(6, 3, 12, 0.96);
    box-shadow: 5px 5px 0 #000;
    transition: border-color 160ms, box-shadow 160ms;
}

.relationship-detail::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -35%;
    width: 24%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--link-color) 15%, transparent), transparent);
    transform: skewX(-12deg);
}

.is-link-updating .relationship-detail::after {
    animation: relationship-detail-sweep 340ms ease-out;
}

.relationship-detail-signal {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    padding-bottom: 7px;
    color: var(--neon-cyan);
    border-bottom: 1px dashed rgba(0, 255, 255, 0.45);
    font-size: 8px;
}

.relationship-duo {
    position: relative;
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(300px, 1fr) minmax(170px, 240px);
    align-items: end;
    min-height: 310px;
    margin: 0 auto 12px;
    isolation: isolate;
}

.relationship-duo::before {
    content: "";
    position: absolute;
    right: 5%;
    bottom: 39px;
    left: 5%;
    z-index: -1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--source-accent), var(--link-color), var(--target-accent), transparent);
    box-shadow: 0 0 12px var(--link-color);
    opacity: 0.62;
}

.relationship-hologram {
    position: relative;
    z-index: 1;
    display: grid;
    align-self: stretch;
    grid-template-rows: 1fr auto;
    min-width: 0;
    margin: 0;
    text-align: center;
}

.relationship-hologram > span {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 250px;
    overflow: hidden;
}

.relationship-hologram > span::after {
    content: "";
    position: absolute;
    right: 14%;
    bottom: 4px;
    left: 14%;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--hologram-accent);
    box-shadow: 0 0 18px var(--hologram-accent);
    opacity: 0.7;
    transform: perspective(50px) rotateX(62deg);
}

.relationship-hologram img {
    position: relative;
    z-index: 1;
    width: auto;
    height: 270px;
    max-width: 100%;
    object-fit: contain;
    object-position: center bottom;
    opacity: 0.64;
    filter: saturate(0.72) brightness(1.15) drop-shadow(0 0 8px var(--hologram-accent));
    animation: relationship-hologram-float 3.6s ease-in-out infinite;
}

.relationship-hologram-source {
    --hologram-accent: var(--source-accent, var(--relationship-active, var(--neon-cyan)));
}

.relationship-hologram-target {
    --hologram-accent: var(--target-accent, var(--link-color));
}

.relationship-hologram-target img {
    animation-delay: -1.1s;
}

.relationship-hologram figcaption {
    position: relative;
    z-index: 3;
    min-height: 39px;
    padding: 6px 5px;
    border-top: 2px solid var(--hologram-accent);
    background: rgba(6, 3, 12, 0.82);
}

.relationship-hologram small,
.relationship-hologram strong {
    display: block;
}

.relationship-hologram small {
    margin-bottom: 4px;
    color: #aaa4b5;
    font-size: 6px;
}

.relationship-hologram strong {
    color: #fff;
    font-family: var(--font-pixel);
    font-size: 11px;
    text-transform: uppercase;
    text-shadow: 0 0 9px var(--hologram-accent);
}

.relationship-link-core {
    position: relative;
    z-index: 4;
    align-self: center;
    min-width: 0;
    padding: 14px 20px;
    border: 1px solid color-mix(in srgb, var(--link-color) 48%, transparent);
    background: rgba(5, 2, 10, 0.88);
    box-shadow: inset 0 0 20px color-mix(in srgb, var(--link-color) 8%, transparent);
    text-align: center;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.relationship-link-icons {
    display: grid;
    grid-template-columns: 72px minmax(48px, 1fr) 72px;
    align-items: center;
    width: min(100%, 360px);
    margin: 0 auto 13px;
}

.relationship-link-icon {
    display: flex;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #08050e;
    box-shadow: 0 0 13px var(--link-color);
}

.relationship-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.relationship-thread {
    position: relative;
    display: block;
    height: 4px;
    border-block: 1px solid #fff;
    background: var(--link-color);
    box-shadow: 0 0 10px var(--link-color);
}

.relationship-thread::before,
.relationship-thread::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border: 1px solid #fff;
    background: var(--link-color);
    transform: translateY(-50%) rotate(45deg);
}

.relationship-thread::before { left: -4px; }
.relationship-thread::after { right: -4px; }

.relationship-thread i {
    position: absolute;
    top: 50%;
    left: 0;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--link-color);
    box-shadow: 0 0 12px var(--link-color);
    transform: translate(-50%, -50%);
    animation: relationship-thread-pulse 2.2s ease-in-out infinite;
}

.relationship-detail-type {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 8px;
    color: #05000a;
    border: 2px solid #fff;
    background: var(--link-color);
    box-shadow: 3px 3px 0 #000;
    font-family: var(--font-pixel);
    font-size: 9px;
}

.relationship-detail-field {
    margin-bottom: 12px;
}

.relationship-detail-field > span,
.relationship-detail-comment > span {
    display: block;
    margin-bottom: 5px;
    color: #aaa4b5;
    font-size: 7px;
}

.relationship-detail-field strong {
    display: block;
    color: #fff;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.2;
}

.relationship-detail-label strong {
    color: var(--link-color);
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.3vw, 13px);
    line-height: 1.45;
    text-shadow: 2px 2px 0 #000;
}

.relationship-detail-comment {
    position: relative;
    z-index: 3;
    width: min(100%, 840px);
    margin: 0 auto 15px;
    padding: 12px 14px;
    border-left: 4px solid var(--relationship-active, var(--neon-magenta));
    background: rgba(255, 255, 255, 0.055);
}

.relationship-detail-comment > span {
    color: var(--relationship-active, var(--neon-cyan));
}

.relationship-detail-comment blockquote {
    margin: 0;
    color: #f5f1f8;
    font-size: 17px;
    line-height: 1.42;
}

.relationship-detail-comment blockquote::before { content: "“"; }
.relationship-detail-comment blockquote::after { content: "”"; }

.relationship-open-card {
    position: relative;
    z-index: 3;
    display: block;
    width: min(100%, 420px);
    min-height: 48px;
    margin: 0 auto;
    padding: 9px 11px;
    color: #fff;
    border: 3px solid var(--neon-cyan);
    background: #170b22;
    box-shadow: 4px 4px 0 var(--neon-magenta);
    font-family: var(--font-pixel);
    font-size: 10px;
    line-height: 1.3;
    cursor: pointer;
}

.relationship-open-card:hover,
.relationship-open-card:focus-visible {
    color: #05000a;
    border-color: #fff;
    background: var(--neon-cyan);
    box-shadow: -4px 4px 0 var(--neon-magenta);
}

.is-link-updating .relationship-duo,
.is-link-updating .relationship-detail-comment {
    animation: relationship-detail-refresh 300ms steps(4) both;
}

.is-reconfiguring .relationship-active-node,
.is-reconfiguring .relationship-nodes,
.is-reconfiguring .relationship-detail {
    animation: relationship-network-reboot 440ms steps(4) both;
}

[data-type="friendship"] { --link-color: #63ffd0; }
[data-type="family"] { --link-color: #ff69b4; }
[data-type="mentorship"] { --link-color: #53a9ff; }
[data-type="friction"] { --link-color: #ff9a3d; }
[data-type="rivalry"] { --link-color: #ff365f; }
[data-type="neutral"] { --link-color: #aaa6b6; }

@keyframes relationship-launch-scan {
    0%, 62% { transform: translateX(-130%); }
    82%, 100% { transform: translateX(130%); }
}

@keyframes relationship-stage-scan {
    0% { transform: translateY(-20%); opacity: 0; }
    12%, 85% { opacity: 1; }
    100% { transform: translateY(820%); opacity: 0; }
}

@keyframes relationship-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes relationship-hologram-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes relationship-thread-pulse {
    0%, 100% { left: 0; opacity: 0.45; }
    50% { left: 100%; opacity: 1; }
}

@keyframes relationship-node-arrive {
    0% { opacity: 0; filter: blur(3px) brightness(1.6); }
    100% { opacity: 1; filter: none; }
}

@keyframes relationship-detail-sweep {
    0% { left: -35%; }
    100% { left: 125%; }
}

@keyframes relationship-detail-refresh {
    0% { opacity: 0.35; transform: translateX(6px); filter: blur(2px); }
    100% { opacity: 1; transform: none; filter: none; }
}

@keyframes relationship-network-reboot {
    0% { opacity: 0.25; transform: scale(0.985); filter: blur(2px); }
    100% { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 860px) {
    .relationship-stage {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 13px 10px 10px;
    }

    .relationship-stage::after,
    .relationship-lines {
        display: none;
    }

    .relationship-stage-hud {
        inset: 9px 10px auto;
    }

    .relationship-stage-hud span:nth-child(2) {
        display: none;
    }

    .relationship-active-node {
        position: relative;
        top: auto;
        left: auto;
        flex: 0 0 auto;
        width: 142px;
        min-height: 154px;
        margin: 16px auto 3px;
        transform: none;
    }

    .relationship-active-visual {
        width: 82px;
        height: 82px;
    }

    .relationship-nodes {
        position: relative;
        z-index: 4;
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: 122px;
        gap: 10px;
        width: 100%;
        margin-top: 8px;
        padding: 12px 9px 15px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: thin;
        scrollbar-color: var(--relationship-active, var(--neon-cyan)) rgba(255, 255, 255, 0.08);
        touch-action: pan-x pan-y;
    }

    .relationship-node,
    .relationship-node[data-slot] {
        position: relative;
        top: auto;
        left: auto;
        width: 122px;
        min-height: 112px;
        padding: 8px;
        scroll-snap-align: center;
        transform: none;
    }

    .relationship-node-portrait {
        width: 60px;
        height: 60px;
    }

    .relationship-node:hover,
    .relationship-node:focus-visible,
    .relationship-node.is-preview,
    .relationship-node.is-selected,
    .relationship-node[data-slot]:hover,
    .relationship-node[data-slot]:focus-visible,
    .relationship-node[data-slot].is-preview,
    .relationship-node[data-slot].is-selected {
        transform: translateY(-3px) scale(1.02);
    }

    .relationship-duo {
        grid-template-columns: minmax(115px, 1fr) minmax(230px, 1.4fr) minmax(115px, 1fr);
        min-height: 270px;
    }

    .relationship-hologram > span {
        min-height: 205px;
    }

    .relationship-hologram img {
        height: 220px;
    }

    .relationship-link-core {
        padding: 12px;
    }

    .relationship-link-icons {
        grid-template-columns: 58px minmax(34px, 1fr) 58px;
    }

    .relationship-link-icon {
        width: 58px;
        height: 58px;
    }
}

@media (max-width: 700px) {
    .relationship-map-launch {
        width: calc(100% - 28px);
        margin: 0 14px 16px;
        font-size: 9px;
    }

    .relationship-map {
        inset: 10px;
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
    }

    .relationship-map-header {
        padding: 10px;
    }

    .relationship-map-header h3 {
        font-size: clamp(17px, 5.5vw, 23px);
    }

    .relationship-map-path,
    .relationship-map-header p {
        font-size: 7px;
    }

    .relationship-legend {
        gap: 7px 9px;
        padding: 9px 10px;
    }

    .relationship-legend-item,
    .relationship-map-instructions {
        font-size: 7px;
    }

    .relationship-map-instructions {
        padding-inline: 10px;
    }

    .relationship-map-layout {
        gap: 10px;
        padding: 9px;
    }

    .relationship-stage {
        animation: none;
    }

    .relationship-duo {
        display: block;
        min-height: 0;
    }

    .relationship-duo::before,
    .relationship-hologram {
        display: none;
    }

    .relationship-link-core {
        width: min(100%, 360px);
        margin: 8px auto 0;
        padding: 12px 10px;
    }

    .relationship-link-icons {
        grid-template-columns: 43px minmax(24px, 1fr) 43px;
        margin-bottom: 9px;
    }

    .relationship-link-icon {
        width: 43px;
        height: 43px;
    }

    .relationship-detail-type {
        margin-bottom: 9px;
        font-size: 7px;
    }

    .relationship-detail-field {
        margin-bottom: 9px;
    }

    .relationship-detail-field > span {
        font-size: 6px;
    }

    .relationship-detail-field strong {
        font-size: 15px;
    }

    .relationship-detail-label strong {
        font-size: 8px;
    }

    .relationship-detail-comment blockquote {
        font-size: 17px;
    }
}

@media (max-width: 390px) {
    .relationship-nodes {
        grid-auto-columns: 122px;
        padding-inline: 6px;
    }

    .relationship-node,
    .relationship-node[data-slot] {
        width: 122px;
    }

}

@media (prefers-reduced-motion: reduce) {
    #charModal.is-character-switching .modal-box {
        filter: none;
        transform: none;
    }

    .relationship-map,
    .relationship-map-launch,
    .relationship-node,
    .relationship-lines line,
    .relationship-active-node {
        scroll-behavior: auto;
        transition: none;
    }

    .relationship-map-launch::after,
    .relationship-stage-scan,
    .relationship-active-visual img,
    .relationship-hologram img,
    .relationship-thread i,
    .relationship-map.is-ready .relationship-node,
    .is-link-updating .relationship-detail::after,
    .is-link-updating .relationship-duo,
    .is-link-updating .relationship-detail-comment,
    .is-reconfiguring .relationship-active-node,
    .is-reconfiguring .relationship-nodes,
    .is-reconfiguring .relationship-detail {
        animation: none;
    }
}
