/* 沉浸式知识图谱：所有图谱样式限定在 graph-page 内。 */
.graph-page{height:100vh;height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:#0b1718;color:#e0ebe5;--graph-muted:#87a49b;--graph-accent:#a9dfc6;--graph-border:#7aa99a30;--graph-surface:#102321eb}
.graph-page .topbar{position:relative;flex:none;z-index:20;padding:14px clamp(16px,3.6vw,64px);background:#0c1a1bd9;border-color:#91b4a21a;gap:18px}
.graph-page .topbar nav{gap:clamp(12px,1.6vw,24px);font-size:13px}.graph-page .topbar nav a[href$="/graph"]{color:#b6ebd3}.graph-page .brand{letter-spacing:.03em;color:#c1e7d1}
#graphApp{position:relative;flex:1;min-height:0;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 48% 42%,#1a343063,transparent 65%),radial-gradient(ellipse at 90% 90%,#19374340,transparent 55%),#0b1718}
#graphCanvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab;outline:none}#graphCanvas:focus-visible{outline:1px solid #a9dfc680;outline-offset:-2px}
.graph-heading{position:absolute;top:28px;left:clamp(16px,3.6vw,64px);pointer-events:none;text-shadow:0 2px 14px #071312}
.graph-kicker{font-size:10px;letter-spacing:.22em;color:#87a49b}.graph-heading h1{font-size:clamp(22px,2.6vw,34px);font-weight:550;letter-spacing:.02em;margin:5px 0 4px}.graph-heading p{font-size:12px;color:#a2b9af;margin:0;letter-spacing:.05em}
.graph-tools{position:absolute;right:clamp(16px,3.6vw,64px);top:32px;display:flex;align-items:flex-start;gap:10px;z-index:5}.graph-search-wrap{position:relative;width:clamp(220px,25vw,350px)}.graph-search,.graph-modes,.graph-controls{display:flex;align-items:center;gap:3px;background:var(--graph-surface);border:1px solid var(--graph-border);border-radius:12px;padding:4px;backdrop-filter:blur(14px);box-shadow:0 5px 25px #030c0b22}
.graph-search svg{width:17px;height:17px;margin-left:10px;fill:none;stroke:#98b7ab;stroke-width:1.6;flex:none}.graph-search input{background:none!important;border:0!important;padding:6px 6px!important;min-width:0;font-size:13px;outline:0!important;flex:1}.graph-search:focus-within{border-color:#90c8b080}.graph-page button{background:transparent;border:1px solid transparent;border-radius:8px;color:#a8c0b7;font-size:12px;padding:7px 10px;line-height:1.4;transition:background .2s,color .2s,border-color .2s}.graph-page button:hover,.graph-page button[aria-pressed=true]{background:#a2d6b71a;color:#d8f4e6;border-color:#a2d6b726}.graph-page button:focus-visible,.graph-page a:focus-visible{outline:2px solid #a9dfc6;outline-offset:2px}
.graph-popover{position:absolute;top:calc(100% + 8px);right:0;width:min(340px,90vw);max-height:min(52vh,380px);overflow:auto;padding:8px;background:#112522f5;border:1px solid var(--graph-border);border-radius:12px;box-shadow:0 14px 45px #0006;backdrop-filter:blur(14px)}.graph-popover button{display:flex;justify-content:space-between;text-align:left;width:100%;align-items:center;gap:8px;padding:9px 10px}.graph-popover button span{overflow-wrap:anywhere;white-space:normal}.graph-popover small{color:#87a49b;white-space:nowrap}.graph-popover p{margin:8px 10px;color:#a2b9af;font-size:13px}
.graph-message{position:absolute;z-index:4;top:45%;left:50%;transform:translate(-50%,-50%);background:#112522ef;border:1px solid var(--graph-border);padding:14px 20px;border-radius:12px;text-align:center;max-width:90%;font-size:14px;color:#c3d9cf;box-shadow:0 8px 30px #0004}.graph-message button{margin-left:8px;border-color:var(--graph-border)}
.graph-selection{position:absolute;left:clamp(16px,3.6vw,64px);bottom:88px;max-width:min(330px,86vw);width:max-content;z-index:3;padding:12px 15px 13px;background:#102320eb;border:1px solid var(--graph-border);border-radius:13px;backdrop-filter:blur(12px);box-shadow:0 8px 30px #0003;animation:graph-in .25s ease-out}.selection-title{display:flex;justify-content:space-between;align-items:center;gap:30px;color:#a9dfc6;font-size:11px;letter-spacing:.08em}.selection-title button{font-size:20px;padding:0 6px;line-height:1}.graph-selection h2{font-size:19px;line-height:1.3;margin:4px 0;color:#e0ebe5;overflow-wrap:anywhere}.graph-selection p{font-size:12px;color:#a0b9ae;margin:3px 0 7px;max-width:270px;overflow-wrap:anywhere}.selection-actions{display:flex;flex-wrap:wrap;gap:5px;max-width:290px}.selection-actions a,.selection-actions button{border:1px solid var(--graph-border);border-radius:7px;padding:4px 8px;font-size:11px;color:#b4dec9;line-height:1.5}.selection-actions a:hover{background:#a2d6b71a;text-decoration:none}
.graph-footer{position:absolute;bottom:35px;left:clamp(16px,3.6vw,64px);right:clamp(16px,3.6vw,64px);display:flex;justify-content:space-between;align-items:center;gap:12px;pointer-events:none}.graph-legend{display:flex;flex-wrap:wrap;gap:8px 16px;color:#a1b8af;font-size:11px;max-width:65%;text-shadow:0 1px 4px #071312}.graph-legend span{display:flex;align-items:center;gap:6px}.graph-legend i{width:7px;height:7px;border-radius:50%;display:inline-block;box-shadow:0 0 8px currentColor}.graph-controls{pointer-events:auto}.graph-controls button{font-size:17px;min-width:32px;padding:5px 8px}.graph-hint{position:absolute;bottom:10px;right:clamp(16px,3.6vw,64px);font-size:10px;letter-spacing:.06em;color:#6e8c82;pointer-events:none}.graph-page [hidden]{display:none!important}@keyframes graph-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:780px){.graph-page .topbar{padding:9px 14px;gap:12px;align-items:flex-start}.graph-page .topbar nav{gap:5px 12px;font-size:11px;justify-content:flex-end}.graph-page .brand{font-size:18px}.graph-page .brand small{display:none}.graph-heading{top:12px;left:14px}.graph-heading h1{font-size:23px}.graph-tools{top:90px;left:14px;right:14px;gap:6px}.graph-search-wrap{flex:1;min-width:0;width:auto}.graph-search input{font-size:12px}.graph-search svg{margin-left:4px}.graph-page button{padding:6px 7px}.graph-modes{flex:none}.graph-footer{left:12px;right:12px;bottom:23px;align-items:flex-end}.graph-legend{gap:4px 8px;max-width:48%;font-size:10px}.graph-controls button{min-width:24px;padding:4px 5px;font-size:15px}.graph-selection{left:12px;bottom:70px;padding:8px 10px;max-width:75vw}.graph-hint{bottom:4px;right:12px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.graph-page *{animation:none!important;transition:none!important}}
@media(max-width:780px){#graphApp.has-selection .graph-legend{visibility:hidden}}
