:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #18171a;
  --ink-2: #5c5a55;
  --ink-3: #9b978e;
  --accent: #b23a2e;
  --line: #e7e3da;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(24, 23, 26, 0.04), 0 10px 30px -18px rgba(24, 23, 26, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body { padding-bottom: 96px; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a { color: inherit; }

::selection { background: rgba(178, 58, 46, 0.15); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
  padding: 0 32px;
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.14em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  user-select: none;
}

.brand i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  margin-top: 3px;
}

.tabs { display: flex; gap: 4px; }

.tabs button {
  padding: 7px 18px;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  border-radius: 999px;
  transition: color 0.18s, background 0.18s;
}

.tabs button:hover { color: var(--ink-2); }
.tabs button.on { color: var(--ink); background: rgba(24, 23, 26, 0.055); }

.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  height: 38px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.searchbox:focus-within {
  border-color: rgba(178, 58, 46, 0.4);
  box-shadow: 0 0 0 4px rgba(178, 58, 46, 0.06);
}

.searchbox svg { flex: none; opacity: 0.4; }

.searchbox input {
  border: none;
  outline: none;
  background: none;
  font-size: 13.5px;
  width: 190px;
  color: var(--ink);
  font-family: inherit;
}

.searchbox input::placeholder { color: var(--ink-3); }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.hero { padding: 72px 0 44px; }

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  margin: 0 0 20px;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  padding-right: 0.06em;
}

.lede {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 34px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.chip {
  padding: 8px 17px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  transition: all 0.18s;
  letter-spacing: 0.02em;
}

.chip:hover { border-color: rgba(24, 23, 26, 0.25); color: var(--ink); }

.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 34px 26px;
}

.card {
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.32s;
}

.card:hover .cover {
  transform: translateY(-5px);
  box-shadow: 0 2px 4px rgba(24, 23, 26, 0.05), 0 22px 44px -22px rgba(24, 23, 26, 0.45);
}

.cover .ct {
  position: absolute;
  inset: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.cover .ct b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.cover .ct b::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.42;
  margin-bottom: 13px;
}

.cover .ct i {
  position: absolute;
  left: 0;
  bottom: 0;
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.55;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover .play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s, transform 0.22s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.card:hover .play-badge { opacity: 1; transform: none; }

.card h3 {
  font-size: 14.5px;
  font-weight: 500;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card p {
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  height: 84px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.player.up { transform: none; }

.p-cover {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.p-meta { min-width: 0; width: 220px; flex: none; }

.p-meta strong {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-meta span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-center { flex: 1; display: flex; align-items: center; gap: 16px; }

.p-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.18s, transform 0.12s;
  flex: none;
}

.p-btn:hover { background: rgba(24, 23, 26, 0.06); }
.p-btn:active { transform: scale(0.93); }

.p-btn.main {
  width: 42px;
  height: 42px;
  background: var(--ink);
  color: #fff;
}

.p-btn.main:hover { background: #000; }

.p-bar { flex: 1; display: flex; align-items: center; gap: 10px; }

.time {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  width: 38px;
  flex: none;
}

.time.r { text-align: right; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  outline: none;
  flex: 1;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px #fff;
  opacity: 0.9;
  transition: transform 0.15s;
}

input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.25); }

.p-right { display: flex; align-items: center; gap: 12px; flex: none; width: 130px; justify-content: flex-end; }

.p-right input[type="range"] { width: 72px; flex: none; }

.reader {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fdfbf7;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.reader.open { opacity: 1; pointer-events: auto; }

.reader-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 82;
  width: 0;
  transition: width 0.12s linear;
}

.reader-bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 26px;
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231, 227, 218, 0.7);
  z-index: 81;
}

.reader-bar .r-title {
  font-size: 13px;
  color: var(--ink-2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-bar button {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.16s, background 0.16s;
}

.reader-bar button:hover { color: var(--ink); background: rgba(24, 23, 26, 0.05); }

.reader-body {
  max-width: 660px;
  margin: 0 auto;
  padding: 52px 26px 140px;
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 2.05;
  color: #23221f;
  letter-spacing: 0.01em;
}

.reader-body h1, .reader-body h2, .reader-body h3 {
  font-weight: 500;
  line-height: 1.5;
  margin: 2.2em 0 1em;
}

.reader-body h1 { font-size: 30px; letter-spacing: 0.02em; }

.reader-body p { margin: 0 0 1.1em; text-indent: 2em; }

.reader-body p.noindent, .reader-body div > p:first-child { text-indent: 0; }

.reader-body .ws-header, .reader-body .noprint,
.reader-body .mw-empty-elt, .reader-body sup.reference { display: none; }

.reader-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 16px;
  line-height: 1.9;
}

.reader-body table td, .reader-body table th {
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
  border: none;
}

.reader-body table tr { border-bottom: none; }
.reader-body table.multicol { table-layout: fixed; }
.reader-body table.multicol td { width: 50%; vertical-align: top; }
.reader-body table p { text-indent: 0; margin: 0 0 0.5em; }
.reader-body table ul { margin: 0.3em 0; }

.reader-body a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(24, 23, 26, 0.16);
  transition: color 0.15s, border-color 0.15s;
}

.reader-body a:hover {
  color: var(--accent);
  border-bottom-color: rgba(178, 58, 46, 0.45);
}

.reader-body ul, .reader-body ol { padding-left: 1.25em; margin: 0.8em 0; }
.reader-body li { margin: 0.3em 0; }
.reader-body li > ul { margin: 0.2em 0; }

.reader-body img { max-width: 100%; height: auto; }

.reader-body blockquote {
  margin: 1.6em 0;
  padding-left: 1.2em;
  border-left: 2px solid var(--line);
  color: var(--ink-2);
}

.chap-nav {
  margin-top: 70px;
  padding-top: 26px;
  border-top: 1px solid rgba(231, 227, 218, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
}

.chap-nav button {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color 0.18s, color 0.18s;
}

.chap-nav button:hover { border-color: var(--ink-3); color: var(--ink); }
.chap-nav span { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

.empty {
  padding: 90px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 2;
}

.jump-note {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.9;
}

.jump-note a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(24, 23, 26, 0.2);
  padding-bottom: 1px;
}

.jump-note a:hover { color: var(--accent); border-bottom-color: rgba(178, 58, 46, 0.45); }

.skeleton {
  aspect-ratio: 1;
  border-radius: var(--r);
  background: linear-gradient(100deg, #f0ede6 30%, #f7f5ef 50%, #f0ede6 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -40% 0; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 26px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.02em;
}

.section-head span { font-size: 12px; color: var(--ink-3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(24, 23, 26, 0.14); border-radius: 6px; border: 3px solid var(--paper); }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 720px) {
  .topbar { padding: 0 18px; gap: 14px; }
  main { padding: 0 18px 70px; }
  .hero { padding: 44px 0 32px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 24px 16px; }
  .p-meta { width: 120px; }
  .p-right { display: none; }
  .searchbox input { width: 110px; }
}
