:root {
  --paper: #f7f3ea;
  --paper-2: #f1ebdf;
  --paper-3: #fffdf7;
  --ink: #26221c;
  --ink-2: #5d564c;
  --ink-3: #9a9081;
  --line: #e2d9c7;
  --line-2: #cfc3ab;
  --seal: #a8503c;
  --moss: #788c7a;
  --coffee: #8b6f55;
  --width: 780px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html[data-theme="dark"] .hero-photo { opacity: .52; filter: sepia(.12) saturate(.48) contrast(.92) brightness(.9); }
html[data-theme="dark"] .ph img { filter: sepia(.12) saturate(.6) contrast(.95) brightness(.9); }
html[data-theme="dark"] .hero-veil { background:
    linear-gradient(180deg, transparent 0%, transparent 54%, rgba(21,20,15,.88) 84%, var(--paper) 100%),
    linear-gradient(96deg, rgba(21,20,15,.9) 0%, rgba(21,20,15,.84) 36%, rgba(21,20,15,.62) 60%, rgba(21,20,15,.38) 84%, rgba(21,20,15,.24) 100%); }

html[data-theme="dark"] {
  --paper: #15140f;
  --paper-2: #1d1b15;
  --paper-3: #221f18;
  --ink: #ece4d3;
  --ink-2: #b8ad99;
  --ink-3: #7d7361;
  --line: #2f2b22;
  --line-2: #3d382d;
  --seal: #c0654b;
  --moss: #8fa28c;
  --coffee: #b08e70;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 18% -10%, rgba(168, 80, 60, .07), transparent 42%),
    radial-gradient(circle at 88% 24%, rgba(120, 140, 122, .07), transparent 38%),
    radial-gradient(circle at 50% 120%, rgba(139, 111, 85, .06), transparent 45%);
  background-attachment: fixed;
}

.wrap { width: calc(100% - 44px); max-width: var(--width); margin: 0 auto; }
a { color: inherit; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(12px) saturate(1.1);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.seal {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--seal); color: #fff; font-family: var(--serif);
  font-size: 17px; border-radius: 3px; box-shadow: 0 1px 0 rgba(0,0,0,.12) inset;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-family: var(--serif); font-size: 17px; letter-spacing: .14em; font-weight: 600; }
.brand-text small { font-size: 11px; color: var(--ink-3); letter-spacing: .12em; }

.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a {
  font-family: var(--serif); font-size: 14px; color: var(--ink-2);
  text-decoration: none; letter-spacing: .12em; padding: 4px 0;
  border-bottom: 1px solid transparent; transition: .18s;
}
.nav a:hover, .nav a.is-active { color: var(--seal); border-bottom-color: var(--seal); }

.header-tools { display: flex; align-items: center; gap: 10px; }
.search input {
  width: 168px; padding: 7px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper-3); color: var(--ink); font-family: var(--sans);
  transition: .2s;
}
.search input:focus { outline: none; border-color: var(--line-2); width: 196px; }
.icon-btn {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer; font-size: 14px;
  transition: .18s;
}
.icon-btn:hover { color: var(--seal); border-color: var(--seal); }

/* ---------- 首屏 ---------- */
.hero-band { position: relative; overflow: hidden; }
.hero-photo {
  position: absolute; inset: 0;
  background: url("assets/lake-cangshan.jpg") center 58% / cover no-repeat;
  filter: sepia(.18) saturate(.62) contrast(.95) brightness(1.01);
  opacity: .82;
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      transparent 0%,
      transparent 54%,
      color-mix(in srgb, var(--paper) 90%, transparent) 84%,
      var(--paper) 100%),
    linear-gradient(96deg,
      color-mix(in srgb, var(--paper) 94%, transparent) 0%,
      color-mix(in srgb, var(--paper) 90%, transparent) 34%,
      color-mix(in srgb, var(--paper) 72%, transparent) 58%,
      color-mix(in srgb, var(--paper) 46%, transparent) 82%,
      color-mix(in srgb, var(--paper) 34%, transparent) 100%);
}
.hero { position: relative; z-index: 2; padding: 82px 0 30px; }
.kicker { font-size: 11px; letter-spacing: .32em; color: var(--ink-3); margin: 0 0 24px; }
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 7vw, 62px); line-height: 1.34;
  letter-spacing: .08em; margin: 0 0 26px;
}
.hero h1 em {
  font-style: normal; color: var(--seal);
  border-bottom: 1px solid color-mix(in srgb, var(--seal) 38%, transparent);
  padding-bottom: 2px;
}
.hero-sub {
  font-family: var(--serif); font-size: 16px; color: var(--ink-2);
  max-width: 31em; margin: 0 0 26px; line-height: 2.05;
}
.daily-note {
  font-family: var(--serif); margin: 0 0 30px; padding: 16px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  font-size: 15px; line-height: 1.95; color: var(--ink-2);
}
.daily-label { font-size: 10px; letter-spacing: .3em; color: var(--seal); margin-right: 14px; }
.daily-note em { font-style: normal; color: var(--ink); }
.daily-note small { font-size: 12px; color: var(--ink-3); margin-left: 10px; letter-spacing: .08em; }
.hero-act { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 24px; border-radius: 2px;
  background: var(--ink); color: var(--paper); font-size: 14px;
  letter-spacing: .14em; text-decoration: none; border: 1px solid var(--ink);
  cursor: pointer; font-family: var(--serif); transition: .2s;
}
.btn:hover { background: var(--seal); border-color: var(--seal); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: transparent; color: var(--seal); border-color: var(--seal); }

