/* =========================================================
   拾味日常 · 第二版 — 清新杂志排版
   Editorial Layout / Green & Ivory
   ========================================================= */

:root {
  --paper: #fbfaf6;
  --paper-2: #f3f0e8;
  --ink: #242b25;
  --muted: #757d73;
  --faint: #a4a99f;
  --green: #355943;
  --green-soft: #e8efe7;
  --rust: #c46a42;
  --line: #dedacf;
  --max: 1180px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.wrap { width: min(calc(100% - 56px), var(--max)); margin-inline: auto; }

/* ---------- 通用小元素 ---------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--green);
}

.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }

.num { font-family: var(--serif); color: var(--rust); font-size: 13px; letter-spacing: .05em; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 34px;
}

.sec-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  margin: 8px 0 0;
  letter-spacing: .04em;
}

.sec-head p { margin: 0; color: var(--muted); font-size: 13px; }

.more-link {
  font-size: 13px;
  color: var(--green);
  border-bottom: 1px solid var(--green);
  padding-bottom: 3px;
  white-space: nowrap;
}

.more-link:hover { color: var(--rust); border-color: var(--rust); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo { display: inline-flex; align-items: baseline; gap: 10px; flex-shrink: 0; }

.logo-mark {
  width: 30px;
  height: 30px;
  border: 1px solid var(--green);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--green);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
}

.logo-text {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .16em;
}

.logo-en { font-size: 9px; letter-spacing: .2em; color: var(--faint); text-transform: uppercase; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  position: relative;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  transition: color .2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--green);
  transition: width .25s;
}

.nav a:hover, .nav a.active { color: var(--green); }
.nav a:hover::after, .nav a.active::after { width: 100%; }

.header-tools { display: flex; align-items: center; gap: 10px; }

.tool {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; background: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s, color .2s;
}

.tool:hover { background: var(--green-soft); color: var(--green); }
.tool svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* ---------- Masthead (home hero) ---------- */

.masthead { padding: 76px 0 40px; }

.masthead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.masthead-copy h1 {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1.22;
  font-weight: 600;
  margin: 22px 0 26px;
  letter-spacing: .05em;
}

.masthead-copy h1 em { font-style: normal; color: var(--green); }

.lead {
  font-size: 16px;
  color: var(--muted);
  line-height: 2.05;
  max-width: 460px;
  margin: 0 0 34px;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  font-size: 13px;
  letter-spacing: .05em;
  border: 1px solid var(--green);
  border-radius: 0;
  transition: all .25s;
}

.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }
.btn-line { color: var(--green); background: transparent; }
.btn-line:hover { background: var(--green-soft); }

.masthead-visual { position: relative; }

.masthead-visual .main-img {
  width: 100%;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
}

.masthead-visual .sub-img {
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 42%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 6px solid var(--paper);
}

.masthead-visual .stamp {
  position: absolute;
  left: -30px;
  top: 24px;
  width: 78px; height: 78px;
  border: 1px solid var(--rust);
  border-radius: 50%;
  color: var(--rust);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.6;
  transform: rotate(-12deg);
}

/* ---------- Issue strip ---------- */

.issue-strip {
  margin-top: 80px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.issue-item {
  padding: 22px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background .25s;
}

.issue-item:last-child { border-right: 0; }
.issue-item:hover { background: var(--green-soft); }
.issue-item .num { font-size: 18px; }
.issue-item strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.issue-item small { display: block; color: var(--faint); font-size: 10px; letter-spacing: .1em; }

/* ---------- Feature row ---------- */

.section { padding: 76px 0 10px; }

.feature-row {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: stretch;
}

.feature-main { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }

.feature-main img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }

.feature-main .feature-copy {
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-copy h3 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.5;
  margin: 14px 0 12px;
}

.feature-copy p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.feature-side { display: grid; gap: 18px; }

.side-post {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.side-post:last-child { border-bottom: 0; padding-bottom: 0; }
.side-post img { width: 116px; height: 84px; object-fit: cover; }
.side-post h4 { font-family: var(--serif); font-size: 17px; line-height: 1.5; margin: 6px 0 4px; }
.side-post p { margin: 0; font-size: 12px; color: var(--muted); }

.side-post h4:hover { color: var(--green); }

/* ---------- Article grid ---------- */

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px 30px;
}

.card { position: relative; }

.card .thumb {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}

.card .thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}

.card:hover .thumb img { transform: scale(1.05); }

.card .label {
  position: absolute;
  left: 0; bottom: 0;
  background: var(--paper);
  padding: 5px 12px;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--green);
}

.card .meta {
  margin-top: 16px;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: .08em;
  display: flex;
  gap: 12px;
}

.card h3 {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.55;
  margin: 8px 0 10px;
  font-weight: 600;
}

