/* ═══════════════════════════════════════════════════════════════════
   SITU · Knowledge Graph View — 浅色羊皮纸主题(与站点统一)
   透明融入页面、冷调低饱和节点、极细线条、暖棕中性玻璃 UI。
   ═══════════════════════════════════════════════════════════════════ */

.gv-root {
  position: relative; width: 100%; height: 100%;
  min-height: 320px; overflow: hidden;
  background: transparent;                 /* 去掉原来的深炭灰底,直接融入页面 */
  border-radius: 12px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #4a3520;
}
.gv-stage { position: absolute; inset: 0; z-index: 1; }

/* ⚙ 齿轮按钮(左上) */
.gv-gear {
  position: absolute; top: 12px; left: 12px; z-index: 6;
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(110,87,58,0.18); background: rgba(251,246,232,0.82);
  color: #6e573a; font-size: 16px; cursor: pointer;
  backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(74,53,32,0.12);
  transition: background 160ms, color 160ms;
}
.gv-gear:hover { color: #2d1d10; background: rgba(246,239,220,0.95); }

/* ← 返回(钻取时左上出现) */
.gv-back {
  position: absolute; top: 12px; left: 54px; z-index: 6;
  height: 34px; padding: 0 12px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid rgba(110,87,58,0.18); background: rgba(251,246,232,0.82);
  color: #6e573a; font-size: 12.5px; font-family: inherit; cursor: pointer;
  backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(74,53,32,0.12);
  transition: background 160ms, color 160ms;
}
.gv-back[hidden] { display: none; }
.gv-back:hover { color: #2d1d10; background: rgba(246,239,220,0.95); }

/* 弹出设置层 */
.gv-pop {
  position: absolute; top: 54px; left: 12px; z-index: 7;
  width: 218px; max-height: calc(100% - 70px); overflow-y: auto;
  background: rgba(251,246,232,0.96); border: 1px solid rgba(110,87,58,0.2);
  border-radius: 12px; padding: 12px; backdrop-filter: blur(14px);
  box-shadow: 0 8px 26px rgba(74,53,32,0.18);
  animation: gvPop 160ms cubic-bezier(0.16,1,0.3,1);
}
.gv-pop[hidden] { display: none; }
@keyframes gvPop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.gv-pop-sec { margin-bottom: 12px; }
.gv-pop-sec:last-child { margin-bottom: 0; }
.gv-pop-lbl { font-size: 10.5px; color: #9a8466; letter-spacing: .05em; margin-bottom: 6px; }
.gv-seg { display: inline-flex; gap: 2px; background: rgba(110,87,58,0.08); border-radius: 8px; padding: 3px; width: 100%; }
.gv-pb { flex: 1; appearance: none; border: 0; background: transparent; color: #6e573a; font-size: 12px; font-family: inherit; padding: 6px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: background 150ms, color 150ms; }
.gv-pb:hover { color: #2d1d10; background: rgba(110,87,58,0.1); }
.gv-pb.is-on { color: #fbf6e8; background: #6e573a; font-weight: 600; }
.gv-pb-wide { width: 100%; background: rgba(110,87,58,0.1); }
.gv-src { width: 100%; appearance: none; background: rgba(255,255,255,0.5); color: #4a3520; border: 1px solid rgba(110,87,58,0.22); border-radius: 7px; padding: 6px 9px; font-size: 12px; font-family: inherit; cursor: pointer; }
.gv-src:focus { outline: none; border-color: rgba(154,132,102,0.8); }
.gv-src option { background: #fbf6e8; color: #4a3520; }
.gv-pop-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-chip { appearance: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(110,87,58,0.2); background: rgba(255,255,255,0.4); color: #6e573a; font-size: 11px; font-family: inherit; padding: 3px 9px; border-radius: 20px; cursor: pointer; transition: opacity 160ms, border-color 160ms; }
.gv-chip:hover { border-color: rgba(110,87,58,0.4); }
.gv-chip:not(.is-on) { opacity: 0.34; }
.gv-cnt { font-size: 10px; color: #9a8466; }

.gv-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

/* 提示条 */
.gv-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 4; font-size: 11px; color: #8a745a; background: rgba(251,246,232,0.7); padding: 4px 12px; border-radius: 20px; pointer-events: none; white-space: nowrap; max-width: 70%; overflow: hidden; text-overflow: ellipsis; }

/* 侧栏 */
.gv-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 322px; max-width: 86%; z-index: 8; background: linear-gradient(180deg, rgba(251,246,232,0.99), rgba(246,239,220,0.99)); border-left: 1px solid rgba(110,87,58,0.18); box-shadow: -18px 0 40px rgba(74,53,32,0.16); padding: 22px 20px; overflow-y: auto; animation: gvSlide 220ms cubic-bezier(0.16,1,0.3,1); }
.gv-panel[hidden] { display: none; }
@keyframes gvSlide { from { transform: translateX(22px); opacity: 0; } to { transform: none; opacity: 1; } }
.gv-x { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: #9a8466; font-size: 22px; line-height: 1; cursor: pointer; }
.gv-x:hover { color: #2d1d10; }
.gv-kind { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.gv-deg { margin-left: auto; font-size: 10.5px; font-weight: 400; color: #9a8466; }
.gv-title { margin: 0 0 4px; font-size: 19px; line-height: 1.3; color: #2d1d10; font-weight: 600; }
.gv-id { font-size: 10.5px; color: #b09a78; font-family: ui-monospace, monospace; margin-bottom: 16px; word-break: break-all; }
.gv-field { margin-bottom: 12px; }
.gv-fk { font-size: 10.5px; color: #9a8466; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 3px; }
.gv-fv { font-size: 13px; line-height: 1.5; color: #4a3520; }
.gv-empty { font-size: 12.5px; font-style: italic; color: #b09a78; }
.gv-actions { display: flex; gap: 8px; margin-top: 18px; position: sticky; bottom: -22px; padding: 14px 0 2px; background: linear-gradient(180deg, transparent, rgba(246,239,220,0.99) 30%); }
.gv-ask, .gv-center-btn { flex: 1; appearance: none; border: 0; font-size: 12.5px; font-family: inherit; font-weight: 600; padding: 9px 10px; border-radius: 8px; cursor: pointer; transition: filter 160ms, background 160ms; }
.gv-ask { background: linear-gradient(135deg, #cdbb8e, #b9a268); color: #2d1d10; }
.gv-ask:hover { filter: brightness(1.05); }
.gv-center-btn { background: rgba(110,87,58,0.1); color: #4a3520; border: 1px solid rgba(110,87,58,0.2); }
.gv-center-btn:hover { background: rgba(110,87,58,0.16); }

@media (max-width: 640px) { .gv-panel { width: 88%; } .gv-filters { top: 50px; } }
