:root {
  --paper: #f8f3e8;
  --ink: #18251e;
  --green: #1f4a36;
  --red: #b9402f;
  --muted: #756f64;
  --line: rgba(24, 37, 30, 0.18);
  --white: #fffdf7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", STSong, Georgia, serif;
}
button, a { font: inherit; }

.site-header {
  height: 76px;
  padding: 0 clamp(22px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 243, 232, 0.92);
  backdrop-filter: blur(14px);
}
.brand { color: var(--ink); text-decoration: none; display: flex; gap: 12px; align-items: center; font-weight: 700; letter-spacing: .08em; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: white; display: grid; place-items: center; font-size: 15px; }
.issue, .eyebrow { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.issue { color: var(--muted); }

.hero {
  min-height: calc(100vh - 76px);
  padding: clamp(54px, 10vw, 130px) clamp(22px, 8vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 9vw;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "阅";
  position: absolute;
  right: 16%;
  top: 5%;
  font-size: min(46vw, 620px);
  line-height: 1;
  color: rgba(31, 74, 54, .035);
  pointer-events: none;
}
.eyebrow { color: var(--red); margin: 0 0 24px; font-weight: 700; }
h1 { font-size: clamp(50px, 8.2vw, 116px); line-height: 1.03; margin: 0; letter-spacing: -.055em; font-weight: 600; }
h1 em { color: var(--green); font-style: normal; }
.hero-intro { max-width: 580px; font-size: clamp(16px, 1.6vw, 21px); line-height: 1.9; color: var(--muted); margin: 34px 0; }
.scroll-link { display: inline-flex; gap: 24px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 8px; font-size: 14px; }
.hero-note { border-left: 1px solid var(--line); padding-left: 32px; position: relative; z-index: 1; }
.hero-note p { font-size: 18px; margin: 8px 0 20px; }
.note-number { color: var(--red); font-family: Georgia, serif; font-style: italic; font-size: 13px; }
.note-line { display: block; height: 70px; border-left: 1px dashed var(--line); margin: 0 0 20px 4px; }

.library { padding: 100px clamp(22px, 6vw, 86px) 120px; background: var(--white); border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 48px; }
h2 { font-size: clamp(36px, 5vw, 66px); margin: 0; font-weight: 500; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.filter { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 8px 15px; color: var(--muted); cursor: pointer; }
.filter.active, .filter:hover { background: var(--green); border-color: var(--green); color: white; }
.book-grid { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--ink); }
.book-card { grid-column: span 6; padding: 44px 36px 42px 0; border-bottom: 1px solid var(--line); position: relative; }
.book-card:nth-child(even) { padding-left: 36px; padding-right: 0; border-left: 1px solid var(--line); }
.book-index { color: var(--red); font-size: 13px; font-style: italic; }
.book-card h3 { font-size: clamp(25px, 2.6vw, 38px); line-height: 1.35; margin: 16px 0 10px; font-weight: 600; }
.byline { color: var(--muted); margin: 0 0 20px; }
.metadata { display: flex; gap: 10px 18px; flex-wrap: wrap; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12px; color: var(--muted); padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rating { color: var(--red); font-weight: 700; }
.intro { color: #544f47; font-size: 15px; line-height: 1.9; margin: 20px 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 24px; }
.tag { background: #eee6d6; color: var(--green); padding: 5px 9px; font-size: 12px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; background: var(--paper); border: 1px solid var(--line); padding: 10px 10px 10px 16px; }
.code-wrap small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; word-break: break-all; }
.copy-button { border: 0; background: var(--red); color: white; padding: 11px 16px; cursor: pointer; white-space: nowrap; }
.copy-button:hover { background: #963225; }
.open-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.empty { grid-column: 1 / -1; padding: 80px 0; text-align: center; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 13px 22px; opacity: 0; pointer-events: none; transition: .25s; z-index: 20; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
footer { padding: 35px clamp(22px, 6vw, 86px); background: var(--green); color: white; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 28px; align-items: center; font-size: 13px; }
footer p { color: rgba(255,255,255,.68); text-align: center; margin: 0; }
footer span:last-child { text-align: right; }

@media (max-width: 780px) {
  .site-header { height: 64px; }
  .issue { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 75px; padding-bottom: 75px; gap: 60px; }
  h1 { font-size: clamp(46px, 15vw, 74px); }
  .hero-note { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 10px; align-items: center; border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .hero-note p { margin: 0; font-size: 15px; }
  .note-line { width: 28px; height: 1px; border-top: 1px dashed var(--line); border-left: 0; margin: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .book-card { grid-column: 1 / -1; padding: 34px 0; }
  .book-card:nth-child(even) { padding-left: 0; border-left: 0; }
  footer { grid-template-columns: 1fr; text-align: center; }
  footer span:last-child { text-align: center; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

