@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url-prefix("http://scholar.google.com/scholar?"),
url-prefix("http://scholar.google.co.jp/scholar?") {
/* ----- Fixed header ----- */
/* left top parts */
#gbar {
  position: fixed !important;
  top: 0 !important;
  left: 8px !important;
  z-index: 2 !important;

  width: 100% !important;
  padding-top: 3px !important;
  background: #fff !important;
}

/* top line */
.gbh {
  position: fixed !important;
  top: 2.4em !important;
  z-index: 2 !important;
}

/* right top parts */
#guser {
  position: fixed !important;
  top: 2px !important;
  right: 1em !important;
  z-index: 3 !important;
}

/* logo and search box */
form[name="gs"] { 
  position: fixed !important;
  top: 1.85em !important;
  left: .5em !important;
  z-index: 1 !important;

  width: 99% !important;
  padding: 2em 0 0 2em !important;
  margin: -2em 0 0 -2em !important;
  background: #fff !important;
}

body {
  margin-top: 8.8em !important;
}

/* ----- modify spacing ----- */
.gs_r {
  line-height: 1.5;
}

/* ----- generate counter ----- */
body {
  counter-reset: head;
}
 
.gs_rt:before {
  counter-increment: head;
  content: "#" counter(head);

  font-size: 13px;
  margin-right: 5px;
  padding: 0px 4px;
  color: #666;
  border: 1px solid #666;
  -moz-border-radius: 4px;
}

}