/* ---------- 统计 ---------- */
.stats {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: 13px; color: var(--ink-2); letter-spacing: .08em;
}
.stats b { color: var(--ink); font-weight: 600; font-size: 15px; }
.stats i { color: var(--ink-3); font-style: normal; }

/* ---------- 栏目卡 ---------- */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 30px 0 6px; }
.cat {
  text-align: left; padding: 16px 14px 14px; cursor: pointer;
  background: var(--paper-3); border: 1px solid var(--line); border-radius: 3px;
  color: inherit; font-family: inherit; position: relative; overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat::after {
  content: ""; position: absolute; right: -24px; top: -24px;
  width: 64px; height: 64px; border-radius: 50%;
  background: color-mix(in srgb, var(--seal) 6%, transparent);
}
.cat:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 8px 22px -16px rgba(38,34,28,.5); }
.cat .no { font-size: 10px; letter-spacing: .2em; color: var(--ink-3); }
.cat .name { display: block; font-family: var(--serif); font-size: 19px; letter-spacing: .12em; margin: 8px 0 5px; }
.cat .desc { font-size: 12px; color: var(--ink-3); line-height: 1.65; display: block; }
.cat .cnt { display: block; margin-top: 10px; font-size: 11px; color: var(--coffee); letter-spacing: .1em; }

/* ---------- 区块头 ---------- */
.block-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 20px;
}
.sec-title { font-family: var(--serif); font-size: 22px; letter-spacing: .18em; margin: 0; font-weight: 600; }
.block-sub { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; }

/* ---------- 合集 ---------- */
.collections { padding: 44px 0 10px; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.collection {
  text-align: left; border: 1px solid var(--line); border-radius: 3px; cursor: pointer;
  background: linear-gradient(180deg, var(--paper-3), color-mix(in srgb, var(--paper-2) 60%, var(--paper-3)));
  padding: 18px 18px 16px; font-family: inherit; color: inherit;
  transition: .2s; position: relative;
}
.collection:hover { border-color: var(--seal); transform: translateY(-2px); }
.collection .c-kicker { font-size: 10px; letter-spacing: .24em; color: var(--ink-3); }
.collection .c-title { display: block; font-family: var(--serif); font-size: 20px; letter-spacing: .1em; margin: 8px 0 6px; }
.collection .c-sample { font-family: var(--serif); font-size: 12px; color: var(--ink-3); line-height: 1.9; display: block; }
.collection .c-count { margin-top: 10px; font-size: 11px; color: var(--seal); letter-spacing: .1em; }

/* ---------- 今日一读 ---------- */
.today { padding: 40px 0 6px; }
.today-card {
  border: 1px solid var(--line); border-radius: 3px; background: var(--paper-3);
  padding: 26px 28px 22px; cursor: pointer; transition: .2s;
}
.today-card:hover { border-color: var(--line-2); box-shadow: 0 10px 30px -22px rgba(38,34,28,.55); }
.today-card h3 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; letter-spacing: .1em; }
.today-card .meta { font-size: 12px; color: var(--ink-3); margin: 0 0 14px; letter-spacing: .1em; }
.today-card p { font-family: var(--serif); color: var(--ink-2); margin: 0 0 12px; line-height: 2.05; }
.today-card .go { font-size: 12px; color: var(--seal); letter-spacing: .12em; font-family: var(--serif); }

