body { font-family: system-ui, "Noto Sans CJK SC", serif; max-width: 48em; margin: 0 auto; padding: 1em; line-height: 1.8; color: #222; }
header h1 { font-size: 1.4em; }
a { color: #0055aa; text-decoration: none; }
a:hover { text-decoration: underline; }
.search { margin: 0.5em 0; }
.search input { width: 60%; padding: 0.4em; font-size: 1em; }
.search button { padding: 0.4em 1em; }
.byline { color: #666; font-size: 0.9em; margin-left: 0.5em; }
.meta { color: #888; font-size: 0.85em; margin-left: 0.5em; }
.count { color: #666; }
ul { list-style: none; padding-left: 0; }
li { margin: 0.4em 0; }
.juan-text p { text-align: justify; margin: 1em 0; }
.juan-text { padding-bottom: 4em; }
.juan-text mark.hit { background: #fff3c4; color: #7a5c00; font-weight: 600; padding: 0 0.15em; border-radius: 3px; }
.hit-count {
  position: fixed;
  bottom: 1em;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: fit-content;
  max-width: 92vw;
  color: #444;
  font-size: 0.9em;
  padding: 0.6em 1.2em;
  background: #f4f8fc;
  border: 1px solid #b8d0ec;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.hit-count strong { color: #1a3c6e; }
.hit-count button {
  border: 1px solid #b8d0ec;
  background: #fff;
  color: #1a3c6e;
  font-size: 0.9em;
  cursor: pointer;
  padding: 0.05em 0.5em;
  margin-left: 0.3em;
  border-radius: 4px;
}
.hit-count button:hover { background: #dce9f7; }
.results { list-style: none; padding-left: 0; }
.results .result {
  margin: 0.8em 0;
  padding: 1em 1.2em;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.results .result:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #c8d6e8;
}
.result-head { display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }
.result-head a { font-size: 1.1em; font-weight: 600; color: #1a3c6e; }
.result-head a:hover { color: #0055aa; }
.juan-badge {
  font-size: 0.75em;
  color: #0055aa;
  border: 1px solid #b8d0ec;
  background: #eef4fb;
  border-radius: 4px;
  padding: 0.05em 0.5em;
}
.work-id { font-size: 0.8em; color: #b0b0b0; }
.byline { color: #777; font-size: 0.85em; margin: 0.2em 0; }
.results .snippet {
  color: #555;
  font-size: 0.95em;
  margin-top: 0.5em;
  line-height: 1.9;
  text-align: justify;
}
.results .snippet mark {
  background: #fff3c4;
  color: #7a5c00;
  font-weight: 600;
  padding: 0 0.15em;
  border-radius: 3px;
}
.pager { display: flex; align-items: center; gap: 1em; margin: 1.2em 0; }
.pager a { padding: 0.4em 1em; border: 1px solid #b8d0ec; border-radius: 4px; background: #eef4fb; color: #1a3c6e; }
.pager a:hover { background: #dce9f7; text-decoration: none; }
.pager-info { color: #888; font-size: 0.9em; }
footer { margin-top: 2em; border-top: 1px solid #ddd; padding-top: 0.5em; color: #888; font-size: 0.85em; }
.nav { margin: 0.5em 0; }