.card h3 a:hover { color: var(--green); }

.card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.9; }

/* ---------- Quote band ---------- */

.quote-band {
  margin: 90px 0 20px;
  padding: 64px 40px;
  background: var(--green);
  color: #fff;
  text-align: center;
}

.quote-band .kicker { color: #bcd3bd; justify-content: center; }
.quote-band .kicker::before { display: none; }

.quote-band blockquote {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.65;
  margin: 22px auto 18px;
  max-width: 820px;
}

.quote-band span { color: #cfe0cf; font-size: 12px; letter-spacing: .16em; }

/* ---------- Page banner ---------- */

.banner {
  position: relative;
  padding: 70px 0 60px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.banner-inner { display: grid; grid-template-columns: 1fr 380px; gap: 50px; align-items: center; }

.banner h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 600;
  margin: 12px 0 16px;
  letter-spacing: .06em;
}

.banner p { color: var(--muted); max-width: 560px; margin: 0 0 22px; }

.banner img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* ---------- Category layout ---------- */

.cat-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 60px;
  padding: 60px 0 90px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.list-head h2 { font-family: var(--serif); font-size: 22px; margin: 0; font-weight: 600; }
.list-head span { font-size: 12px; color: var(--faint); }

.list-post {
  display: grid;
  grid-template-columns: 54px 1fr 150px;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.list-post .num { font-size: 22px; }
.list-post h3 { font-family: var(--serif); font-size: 23px; line-height: 1.5; margin: 4px 0 6px; font-weight: 600; }
.list-post h3 a:hover { color: var(--green); }
.list-post p { margin: 0; color: var(--muted); font-size: 13px; }
.list-post .meta { font-size: 11px; color: var(--faint); margin-bottom: 8px; }
.list-post img { width: 150px; aspect-ratio: 4/3; object-fit: cover; }

.sidebar { display: grid; gap: 34px; align-content: start; }

.widget { border-top: 2px solid var(--ink); padding-top: 14px; }
.widget h3 { font-family: var(--serif); font-size: 16px; margin: 0 0 16px; font-weight: 600; }

.widget ul { list-style: none; margin: 0; padding: 0; }

.widget li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.widget li:last-child { border-bottom: 0; }
.widget li a:hover { color: var(--green); }
.widget small { display: block; color: var(--faint); font-size: 10px; margin-top: 3px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }

.tags span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}

.tags span:hover, .tags span.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- Article page ---------- */

.reading {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 210px;
  gap: 56px;
  padding: 54px 0 90px;
  align-items: start;
}

.toc, .rail { position: sticky; top: 104px; }

.toc-title {
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--faint);
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }

.toc li { counter-increment: toc; margin-bottom: 2px; }

.toc a {
  display: block;
  padding: 7px 0 7px 26px;
  position: relative;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.toc a::before {
  content: "0" counter(toc);
  position: absolute;
  left: 0; top: 7px;
  font-family: var(--serif);
  font-size: 10px;
  color: var(--faint);
}

.toc a:hover, .toc a.active { color: var(--green); }
.toc a.sub { padding-left: 38px; font-size: 11.5px; }

.rail .widget { border-top-color: var(--green); }
.rail .profile { text-align: center; }
.rail .profile img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; }
.rail .profile h4 { font-family: var(--serif); margin: 0 0 4px; font-size: 16px; }
.rail .profile p { margin: 0; font-size: 11px; color: var(--muted); }

.post-head { max-width: 820px; margin: 0 auto 30px; }

.crumb { font-size: 11px; color: var(--faint); letter-spacing: .08em; margin-bottom: 18px; }
.crumb a { color: var(--green); border-bottom: 1px solid var(--green); }

.post-head h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.38;
  font-weight: 600;
  margin: 0 0 18px;
  letter-spacing: .03em;
}

.post-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 11px; color: var(--faint); letter-spacing: .08em; }

.hero-img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  margin-bottom: 44px;
}

.post-body { max-width: 760px; margin: 0 auto; font-size: 16.5px; }

.post-body > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.1em;
  line-height: 1;
  float: left;
  padding: 8px 10px 0 0;
  color: var(--green);
}

.post-body p { margin: 0 0 26px; }

.post-body h2 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  margin: 56px 0 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.post-body h2::before { content: "§ "; color: var(--rust); font-family: var(--serif); }

.post-body h3 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 34px 0 12px;
  scroll-margin-top: 100px;
}

.post-body blockquote {
  margin: 36px 0;
  padding: 8px 0 8px 26px;
  border-left: 3px solid var(--green);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.9;
  color: var(--green);
}

.post-body ul, .post-body ol { padding-left: 22px; margin: 0 0 26px; }
.post-body li { margin-bottom: 9px; }

