:root {
  color: #1a1a1a;
  background: #f5f6f8;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; min-height: 100%; }
button, input { font: inherit; }
a { color: #1c7fe8; text-decoration: none; }
.nav {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #ececec;
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: 0.08em; margin-right: 36px; }
.nav a.item { color: #1a1a1a; margin-right: 22px; padding-bottom: 4px; }
.nav a.item.on { color: #1c7fe8; border-bottom: 2px solid #1c7fe8; }
.spacer { flex: 1; }
.user { color: #666; margin-right: 18px; }
.main { width: min(1120px, calc(100% - 48px)); margin: 28px auto 64px; }
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 28px 22px;
}
.cover {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  color: #fff;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 8px 18px rgba(20, 24, 32, 0.12);
  cursor: pointer;
}
.cover b { font-size: 16px; line-height: 1.35; }
.cover span { margin-top: 8px; font-size: 12px; opacity: 0.85; }
.meta { margin-top: 10px; }
.meta .title { font-size: 14px; line-height: 1.4; max-height: 2.8em; overflow: hidden; }
.meta .sub { margin-top: 4px; color: #9a9a9a; font-size: 12px; }
.card { cursor: pointer; }
.login {
  width: 380px;
  margin: 80px auto;
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.login h1 { margin: 0 0 8px; font-size: 28px; }
.login p { margin: 0 0 20px; color: #888; }
.login input, .row input[type="file"] {
  width: 100%;
  height: 42px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 0 12px;
  margin-bottom: 12px;
}
.login button, .bar button, .tool {
  border: 0;
  background: #1c7fe8;
  color: #fff;
  height: 40px;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
}
.linkish { background: none; color: #1c7fe8; border: 0; cursor: pointer; padding: 0; }
.error { color: #c0453b; font-size: 13px; min-height: 18px; }
.reader-wrap { display: flex; justify-content: center; gap: 28px; align-items: flex-start; }
.paper {
  width: min(720px, 100%);
  min-height: calc(100vh - 120px);
  background: var(--paper, #fff);
  color: var(--ink, #1c1c1c);
  padding: 42px 64px 72px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
.kicker { text-align: center; color: #b0b0b0; font-size: 13px; margin-bottom: 28px; }
.paper p {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 18px;
  line-height: 1.9;
  text-indent: 2em;
  margin: 0 0 1em;
  text-align: justify;
}
.foot { text-align: center; color: #b0b0b0; margin-top: 24px; font-size: 13px; }
.rail {
  position: sticky;
  top: 92px;
  width: 72px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rail button {
  border: 0;
  background: #fff;
  height: 72px;
  cursor: pointer;
  color: #333;
  border-bottom: 1px solid #f2f2f2;
}
.rail button.on { color: #1c7fe8; }
.panel {
  width: 280px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}
.panel h3 { margin: 8px 0; font-size: 14px; }
.toc button, .marks button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid #f3f3f3;
  padding: 10px 0;
  cursor: pointer;
}
.toc button.on { color: #1c7fe8; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.bar { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; }
.import { margin-left: auto; color: #1c7fe8; cursor: pointer; }
