.relationship-page { min-height:100vh; background:linear-gradient(135deg,#f6f8fc 0%,#eef3f9 48%,#f8f6f2 100%); color:#1d2b3a; }
.relationship-page::before { height:390px; background-image:radial-gradient(#b9cbe0 0.7px,transparent .7px); background-size:20px 20px; opacity:.45; mask-image:linear-gradient(#000,transparent); }
.relationship-page .home-header nav a[aria-current="page"] { color:#2464a3; background:#e8f1fa; }
.relationship-shell { width:min(1240px,calc(100% - 48px)); margin:28px auto 50px; }
.relationship-intro { display:flex; align-items:end; justify-content:space-between; gap:24px; padding:8px 8px 24px; }
.relationship-intro .eyebrow { color:#6685a4; font-size:11px; letter-spacing:.16em; font-weight:800; }
.relationship-intro h1 { margin:5px 0 4px; color:#192c3e; font-family:"Songti SC","STSong",serif; font-size:clamp(32px,5vw,48px); letter-spacing:.04em; }
.relationship-intro p:not(.eyebrow) { color:#728293; font-size:14px; }
.intro-count { display:flex; align-items:baseline; gap:7px; color:#718295; font-size:12px; white-space:nowrap; padding-bottom:4px; }
.intro-count strong { color:#294966; font:600 22px/1 Georgia,serif; }
.intro-count i { width:4px; height:4px; margin:0 8px; border-radius:50%; background:#b8c7d5; }
.network-card { overflow:hidden; border:1px solid #e2e9f0; border-radius:8px; background:rgba(255,255,255,.9); box-shadow:0 24px 70px #3b5b7712; }
.graph-filters { padding:15px 20px 12px; border-bottom:1px solid #edf1f5; }
.category-tabs,.group-tabs { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.category-tabs button,.group-tabs button { min-height:31px; padding:0 12px; border:1px solid #e4ebf1; border-radius:4px; background:#fff; color:#708294; font:inherit; font-size:11px; cursor:pointer; transition:all .18s ease; }
.category-tabs button { min-height:35px; color:#4e6880; font-size:12px; font-weight:700; }
.category-tabs button:hover,.group-tabs button:hover { border-color:#9bb8d2; color:#286594; }
.category-tabs button.is-selected,.group-tabs button.is-selected { border-color:#648fb5; background:#edf5fb; color:#285f8b; }
.group-tabs { min-height:31px; margin-top:10px; }
.member-pagination { display:flex; justify-content:center; align-items:center; gap:12px; padding:10px; border-top:1px solid #edf1f5; color:#8696a5; font-size:11px; }
.member-pagination[hidden] { display:none; }
.member-pagination button { border:1px solid #e3eaf1; border-radius:4px; padding:5px 10px; background:white; color:#55748f; cursor:pointer; }
.member-pagination button:disabled { opacity:.42; cursor:default; }
.network-toolbar { height:62px; display:flex; justify-content:space-between; align-items:center; padding:0 20px; border-bottom:1px solid #edf1f5; }
.search-box { width:min(280px,55%); display:flex; align-items:center; gap:9px; color:#8192a3; }
.search-box span { font-size:24px; transform:rotate(-20deg); }
.search-box input { width:100%; border:0; outline:0; color:#33485b; background:transparent; font:inherit; font-size:13px; }
.search-box input::placeholder { color:#a4b0bd; }
.toolbar-actions { display:flex; gap:7px; }
.toolbar-actions button { min-width:34px; height:32px; border:1px solid #e3eaf1; border-radius:5px; background:white; color:#5c7185; font-size:16px; cursor:pointer; }
.toolbar-actions button:first-child { padding:0 12px; font-size:12px; }
.toolbar-actions button:hover { background:#f1f6fa; color:#245e92; }
.network-stage { height:min(66vh,620px); min-height:420px; position:relative; overflow:hidden; background:radial-gradient(ellipse at 50% 48%,#fff 0%,#fbfdff 66%,#f5f8fb 100%); touch-action:none; }
.network-stage::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.4; background-image:linear-gradient(#dce6ef45 1px,transparent 1px),linear-gradient(90deg,#dce6ef45 1px,transparent 1px); background-size:44px 44px; mask-image:radial-gradient(ellipse,#000 10%,transparent 85%); }
#relationship-graph { width:100%; height:100%; position:relative; z-index:1; cursor:grab; }
#relationship-graph.is-panning { cursor:grabbing; }
.network-link { stroke:#9aaebe; stroke-opacity:.34; stroke-width:1.25px; fill:none; transition:stroke .2s,stroke-width .2s,opacity .2s; }
.network-link.is-neighbor { stroke:#347eb8; stroke-opacity:.95; stroke-width:2.2px; }
.network-link.is-muted,.network-node.is-muted { opacity:.12; }
.network-link-label { fill:#416d90; font-size:10px; paint-order:stroke; stroke:#fff; stroke-width:5px; stroke-linejoin:round; pointer-events:none; transition:opacity .18s ease; }
.network-node { cursor:grab; transition:opacity .2s; }
.network-node:active { cursor:grabbing; }
.node-orbit { fill:none; stroke:#dbe4ec; stroke-width:1; stroke-dasharray:3 5; }
.node-halo { fill:#dcecff; opacity:0; transition:opacity .2s; }
.network-node.is-active .node-halo,.network-node.is-neighbor .node-halo { opacity:.6; }
.node-avatar { stroke:#fff; stroke-width:4px; filter:drop-shadow(0 4px 8px #36516d24); }
.node-photo { pointer-events:none; }
.node-avatar-text { fill:#304c67; font-family:"PingFang SC","Microsoft YaHei",sans-serif; font-size:16px; font-weight:700; text-anchor:middle; dominant-baseline:central; pointer-events:none; }
.node-name { fill:#283d50; font-family:"PingFang SC","Microsoft YaHei",sans-serif; font-size:13px; font-weight:650; text-anchor:middle; paint-order:stroke; stroke:white; stroke-width:5px; stroke-linejoin:round; pointer-events:none; }
.stage-hint { position:absolute; right:18px; bottom:16px; z-index:2; display:flex; align-items:center; gap:8px; color:#8a9aaa; font-size:11px; }
.hint-dot { width:7px; height:7px; border-radius:50%; background:#77add8; box-shadow:0 0 0 4px #77add81d; }
.member-detail { position:relative; display:flex; align-items:center; gap:16px; min-height:100px; padding:16px 22px; border-top:1px solid #edf1f5; background:#fff; }
.detail-avatar { width:48px; height:48px; display:grid; place-items:center; flex:none; border-radius:50%; background:#d6efff; color:#304c67; font-size:19px; font-weight:700; box-shadow:inset 0 0 0 1px #fff; }
.detail-copy { min-width:0; }
.detail-eyebrow { color:#91a1b0; font-size:9px; letter-spacing:.14em; font-weight:800; }
.detail-copy h2 { margin:2px 0 0; color:#273e53; font-size:16px; }
.detail-copy p { margin:0; color:#7391aa; font-size:11px; }
.detail-copy small { display:block; margin-top:4px; color:#8998a6; font-size:11px; }
.detail-connections { margin-left:auto; min-width:68px; text-align:center; color:#91a1b0; font-size:10px; }
.detail-connections strong { display:block; color:#477ca8; font:600 20px Georgia,serif; }
.member-detail>button { align-self:flex-start; border:0; background:none; color:#9ba9b5; font-size:20px; cursor:pointer; }
.demo-note { margin:13px 5px 0; color:#8594a2; font-size:11px; }
.demo-note span { color:#729bbb; margin-right:5px; }
.demo-note code { color:#637d93; font-size:11px; }
.relationship-page .home-footer { margin-top:30px; }
@media(max-width:700px) { .relationship-shell{width:calc(100% - 24px);margin-top:18px}.relationship-page .home-width{width:calc(100% - 28px)}.relationship-intro{align-items:flex-start;flex-direction:column;gap:14px;padding-inline:3px}.intro-count{padding:0}.graph-filters{padding:12px}.network-stage{height:65vh;min-height:390px}.network-toolbar{padding-inline:13px}.member-detail{gap:11px;padding:14px}.detail-avatar{width:42px;height:42px}.detail-connections{min-width:42px}.detail-copy small{max-width:210px;line-height:1.5}.relationship-page .home-footer{flex-direction:column;align-items:flex-start} }
.relationship-page:not(.editor-page) .home-footer { display:flex; flex-direction:row; justify-content:space-between; align-items:center; gap:16px; }
.relationship-page:not(.editor-page) .home-footer p { display:flex; align-items:center; gap:14px; margin:0; }
.relationship-page:not(.editor-page) .home-footer nav { display:flex; align-items:center; justify-content:flex-end; gap:16px; margin-left:auto; white-space:nowrap; }
@media(max-width:600px) {
  .relationship-page:not(.editor-page) .home-footer { gap:8px; }
  .relationship-page:not(.editor-page) .home-footer p { gap:7px; font-size:10px; white-space:nowrap; }
  .relationship-page:not(.editor-page) .home-footer p > a { font-size:12px; }
  .relationship-page:not(.editor-page) .home-footer nav { gap:8px; font-size:10px; }
}
@media(prefers-reduced-motion:reduce){.network-link,.network-node,.node-halo{transition:none!important}}

/* Relationship graph styling tuned to the glossy pink-to-blue home palette. */
.relationship-page:not(.editor-page) {
  min-height:100vh;
  color:#111b30;
  background:linear-gradient(110deg,#f7d6da 0%,#f3e1e0 35%,#e5e2f0 64%,#dceef8 100%);
}
.relationship-page:not(.editor-page)::before {
  height:620px;
  opacity:.58;
  background-image:linear-gradient(#ab839a0a 1px,transparent 1px),linear-gradient(90deg,#ab839a0a 1px,transparent 1px);
  background-size:32px 32px;
}
.relationship-page:not(.editor-page) .home-header nav a { border-radius:99px; box-shadow:0 4px 14px #6b65810a; }
.relationship-page:not(.editor-page) .home-header nav a[aria-current="page"] { border-color:#fff; background:linear-gradient(110deg,#fff,#fff3ef); color:#d94350; }
.relationship-page:not(.editor-page) .relationship-shell { width:min(1180px,calc(100% - 56px)); margin:14px auto 28px; }
.relationship-page:not(.editor-page) .relationship-intro {
  position:relative;
  min-height:208px;
  overflow:hidden;
  align-items:center;
  margin-bottom:18px;
  padding:30px 38px;
  border:1px solid #ffffffde;
  border-radius:24px;
  background:linear-gradient(108deg,#ffffffed 0%,#fffffff0 48%,#edf9fff0 100%);
  box-shadow:0 16px 46px #5b61741a;
}
.relationship-page:not(.editor-page) .relationship-intro::after {
  content:"羊村";
  position:absolute;
  right:210px;
  bottom:-69px;
  color:#d9576920;
  font:900 190px/1 "Songti SC","STSong",serif;
  letter-spacing:.08em;
  pointer-events:none;
}
.relationship-page:not(.editor-page) .relationship-intro>div:first-child { position:relative; z-index:1; }
.relationship-page:not(.editor-page) .relationship-intro .eyebrow { color:#d0485b; }
.relationship-page:not(.editor-page) .relationship-intro h1 { color:#111b30; font-size:clamp(36px,5vw,54px); letter-spacing:.025em; }
.relationship-page:not(.editor-page) .relationship-intro p:not(.eyebrow) { color:#59637a; font-size:15px; }
.relationship-page:not(.editor-page) .intro-count {
  position:relative;
  z-index:1;
  align-items:center;
  gap:8px;
  padding:13px 18px;
  border:1px solid #ffffff;
  border-radius:99px;
  background:#ffffffc9;
  box-shadow:0 8px 22px #65739412;
  color:#69748b;
}
.relationship-page:not(.editor-page) .intro-count strong { color:#d94153; font-size:25px; }
.relationship-page:not(.editor-page) .intro-count i { background:#f5a293; }
.relationship-page:not(.editor-page) .network-card {
  position:relative;
  overflow:hidden;
  border:1px solid #ffffffed;
  border-radius:22px;
  background:linear-gradient(130deg,#ffffffed,#fffffff4 55%,#f6fbfff0);
  box-shadow:0 20px 55px #5b61741a;
}
.relationship-page:not(.editor-page) .network-card::before {
  content:"";
  position:absolute;
  z-index:2;
  top:0;
  left:28px;
  right:28px;
  height:4px;
  border-radius:0 0 99px 99px;
  background:linear-gradient(90deg,#f02550,#ff8541 58%,#ffd14d);
}
.relationship-page:not(.editor-page) .graph-filters { padding:20px 24px 15px; border-color:#f0edf1; }
.relationship-page:not(.editor-page) .category-tabs,.relationship-page:not(.editor-page) .group-tabs { gap:8px; }
.relationship-page:not(.editor-page) .category-tabs button,.relationship-page:not(.editor-page) .group-tabs button {
  min-height:35px;
  padding:0 15px;
  border:1px solid #e8e5eb;
  border-radius:99px;
  background:#ffffffc9;
  color:#68748a;
  box-shadow:0 3px 10px #555b7008;
}
.relationship-page:not(.editor-page) .category-tabs button { min-height:40px; color:#45536a; font-size:13px; }
.relationship-page:not(.editor-page) .category-tabs button:hover,.relationship-page:not(.editor-page) .group-tabs button:hover { border-color:#f3a397; color:#d94350; background:#fff; }
.relationship-page:not(.editor-page) .category-tabs button.is-selected,.relationship-page:not(.editor-page) .group-tabs button.is-selected {
  border-color:#fff;
  background:linear-gradient(110deg,#f21c4e,#ff593d 64%,#ffb644);
  color:#fff;
  box-shadow:0 6px 16px #f3444b25;
}
.relationship-page:not(.editor-page) .group-tabs { min-height:34px; margin-top:12px; }
.relationship-page:not(.editor-page) .network-toolbar {
  height:68px;
  padding-inline:24px;
  border-color:#f0edf1;
  background:#fff9fa9c;
}
.relationship-page:not(.editor-page) .search-box {
  width:min(340px,60%);
  min-height:42px;
  padding:0 13px;
  border:1px solid #ebe6eb;
  border-radius:99px;
  background:#fff;
  box-shadow:0 3px 10px #4a526308;
}
.relationship-page:not(.editor-page) .search-box span { color:#e17a80; }
.relationship-page:not(.editor-page) .toolbar-actions { gap:8px; }
.relationship-page:not(.editor-page) .toolbar-actions button {
  min-width:38px;
  height:38px;
  border:1px solid #e8e5eb;
  border-radius:99px;
  background:#fff;
  color:#59657a;
  box-shadow:0 3px 10px #4a526308;
}
.relationship-page:not(.editor-page) .toolbar-actions button:first-child { padding-inline:16px; }
.relationship-page:not(.editor-page) .toolbar-actions button:hover { border-color:#f2a093; background:#fff8f6; color:#d94350; }
.relationship-page:not(.editor-page) .network-stage {
  height:min(68vh,680px);
  min-height:460px;
  background:radial-gradient(ellipse at 50% 42%,#fff 0%,#fffdfd 48%,#f2f8ff 100%);
}
.relationship-page:not(.editor-page) .network-stage::before {
  opacity:.46;
  background-image:linear-gradient(#d2b8c52b 1px,transparent 1px),linear-gradient(90deg,#d2b8c52b 1px,transparent 1px);
  background-size:38px 38px;
  mask-image:radial-gradient(ellipse,#000 8%,transparent 84%);
}
.relationship-page:not(.editor-page) .network-link { stroke:#ac9ca9; stroke-opacity:.38; }
.relationship-page:not(.editor-page) .network-link.is-neighbor { stroke:#ec5964; stroke-opacity:.92; }
.relationship-page:not(.editor-page) .node-halo { fill:#ffdadd; }
.relationship-page:not(.editor-page) .node-avatar { filter:drop-shadow(0 5px 10px #5a53651c); }
.relationship-page:not(.editor-page) .node-name { fill:#202c42; }
.relationship-page:not(.editor-page) .stage-hint {
  right:20px;
  bottom:18px;
  padding:9px 13px;
  border:1px solid #fff;
  border-radius:99px;
  background:#ffffffd9;
  box-shadow:0 5px 16px #5b61741a;
  color:#738095;
}
.relationship-page:not(.editor-page) .hint-dot { background:#f27579; box-shadow:0 0 0 4px #f2757920; }
.relationship-page:not(.editor-page) .member-pagination { border-color:#f0edf1; background:#fff9fa9c; }
.relationship-page:not(.editor-page) .member-pagination button { border-radius:99px; }
.relationship-page:not(.editor-page) .member-detail {
  min-height:112px;
  padding:18px 24px;
  border-color:#f0edf1;
  background:linear-gradient(105deg,#fff9f9,#fff 52%,#f4faff);
}
.relationship-page:not(.editor-page) .detail-avatar { background:linear-gradient(135deg,#ffe1df,#ffeccf); color:#b34b5b; box-shadow:inset 0 0 0 2px #fff,0 5px 14px #d77e7122; }
.relationship-page:not(.editor-page) .detail-eyebrow { color:#d0485b; }
.relationship-page:not(.editor-page) .detail-copy h2 { color:#182238; font-size:18px; }
.relationship-page:not(.editor-page) .detail-connections strong { color:#d94153; }
.relationship-page:not(.editor-page) .member-detail>button { width:32px; height:32px; border:1px solid #eee8ed; border-radius:50%; background:#fff; }
.relationship-page:not(.editor-page) .member-detail>button:hover { color:#d94350; background:#fff5f4; }
.relationship-page:not(.editor-page) .home-footer { padding-top:24px; }
@media(max-width:700px) {
  .relationship-page:not(.editor-page) .relationship-shell { width:calc(100% - 28px); margin-top:14px; }
  .relationship-page:not(.editor-page) .relationship-intro { min-height:0; padding:23px 20px; border-radius:19px; }
  .relationship-page:not(.editor-page) .relationship-intro::after { right:-5px; bottom:-37px; font-size:115px; }
  .relationship-page:not(.editor-page) .relationship-intro h1 { font-size:34px; }
  .relationship-page:not(.editor-page) .intro-count { padding:10px 14px; }
  .relationship-page:not(.editor-page) .graph-filters { padding:16px 14px 12px; }
  .relationship-page:not(.editor-page) .category-tabs button { min-height:36px; padding-inline:12px; font-size:12px; }
  .relationship-page:not(.editor-page) .group-tabs button { min-height:32px; padding-inline:11px; font-size:10px; }
  .relationship-page:not(.editor-page) .network-toolbar { height:auto; min-height:66px; gap:9px; padding:11px 14px; }
  .relationship-page:not(.editor-page) .search-box { width:auto; min-width:0; flex:1; }
  .relationship-page:not(.editor-page) .toolbar-actions { gap:5px; }
  .relationship-page:not(.editor-page) .toolbar-actions button { min-width:34px; height:34px; }
  .relationship-page:not(.editor-page) .toolbar-actions button:first-child { padding-inline:10px; font-size:10px; }
  .relationship-page:not(.editor-page) .network-stage { height:62vh; min-height:390px; }
  .relationship-page:not(.editor-page) .member-detail { gap:10px; padding:14px; }
}
.relationship-page:not(.editor-page) #expand-graph {
  min-width:104px;
  padding:0 15px;
  border-color:#fff;
  border-radius:99px;
  background:linear-gradient(110deg,#f21c4e,#ff593d 64%,#ffb644);
  color:#fff;
  font-size:12px;
  font-weight:700;
  box-shadow:0 5px 14px #f3444b24;
}
.relationship-page:not(.editor-page) #expand-graph:hover { background:linear-gradient(110deg,#df153f,#f54e34 64%,#f6a234); color:#fff; transform:translateY(-1px); }
.relationship-page:not(.editor-page) .network-card:fullscreen,
.relationship-page:not(.editor-page) .network-card.is-expanded {
  position:fixed;
  z-index:1000;
  inset:0;
  width:100vw;
  height:100vh;
  max-height:100vh;
  display:flex;
  flex-direction:column;
  margin:0;
  border:0;
  border-radius:0;
  background:#fff;
}
.relationship-page:not(.editor-page) .network-card:fullscreen .graph-filters,
.relationship-page:not(.editor-page) .network-card:fullscreen .network-toolbar,
.relationship-page:not(.editor-page) .network-card:fullscreen .member-detail,
.relationship-page:not(.editor-page) .network-card.is-expanded .graph-filters,
.relationship-page:not(.editor-page) .network-card.is-expanded .network-toolbar,
.relationship-page:not(.editor-page) .network-card.is-expanded .member-detail { flex:none; }
.relationship-page:not(.editor-page) .network-card:fullscreen .network-stage,
.relationship-page:not(.editor-page) .network-card.is-expanded .network-stage { flex:1; min-height:0; height:auto; }
@media(max-width:700px) {
  .relationship-page:not(.editor-page) #expand-graph { min-width:0; padding-inline:9px; font-size:10px; }
  .relationship-page:not(.editor-page) .network-card:fullscreen .graph-filters,
  .relationship-page:not(.editor-page) .network-card.is-expanded .graph-filters { max-height:28vh; overflow:auto; }
}
