.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.content {
  min-width: 0;
  padding: 24px clamp(20px, 5vw, 72px) 64px;
}

.mobile-only,
.mobile-scrim {
  display: none;
}

.right-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: min(760px, 100vw);
  height: 100vh;
  transform: translateX(100%);
  transition: transform 180ms ease;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.right-panel.open {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.graph-search {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.graph-search:focus {
  border-color: var(--accent);
}

.graph-mount {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--graph-bg);
  overflow: hidden;
}

.graph-canvas,
.graph-svg {
  width: 100%;
  height: min(70vh, 720px);
  min-height: 460px;
  display: block;
  cursor: grab;
}

.graph-canvas:active {
  cursor: grabbing;
}

.graph-loader {
  display: grid;
  place-items: center;
  min-height: 460px;
  color: var(--muted);
  background: radial-gradient(
    circle at center,
    var(--panel) 0,
    var(--graph-bg) 100%
  );
}

.graph-lines line {
  stroke: rgba(124, 112, 95, 0.45);
  stroke-width: 1.1;
}

.graph-node circle {
  fill: var(--accent);
  stroke: var(--panel);
  stroke-width: 3;
  filter: drop-shadow(0 4px 9px rgba(49, 36, 25, 0.18));
}

.graph-node.current circle {
  fill: var(--green);
}

.graph-node.missing circle {
  fill: var(--graph-missing);
  stroke-dasharray: 3 3;
}

.graph-node text {
  fill: var(--ink);
  font-size: 12px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.graph-node:hover circle {
  stroke: var(--ink);
}

.graph-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
