/* ============================================================
   文集 · 青绿素宣（大刊头 × 素宣列表）
   纸 #F4F7F4 · 青墨 #22332E · 深青 #1F3B37 · 竹青 #3E6B54
   ============================================================ */
:root {
  --paper: #f4f7f4;
  --ink: #22332e;
  --ink-deep: #1f3b37;
  --ink-soft: #5e7a6c;
  --ink-faint: #8fa298;
  --bamboo: #3e6b54;
  --hairline: #d9e4d8;
  --wash-a: #8fb5ac;
  --wash-b: #b8d2c6;
  --wash-c: #e9f0e7;
  --serif: "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --measure: 38rem;
  --body-size: 16px;
}
html[data-theme="dark"] {
  --paper: #141d19;
  --ink: #d8e2da;
  --ink-deep: #e6efe8;
  --ink-soft: #93a89b;
  --ink-faint: #5f7166;
  --bamboo: #7fb09a;
  --hairline: #26352e;
  --wash-a: #24382f;
  --wash-b: #1c2e27;
  --wash-c: #16231e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--body-size);
  line-height: 2;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: rgba(62, 107, 84, .18); }

/* ---------- 进度条 ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--bamboo); z-index: 99;
}

/* ---------- 刊头条 ---------- */
.band-head {
  display: flex; align-items: center; gap: 1.4rem;
  padding: .95rem 2.5rem;
  border-bottom: 3px solid var(--ink);
  font-family: var(--sans);
  max-width: 72rem; margin: 0 auto;
  position: sticky; top: 0; z-index: 60;
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}
.band-head .site-title {
  font-weight: 700; font-size: 1.02rem; letter-spacing: .3em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.band-head .band-vol {
  font-size: .74rem; letter-spacing: .3em; color: var(--bamboo); font-weight: 700;
}
.band-head .spacer { flex: 1; }
.masthead-tools { display: flex; gap: .6rem; }
.tool-btn {
  width: 2rem; height: 2rem; border: 1px solid var(--hairline);
  border-radius: 50%; background: none; color: var(--ink-soft);
  font-family: var(--sans); font-size: .78rem; cursor: pointer;
}
.tool-btn:hover { border-color: var(--bamboo); color: var(--bamboo); }

/* ---------- 大刊头 ---------- */
.washband {
  max-width: 72rem; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 2.5rem clamp(2.2rem, 5vw, 3.6rem);
  background: linear-gradient(160deg, var(--wash-a) 0%, var(--wash-b) 55%, var(--wash-c) 100%);
  position: relative; overflow: hidden;
}
.washband::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 88px;
  background:
    radial-gradient(150px 70px at 12% 100%, var(--bamboo) 98%, transparent),
    radial-gradient(210px 92px at 48% 100%, var(--wash-a) 98%, transparent),
    radial-gradient(170px 80px at 82% 100%, var(--wash-b) 98%, transparent);
  opacity: .8; pointer-events: none;
}
.wash-title {
  position: relative; z-index: 1;
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  line-height: 1.18; letter-spacing: .02em;
  color: #ffffff;
}
.wash-title em { font-style: normal; color: #d7e8dc; }
.wash-tag {
  position: relative; z-index: 1;
  font-family: var(--sans); font-size: .82rem;
  letter-spacing: .25em; color: rgba(255, 255, 255, .85); margin-top: 1.1rem;
}
html[data-theme="dark"] .washband::after { opacity: .5; }

/* ---------- 素宣列表 ---------- */
.home { display: flex; justify-content: center; }
.listpad { width: 100%; max-width: 42rem; padding: 3rem 1.6rem 4rem; text-align: center; }
.divide { width: 30px; border-top: 1px solid var(--bamboo); margin: 0 auto 1.4rem; }
.art-count {
  font-family: var(--sans); font-size: .82rem; color: var(--ink-soft);
  letter-spacing: .15em; margin-bottom: 1.2rem;
}
.entry {
  display: block; text-decoration: none;
  padding: 1.5rem 1rem 1.6rem;
  border-bottom: 1px solid var(--hairline);
}
.entry:first-of-type { border-top: 1px solid var(--hairline); }
.entry .e-date {
  font-family: var(--sans); font-size: .76rem; color: var(--ink-soft);
  letter-spacing: .2em;
}
.entry h2 {
  font-size: 1.24rem; font-weight: 600; letter-spacing: .05em;
  margin: .4rem 0 .45rem; transition: color .15s;
}
.entry:hover h2 { color: var(--bamboo); }
.entry .e-excerpt {
  font-size: .9rem; color: var(--ink-soft); line-height: 1.9;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.entry .e-meta {
  font-family: var(--sans); font-size: .74rem; color: var(--ink-faint); margin-top: .6rem;
  letter-spacing: .1em;
}
.toc-foot { font-family: var(--sans); font-size: .78rem; color: var(--ink-faint); margin-top: 2.6rem; }

/* ---------- 文章页 ---------- */
.article-wrap { display: flex; justify-content: center; }
.article-main { width: 100%; max-width: calc(var(--measure) + 6rem); padding: 4.2rem 2rem 5rem; }
.a-header { margin-bottom: 3rem; }
.a-header .a-date {
  font-family: var(--sans); font-size: .8rem; letter-spacing: .2em; color: var(--ink-soft);
}
.a-header h1 {
  font-size: 2rem; font-weight: 600; letter-spacing: .06em;
  line-height: 1.6; margin: .9rem 0 1rem; color: var(--ink-deep);
}
.a-header .a-meta {
  font-family: var(--sans); font-size: .82rem; color: var(--ink-soft);
  display: flex; gap: 1.4rem;
}
.a-header .a-meta em { font-style: normal; color: var(--bamboo); }
.a-rule { border: 0; border-top: 1px solid var(--hairline); margin: 0 0 2.8rem; }

.a-body p { margin: 0 0 1.6em; text-align: justify; }
.a-body h2 {
  font-size: 1.3rem; font-weight: 600; letter-spacing: .08em;
  margin: 3em 0 1.2em; scroll-margin-top: 3rem; color: var(--ink-deep);
}
.a-body h2::before {
  content: "§"; color: var(--bamboo); font-size: .85em; margin-right: .6em; font-weight: 400;
}
.a-body blockquote {
  border-left: 2px solid var(--bamboo);
  padding: .2em 0 .2em 1.4em; margin: 2em 0;
  color: var(--ink-soft);
}
.a-body strong { font-weight: 600; }

/* 正文配图 */
.a-body img {
  display: block; max-width: 100%; height: auto;
  margin: 2.4em auto 2em; border-radius: 3px;
  cursor: zoom-in; background: var(--wash-c);
}
.a-fig { margin: 2.4em 0 2em; }
.a-fig img { margin: 0 auto .7em; }
.a-fig figcaption {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .05em;
  color: var(--ink-faint); text-align: center; line-height: 1.7;
}
.a-body p img { margin: 1.2em auto; }

/* 图片放大层 */
.img-zoom {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(18, 26, 23, .92); padding: 3vw;
  cursor: zoom-out; overflow: auto;
}
.img-zoom.on { display: flex; align-items: center; justify-content: center; }
.img-zoom img {
  max-width: 96vw; max-height: 94vh; width: auto; height: auto;
  border-radius: 2px; box-shadow: 0 8px 40px rgba(0,0,0,.4);
}

/* ---------- 浮动目录 ---------- */
.floating-toc {
  position: fixed; right: 2.2rem; top: 50%; transform: translateY(-50%);
  width: 13rem; font-family: var(--sans);
  display: none;
}
@media (min-width: 1280px) { .floating-toc { display: block; } }
.floating-toc .ft-title { font-size: .72rem; letter-spacing: .25em; color: var(--ink-faint); margin-bottom: .8rem; }
.floating-toc a {
  display: block; text-decoration: none; font-size: .82rem;
  color: var(--ink-faint); padding: .32rem 0 .32rem .9rem;
  border-left: 1px solid var(--hairline); line-height: 1.5;
  transition: color .15s, border-color .15s;
}
.floating-toc a.active { color: var(--bamboo); border-left: 2px solid var(--bamboo); padding-left: .9rem; }
.floating-toc a:hover { color: var(--bamboo); }

/* ---------- 字号放大器 ---------- */
.fs-ctl {
  display: inline-flex; align-items: center; gap: .1rem;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: .12rem .2rem; background: transparent;
}
.fs-ctl .tool-btn {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  font-size: .78rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.fs-ctl .tool-btn:disabled { opacity: .28; cursor: default; }
.fs-val {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .02em;
  color: var(--ink-faint); min-width: 2.6rem; text-align: center;
}
@media (max-width: 480px) { .fs-val { display: none; } }

/* ---------- 浏览 / 点赞 / 评论 ---------- */
.engage { margin-top: 4rem; border-top: 1px solid var(--hairline); padding-top: 2.4rem; }
.eng-row {
  display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
  font-family: var(--sans); font-size: .84rem; color: var(--ink-soft);
}
.eng-item em { font-style: normal; color: var(--ink-deep); font-weight: 600; }
.like-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--sans); font-size: .84rem; color: var(--ink-soft);
  border: 1px solid var(--hairline); background: none;
  padding: .32rem .9rem; border-radius: 2rem; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.like-btn:hover { color: var(--bamboo); border-color: var(--bamboo); }
.like-btn.liked {
  color: #fff; background: var(--bamboo); border-color: var(--bamboo);
}
.like-btn.liked span { color: #fff; }

.cm-block { margin-top: 2.6rem; }
.cm-title {
  font-size: 1.05rem; font-weight: 600; letter-spacing: .18em;
  color: var(--ink-deep); margin-bottom: 1.2rem;
}
.cm-form { display: flex; flex-direction: column; gap: .8rem; margin-bottom: .8rem; }
.cm-form input, .cm-form textarea {
  width: 100%; font-family: var(--sans); font-size: .9rem; line-height: 1.8;
  color: var(--ink); background: rgba(255,255,255,.35);
  border: 1px solid var(--hairline); border-radius: .5rem;
  padding: .6rem .9rem; outline: none; resize: vertical;
}
html[data-theme="dark"] .cm-form input,
html[data-theme="dark"] .cm-form textarea { background: rgba(255,255,255,.04); }
.cm-form input:focus, .cm-form textarea:focus { border-color: var(--bamboo); }
.cm-form .cm-name { max-width: 16rem; }

/* 表情面板 */
.cm-editor { display: flex; flex-direction: column; gap: .35rem; }
.cm-bar { display: flex; justify-content: flex-end; margin-top: -.1rem; }
.cm-emoji-btn {
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  border: 1px solid var(--hairline); background: none; color: var(--ink-soft);
  font-size: 1rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.cm-emoji-btn:hover, .cm-emoji-btn.on { border-color: var(--bamboo); color: var(--bamboo); }
.cm-emoji-panel {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: .15rem;
  padding: .55rem; border: 1px solid var(--hairline); border-radius: .5rem;
  background: var(--paper);
}
.cm-emoji-panel[hidden] { display: none; }
.cm-emoji-panel button {
  width: 100%; aspect-ratio: 1; border: none; background: none; cursor: pointer;
  font-size: 1.18rem; line-height: 1; border-radius: .3rem; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.cm-emoji-panel button:hover { background: var(--wash-c); }
@media (max-width: 560px) {
  .cm-emoji-panel { grid-template-columns: repeat(7, 1fr); }
}
.cm-submit {
  align-self: flex-start; font-family: var(--sans); font-size: .86rem;
  color: #fff; background: var(--bamboo); border: none; border-radius: 2rem;
  padding: .5rem 1.4rem; cursor: pointer;
}
.cm-submit:disabled { opacity: .55; cursor: default; }
.cm-tip { font-family: var(--sans); font-size: .78rem; color: var(--ink-soft); min-height: 1.4em; }
.cm-list { margin-top: 1.4rem; }
.cm-item { padding: 1.1rem 0; border-top: 1px solid var(--hairline); }
.cm-item .cm-head {
  display: flex; align-items: baseline; gap: .8rem;
  font-family: var(--sans); font-size: .8rem; color: var(--ink-soft);
}
.cm-item .cm-head strong { color: var(--ink-deep); font-weight: 600; font-size: .84rem; }
.cm-item .cm-text {
  font-size: .95rem; line-height: 1.95; margin-top: .35rem; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.cm-empty { font-family: var(--sans); font-size: .82rem; color: var(--ink-faint); padding: 1rem 0; }

/* ---------- 打赏 ---------- */
.tip-zone { margin-top: 4.5rem; border-top: 1px solid var(--hairline); padding-top: 3rem; text-align: center; }
.seal-btn {
  width: 4.6rem; height: 4.6rem; border: none; cursor: pointer;
  background: var(--bamboo); color: #f2f7f0;
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  border-radius: .6rem; box-shadow: inset 0 0 0 2px rgba(242,247,240,.5), inset 0 0 0 5px var(--bamboo);
  letter-spacing: .12em; text-indent: .12em; line-height: 1;
  transition: transform .15s;
}
.seal-btn:hover { transform: rotate(-3deg) scale(1.04); }
.tip-zone .tz-note { font-family: var(--sans); font-size: .8rem; color: var(--ink-faint); margin-top: 1rem; }
.tip-modal {
  position: fixed; inset: 0; background: rgba(18, 26, 22, .55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 1.5rem;
}
.tip-modal.open { display: flex; }
.tip-card {
  background: var(--paper); border-radius: .8rem; padding: 2.2rem 2.4rem;
  max-width: 24rem; width: 100%; text-align: center; position: relative;
}
.tip-card h3 { font-size: 1.1rem; letter-spacing: .15em; font-weight: 600; color: var(--ink-deep); }
.tip-card .tc-sub { font-family: var(--sans); font-size: .8rem; color: var(--ink-faint); margin: .5rem 0 1.4rem; }
.amount-row { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.amt {
  font-family: var(--sans); font-size: .9rem; padding: .5rem .95rem;
  border: 1px solid var(--hairline); border-radius: 2rem; background: none;
  color: var(--ink); cursor: pointer;
}
.amt.sel { border-color: var(--bamboo); color: var(--bamboo); background: rgba(62,107,84,.08); }
.qr-box img { width: 200px; height: 200px; object-fit: contain; border-radius: .4rem; background: #fff; }
.custom-row {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  margin: -.4rem 0 1.2rem;
}
.custom-row[hidden] { display: none; }
.custom-row .cr-sym { font-family: var(--sans); font-size: .95rem; color: var(--ink-soft); }
.custom-row input {
  width: 8.5rem; font-family: var(--sans); font-size: .95rem;
  padding: .45rem .7rem; text-align: center;
  border: 1px solid var(--hairline); border-radius: 2rem;
  background: none; color: var(--ink); outline: none;
  -moz-appearance: textfield;
}
.custom-row input::-webkit-outer-spin-button,
.custom-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.custom-row input:focus { border-color: var(--bamboo); }
.qr-ph {
  width: 200px; height: 200px; margin: 0 auto; border: 1px dashed var(--ink-faint);
  border-radius: .4rem; display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: .74rem; color: var(--ink-faint); padding: 1rem; line-height: 1.7;
}
.tc-hint { font-family: var(--sans); font-size: .78rem; color: var(--ink-soft); margin-top: 1rem; line-height: 1.8; }
.tc-close {
  position: absolute; top: .8rem; right: 1rem; border: none; background: none;
  font-size: 1.2rem; color: var(--ink-faint); cursor: pointer; font-family: var(--sans);
}

/* ---------- 文末导航 / 页脚 ---------- */
.a-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; font-family: var(--sans); font-size: .86rem; }
.a-nav a { color: var(--ink-soft); text-decoration: none; max-width: 45%; }
.a-nav a:hover { color: var(--bamboo); }
footer.site-foot {
  font-family: var(--sans); font-size: .78rem; color: var(--ink-faint);
  border-top: 1px solid var(--hairline);
  padding: 2rem; text-align: center; letter-spacing: .1em;
}
.foot-admin {
  color: var(--ink-faint); text-decoration: none;
  border-bottom: 1px dotted var(--ink-faint); padding-bottom: 1px;
  margin-left: .3rem; opacity: .75;
}
.foot-admin:hover { color: var(--bamboo); border-bottom-color: var(--bamboo); opacity: 1; }

/* 页脚 · 全站累计访问次数 */
.foot-views {
  margin-top: .85rem;
  display: inline-flex; align-items: baseline; gap: .45em;
  font-size: .72rem; letter-spacing: .18em; color: var(--ink-faint);
  opacity: 0; transform: translateY(2px);
  transition: opacity .8s ease, transform .8s ease;
  font-variant-numeric: tabular-nums;
}
.foot-views.on { opacity: .9; transform: none; }
.foot-views::before,
.foot-views::after {
  content: ""; width: 1.6rem; height: 1px; background: var(--hairline);
  align-self: center;
}
.foot-views b {
  font-family: var(--serif); font-size: 1.02rem; font-weight: 600;
  color: var(--bamboo); letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  padding: 0 .1em;
}
html[data-theme="dark"] .foot-views b { color: var(--bamboo); }
.foot-mail {
  color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid var(--hairline); padding-bottom: 1px;
  font-family: var(--sans); font-size: .82em; letter-spacing: .02em;
}
.foot-mail:hover { color: var(--bamboo); border-bottom-color: var(--bamboo); }
#backtop {
  position: fixed; right: 2.2rem; bottom: 2.2rem; width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--hairline); border-radius: 50%; background: var(--paper);
  color: var(--ink-soft); cursor: pointer; font-size: 1rem; display: none; z-index: 98;
}
#backtop.show { display: block; }
#backtop:hover { color: var(--bamboo); border-color: var(--bamboo); }

@media (max-width: 720px) {
  .band-head { padding: .85rem 1.2rem; gap: .9rem; }
  .washband { padding-left: 1.2rem; padding-right: 1.2rem; }
  .listpad { padding: 2.2rem 1.2rem 3rem; }
  .a-header h1 { font-size: 1.55rem; }
  #backtop { right: 1.2rem; bottom: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
:focus-visible { outline: 2px solid var(--bamboo); outline-offset: 2px; }
