:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --fg: #e6e6e6;
  --muted: #b7c0cc;
  --link: #8ab4ff;
  --card: #0f1722;
  --border: rgba(255, 255, 255, 0.08);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 16px 64px;
}

.topbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  position: sticky;
  top: 10px;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.site-title,
.page-title,
.chapter-title {
  margin: 0;
}

.site-title {
  font-size: 18px;
  font-weight: 700;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  margin: 16px 0 6px;
}

.chapter-title {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 14px;
  color: var(--muted);
}

.content {
  margin-top: 14px;
}

.spacer {
  flex: 1;
}

.nav-link,
.nav-button {
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
}

.nav-button {
  cursor: pointer;
}

.nav-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.novel-list,
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.novel-item,
.toc-item {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 10px 12px;
}

.novel-title {
  font-weight: 650;
}

.novel-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.sep {
  margin: 0 6px;
}

.toc-item.ok a {
  color: var(--fg);
}
.toc-item.missing a {
  opacity: 0.75;
}
.toc-item.stale a,
.toc-item.broken a {
  color: #ffb4b4;
}

.para {
  margin: 0 0 1.05em;
}

.zh {
  margin: 0;
  font-size: 18px;
}

.zh.missing {
  color: var(--muted);
  font-style: italic;
}

.ja {
  margin: 0.22em 0 0;
  font-size: 15px;
  color: var(--muted);
  opacity: 0.72;
  display: none; /* hidden by default */
}

html.show-ja .ja {
  display: block;
}