.post-body figure { margin: 40px 0; }
.post-body figure img { width: 100%; }
.post-body figcaption { text-align: right; font-size: 11px; color: var(--faint); margin-top: 8px; }

.note-box {
  background: var(--paper-2);
  padding: 24px 28px;
  margin: 32px 0;
  border-left: 4px solid var(--rust);
}

.note-box h3 { margin-top: 0; }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.tag-row span { font-size: 11px; color: var(--muted); padding: 4px 10px; background: var(--paper-2); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
  margin: 34px auto 0;
}

.post-nav a { border-top: 1px solid var(--ink); padding-top: 14px; font-family: var(--serif); font-size: 15px; line-height: 1.6; }
.post-nav a:hover { color: var(--green); }
.post-nav small { display: block; font-family: var(--sans); font-size: 10px; color: var(--faint); margin-bottom: 6px; letter-spacing: .1em; }
.post-nav .next { text-align: right; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 70px;
  padding: 70px 0 90px;
  align-items: center;
}

.about-grid .portrait { position: relative; }
.about-grid .portrait img { width: 100%; aspect-ratio: 4/4.6; object-fit: cover; }

.about-grid .portrait::after {
  content: "小满 / 2026";
  position: absolute;
  bottom: 0; right: 0;
  background: var(--paper);
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: .1em;
}

.about-copy h2 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 42px); line-height: 1.5; margin: 14px 0 22px; font-weight: 600; }
.about-copy p { color: var(--muted); }

.tenets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }

.tenet { border-top: 2px solid var(--green); padding-top: 12px; }
.tenet strong { display: block; font-family: var(--serif); font-size: 16px; }
.tenet span { font-size: 11px; color: var(--muted); }

.contact-band {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 46px 0;
  margin-bottom: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.contact-band h2 { font-family: var(--serif); font-size: 28px; margin: 6px 0 8px; }
.contact-band p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--ink); padding: 50px 0 28px; }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 36px; }
.footer-grid h4 { font-family: var(--serif); font-size: 14px; margin: 0 0 16px; }
.footer-grid p, .footer-grid a { font-size: 12px; color: var(--muted); margin: 0 0 9px; display: block; }
.footer-grid a:hover { color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 11px; color: var(--faint); }

/* ---------- Search ---------- */

.search-layer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(36, 43, 37, .97);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 24px 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.search-layer.open { opacity: 1; visibility: visible; }
.search-panel { width: min(100%, 660px); color: #fff; }

.search-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.search-top span { font-size: 10px; letter-spacing: .24em; color: #bcd3bd; }
.search-close { background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

.search-field { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 12px; }
.search-field svg { width: 20px; color: #bcd3bd; }
.search-field input { flex: 1; background: none; border: 0; outline: none; color: #fff; font-family: var(--serif); font-size: 28px; }
.search-field input::placeholder { color: rgba(255,255,255,.3); }
.search-results { margin-top: 24px; max-height: 52vh; overflow-y: auto; }

.search-result { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.search-result:hover strong { color: #bcd3bd; }
.search-result strong { display: block; font-family: var(--serif); font-size: 17px; }
.search-result small { color: rgba(255,255,255,.45); font-size: 11px; }
.search-empty { color: rgba(255,255,255,.5); padding: 26px 0; }

/* ---------- Floating ---------- */

.progress { position: fixed; top: 70px; left: 0; height: 2px; width: 0; background: var(--green); z-index: 60; }

.to-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 40px; height: 40px;
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); display: grid; place-items: center;
  cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(10px); transition: .3s; z-index: 40;
}

.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--green); color: var(--green); }

.fade { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.fade.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .reading { grid-template-columns: 150px minmax(0,1fr); gap: 36px; }
  .rail { display: none; }
  .cat-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .wrap { width: min(calc(100% - 36px), var(--max)); }
  .nav {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 10px 18px 18px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: .25s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 10px 0; }
  .menu-btn { display: grid; }
  .masthead-grid, .banner-inner, .feature-row, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .masthead-visual .sub-img { right: 10px; }
  .masthead-visual .stamp { left: 10px; }
  .issue-strip { grid-template-columns: repeat(2, 1fr); }
  .issue-item:nth-child(2) { border-right: 0; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .reading { display: block; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .article-grid, .sidebar, .tenets { grid-template-columns: 1fr; }
  .feature-main { grid-template-columns: 1fr; }
  .feature-main img { min-height: 220px; }
  .issue-strip { grid-template-columns: 1fr; }
  .issue-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .list-post { grid-template-columns: 34px 1fr; }
  .list-post img { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-body > p:first-of-type::first-letter { font-size: 2.5em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .fade { opacity: 1; transform: none; }
}