/* ---------- 最近读过 ---------- */
.recent { padding: 36px 0 0; }
.recent-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.recent-item {
  flex: 0 0 auto; max-width: 240px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 3px; background: var(--paper-3);
  padding: 12px 14px; font-family: inherit; color: inherit;
}
.recent-item .t { font-family: var(--serif); font-size: 15px; display: block; }
.recent-item .m { font-size: 11px; color: var(--ink-3); margin-top: 4px; display: block; }

/* ---------- 列表 ---------- */
.list-wrap { padding: 44px 0 60px; }
.list-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.list-count { font-size: 12px; color: var(--ink-3); letter-spacing: .1em; margin-left: auto; }

.filter-bar { padding: 14px 0 6px; display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  font-family: var(--serif); font-size: 13px; letter-spacing: .12em;
  padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-2); cursor: pointer; transition: .18s;
}
.tab:hover { border-color: var(--line-2); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px;
  border: 1px solid transparent; background: color-mix(in srgb, var(--line) 45%, transparent);
  color: var(--ink-2); cursor: pointer; font-family: var(--sans); transition: .18s;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip[aria-selected="true"] { color: var(--seal); border-color: color-mix(in srgb, var(--seal) 45%, transparent); background: color-mix(in srgb, var(--seal) 8%, transparent); }

.filter-tail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
select {
  font-family: var(--sans); font-size: 12px; color: var(--ink-2);
  background: var(--paper-3); border: 1px solid var(--line); border-radius: 2px;
  padding: 5px 8px; cursor: pointer;
}
select:focus { outline: none; border-color: var(--line-2); }

.list { display: flex; flex-direction: column; }
.item {
  display: block; width: 100%; text-align: left;
  padding: 22px 2px 20px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: inherit; cursor: pointer; font-family: inherit;
  transition: .2s;
}
.item:hover { padding-left: 8px; background: color-mix(in srgb, var(--ink) 2%, transparent); }
.item-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.item .type {
  font-size: 10px; letter-spacing: .22em; color: var(--seal);
  border: 1px solid color-mix(in srgb, var(--seal) 28%, transparent);
  padding: 1px 6px; border-radius: 2px; white-space: nowrap;
}
.item .title { font-family: var(--serif); font-size: 19px; letter-spacing: .08em; margin: 0; font-weight: 600; }
.item .by { font-size: 11px; color: var(--ink-3); letter-spacing: .1em; }
.item .preview {
  margin: 9px 0 0; font-family: var(--serif); font-size: 14px; color: var(--ink-2);
  line-height: 1.95; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item .preview mark { background: color-mix(in srgb, var(--seal) 18%, transparent); color: inherit; padding: 0 2px; }
.item .extra { margin-top: 9px; font-size: 11px; color: var(--ink-3); letter-spacing: .08em; }
.empty { text-align: center; color: var(--ink-3); padding: 48px 0; font-family: var(--serif); letter-spacing: .1em; }
.load-more { display: block; margin: 24px auto 0; }

/* ---------- 阅读层 ---------- */
.reader { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; }
.reader[hidden] { display: none !important; }
.reader-mask { position: absolute; inset: 0; background: rgba(20, 17, 13, .52); backdrop-filter: blur(4px); }
.sheet {
  position: relative; width: min(680px, calc(100% - 28px)); max-height: 88vh; overflow: auto;
  background: var(--paper-3); border: 1px solid var(--line-2); border-radius: 3px;
  padding: 46px 38px 24px;
  animation: rise .3s cubic-bezier(.2, .85, .3, 1);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.6);
}
@keyframes rise { from { transform: translateY(16px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.sheet-progress {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
}
.sheet-progress span { display: block; height: 100%; width: 0; background: var(--seal); transition: width .15s; }
.sheet .close {
  position: absolute; top: 12px; right: 14px; width: 32px; height: 32px;
  border: 0; background: transparent; font-size: 22px; color: var(--ink-3); cursor: pointer;
}
.sheet .close:hover { color: var(--seal); }
.sheet-kicker { font-size: 11px; letter-spacing: .28em; color: var(--seal); margin: 0 0 14px; }
.sheet h2 { font-family: var(--serif); font-size: 28px; letter-spacing: .1em; margin: 0 0 10px; line-height: 1.5; outline: none; }
.sheet-meta {
  font-size: 12px; color: var(--ink-3); letter-spacing: .1em;
  margin: 0 0 26px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.sheet-body { font-family: var(--serif); color: var(--ink); transition: font-size .18s, line-height .18s; }
.sheet-body[data-size="s"] { font-size: 15px; line-height: 1.95; }
.sheet-body[data-size="m"] { font-size: 17px; line-height: 2.15; }
.sheet-body[data-size="l"] { font-size: 20px; line-height: 2.25; }
.sheet-body p { margin: 0 0 1.05em; text-indent: 2em; }
.sheet-body.poem p, .sheet-body.line p {
  text-indent: 0; text-align: center; margin: 0 0 .5em; letter-spacing: .1em;
}
.sheet-body.poem { padding: 12px 0 22px; }
.sheet-body .quote-line { text-indent: 0; }
.sheet-body .quote-line:last-child { color: var(--ink-3); font-size: .9em; }

.sheet-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
}
.font-tools { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); letter-spacing: .1em; }
.font-tools .chip { font-size: 12px; padding: 2px 10px; }
.act-tools { display: flex; gap: 16px; flex-wrap: wrap; }
.link-btn {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-family: var(--serif); font-size: 13px; letter-spacing: .14em; color: var(--ink-2);
  transition: .18s;
}
.link-btn:hover { color: var(--seal); }
.link-btn[data-on="1"] { color: var(--seal); }

.related { margin-top: 22px; }
.related .r-label { font-size: 11px; letter-spacing: .2em; color: var(--ink-3); margin-bottom: 10px; }
.related .r-list { display: flex; gap: 8px; flex-wrap: wrap; }
.related .r-item {
  border: 1px solid var(--line); border-radius: 2px; background: transparent;
  padding: 6px 12px; cursor: pointer; font-family: var(--serif); font-size: 13px;
  color: var(--ink-2); transition: .18s;
}
.related .r-item:hover { border-color: var(--seal); color: var(--seal); }

.sheet-act { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- 照片 ---------- */
.photo-credit {
  position: relative; z-index: 2; margin: 0;
  padding: 0 max(22px, calc((100% - var(--width)) / 2)) 16px;
  text-align: right; font-size: 10px; letter-spacing: .2em; color: var(--ink-3);
}

.gallery { padding: 26px 0 8px; }
.gallery.wrap { width: calc(100% - 44px); max-width: 1100px; }
.gallery-grid { display: grid; grid-template-columns: 1.55fr 1fr .82fr; gap: 10px; align-items: stretch; }
.ph {
  margin: 0; position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 3px; background: var(--paper-2);
}
.ph img {
  display: block; width: 100%; height: 300px; object-fit: cover;
  filter: sepia(.26) saturate(.72) contrast(.96) brightness(1.04);
  transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .45s;
}
.ph:hover img { transform: scale(1.045); filter: sepia(.1) saturate(.92) contrast(1); }
.ph::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 42%;
  background: linear-gradient(180deg, transparent, rgba(28, 24, 18, .46));
  pointer-events: none;
}
.ph figcaption {
  position: absolute; left: 12px; bottom: 11px; z-index: 2;
  font-family: var(--serif); font-size: 12px; letter-spacing: .18em; color: #f7f3ea;
  padding: 3px 9px; border-radius: 2px;
  background: rgba(24, 21, 16, .42); backdrop-filter: blur(3px);
}
.ph-tall img { height: 300px; }

@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .ph:first-child { grid-column: 1 / -1; }
  .ph img, .ph-tall img { height: 172px; }
}

/* ---------- 页脚 ---------- */
.site-footer { padding: 34px 0 56px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); line-height: 2; }
.tiny { font-size: 11px; }

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .header-inner { height: 58px; gap: 10px; }
  .nav { display: none; }
  .search input { width: 140px; }
  .search input:focus { width: 150px; }
  .hero { padding: 54px 0 18px; }
  .hero-photo { background-position: center 42%; opacity: .62; }
  .hero-veil {
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--paper) 62%, transparent) 0%,
        color-mix(in srgb, var(--paper) 88%, transparent) 52%,
        var(--paper) 96%);
  }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 9px; padding-top: 24px; }
  .cat { padding: 13px 12px 11px; }
  .cat .name { font-size: 16px; }
  .cat .desc { display: none; }
  .collection-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .collection { padding: 14px 14px 12px; }
  .collection .c-title { font-size: 17px; }
  .collection .c-sample { display: none; }
  .sheet { padding: 34px 20px 18px; max-height: 92vh; width: calc(100% - 18px); }
  .sheet h2 { font-size: 23px; }
  .sheet-body[data-size="m"] { font-size: 16px; }
  .item .title { font-size: 17px; }
  .filter-tail { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
