:root {
  --paper: #fdfcf9;
  --paper-deep: #f4f2ed;
  --ink: #2f312e;
  --muted: #6e716b;
  --line: #ddddd6;
  --moss: #666b63;
  --moss-deep: #414640;
  --clay: #867968;
  --hero-dark: #70766c;
  --hero-mid: #abb0a5;
  --hero-light: #e5e4da;
  --hero-glow: rgba(251, 250, 241, .8);
  --hero-shade: rgba(37, 43, 37, .24);
  --hero-orb: rgba(90, 98, 87, .25);
  --shadow: 0 18px 48px rgba(39, 51, 43, 0.08);
  --chinese-font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans GB", sans-serif;
  --english-font: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(255,255,255,.7), transparent 20rem),
    var(--paper);
  font-family: var(--chinese-font);
  font-size: 16px;
  line-height: 1.65;
}

button, a { font: inherit; }
button { cursor: pointer; }
.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

.hero {
  position: relative;
  height: clamp(180px, 27vw, 310px);
  overflow: hidden;
  background: center 30% / cover no-repeat url("public/media/half-a-tree-canyon-hero.png");
}

.identity { padding: 21px 0 11px; }
.eyebrow, .result-kicker {
  margin: 0 0 5px;
  color: var(--moss);
  font: 600 11px/1.2 var(--english-font);
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-size: clamp(31px, 4.2vw, 52px);
  font-weight: 500;
  letter-spacing: .035em;
  line-height: 1.16;
}
.site-title { color: inherit; text-decoration: none; }
.site-title:hover { color: var(--moss); }
h1 span { color: #a6a394; font-weight: 300; }
h1 em { font-family: var(--english-font); font-weight: 500; letter-spacing: .01em; }
.motto { margin: 6px 0 10px; color: var(--moss-deep); font: italic 18px/1.28 var(--english-font); letter-spacing: .01em; }

.nav-shell { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.site-nav { display: flex; align-items: stretch; min-height: 54px; }
.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px 0 0;
  border-right: 1px solid var(--line);
  color: var(--moss-deep);
  font: 600 13px/1 var(--english-font);
  letter-spacing: .08em;
  text-decoration: none;
}
.rss-link svg { width: 17px; fill: var(--clay); stroke: var(--clay); stroke-width: 2.2; }
.nav-pages { display: flex; align-items: stretch; }
.nav-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 25px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  transition: color .2s, border-color .2s, background .2s;
}
.nav-link span { font-family: var(--english-font); font-size: .92em; letter-spacing: .02em; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); border-bottom-color: var(--moss); background: rgba(85,112,96,.055); }

.content-layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: clamp(38px, 7vw, 92px); padding: 25px 0 48px; }
.sidebar { border-right: 1px solid var(--line); padding-right: 29px; }
.sidebar-section + .sidebar-section { margin-top: 42px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 7px; }
.section-heading p { margin: 0; color: var(--moss-deep); font: 600 16px/1 var(--english-font); letter-spacing: .05em; }
.section-heading span { color: var(--muted); font-size: 12px; }
.topic-list, .archive-list { display: grid; gap: 3px; }
.filter-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  border: 0;
  padding: 5px 8px;
  color: #586158;
  background: transparent;
  text-align: left;
  font-size: 14px;
  transition: background .16s, color .16s;
}
.filter-link:hover, .filter-link.is-selected { color: var(--moss-deep); background: rgba(85,112,96,.1); }
.filter-link .count { color: #9b9b8f; font: 12px/1 var(--english-font); }
.archive-year { margin: 10px 0 1px 8px; color: var(--clay); font: 600 13px/1 var(--english-font); letter-spacing: .1em; }
.sidebar-empty { margin: 7px 8px; color: #989b92; font-size: 13px; }

.reading-area { min-width: 0; }
.result-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.result-heading h2 { margin: 0; font-size: clamp(27px, 3vw, 36px); font-weight: 500; line-height: 1.25; }
.clear-filter { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--muted); background: transparent; font-size: 12px; }
.clear-filter:hover { border-color: var(--moss); color: var(--moss-deep); }
.post-list { display: grid; }
.post-card { position: relative; padding: 24px 0 25px; border-bottom: 1px solid var(--line); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.post-section { color: var(--clay); font: 600 12px/1 var(--english-font); letter-spacing: .1em; text-transform: uppercase; }
.post-card h3 { margin: 0 0 6px; font-size: 24px; font-weight: 500; line-height: 1.32; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a:hover { color: var(--moss); }
.excerpt { max-width: 680px; margin: 0; color: #5e665d; font-size: 15px; line-height: 1.65; }
.post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.post-tag { border: 0; padding: 0; color: var(--moss); background: transparent; font: 13px/1 var(--english-font); }
.post-tag:hover { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }
.empty-state { padding: 38px 0; color: var(--muted); text-align: center; }
.site-footer { display: flex; justify-content: space-between; padding: 20px 0 26px; border-top: 1px solid var(--line); color: #7f857d; font-size: 12px; }
.site-footer p { margin: 0; }
.site-footer p:last-child { font-family: var(--english-font); letter-spacing: .08em; }

.article-shell { width: min(780px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 60px; }
.article-back { display: inline-block; margin-bottom: 24px; color: var(--moss); font: 600 14px/1 var(--english-font); letter-spacing: .06em; text-decoration: none; }
.article-back:hover { color: var(--clay); }
.article-header { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.article-meta .post-section { color: var(--clay); }
.article-title { margin: 0; font-size: clamp(31px, 4vw, 46px); font-weight: 500; line-height: 1.25; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.article-tags span { color: var(--moss); font: 14px/1 var(--english-font); }
.article-body { padding-top: 30px; color: #383c37; font-size: 17px; line-height: 1.78; }
.article-body p { margin-bottom: 1.25em; }
.article-image { margin: 1.8em 0; }
.article-image img { display: block; width: 100%; height: auto; border-radius: 10px; }
.article-body blockquote { margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--clay); color: #555d54; }
.article-share { margin-top: 30px; padding: 18px 0 5px; border-top: 1px solid var(--line); }
.share-label { margin: 0 0 10px; color: var(--moss); font: 600 11px/1 var(--english-font); letter-spacing: .16em; }
.share-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.share-button { display: inline-flex; align-items: center; min-height: 32px; box-sizing: border-box; border: 1px solid var(--line); padding: 6px 10px; color: var(--moss-deep); background: transparent; font: 600 12px/1 var(--english-font); letter-spacing: .035em; text-decoration: none; transition: color .16s, border-color .16s, background .16s; }
.share-button:hover { border-color: var(--moss); color: var(--ink); background: rgba(85,112,96,.07); }
.share-button.is-primary { border-color: var(--moss-deep); color: #fff; background: var(--moss-deep); }
.share-button.is-primary:hover { color: #fff; background: var(--moss); }
.share-status { min-height: 1.4em; margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.moments-poster-dialog { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 22px; }
.moments-poster-backdrop { position: absolute; inset: 0; background: rgba(21, 27, 23, .58); }
.moments-poster-panel { position: relative; z-index: 1; width: min(100%, 430px); max-height: calc(100vh - 44px); overflow: auto; box-sizing: border-box; padding: 20px; background: var(--paper); box-shadow: 0 20px 70px rgba(0,0,0,.28); }
.moments-poster-panel .share-label { padding-right: 30px; }
.moments-poster-panel img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.moments-poster-panel > p:not(.share-label) { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.moments-poster-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.moments-poster-status { min-height: 1.5em; margin: 10px 0 0 !important; color: var(--muted); font-size: 12px !important; }
.moments-poster-close { position: absolute; top: 10px; right: 12px; border: 0; padding: 3px 7px; color: var(--muted); background: transparent; font-size: 26px; line-height: 1; cursor: pointer; }

.card-page { min-height: 100vh; display: grid; place-items: center; background: #e9e7df; }
.share-card-shell { width: min(100% - 34px, 660px); padding: 28px 0; }
.share-card { overflow: hidden; border: 1px solid var(--line); padding: clamp(26px, 6vw, 46px); background: var(--paper); box-shadow: 0 18px 50px rgba(47, 49, 43, .1); }
.share-card h1 { margin-bottom: 8px; font-size: clamp(31px, 7vw, 52px); }
.share-card h1 span { color: #a6a394; font-weight: 300; }
.share-card h1 em { font-family: var(--english-font); font-weight: 500; letter-spacing: .01em; }
.share-card-notes { margin: 0 0 22px; color: var(--moss-deep); font: italic 18px/1.25 var(--english-font); }
.share-card-landscape { height: clamp(145px, 31vw, 220px); background: center 52% / cover no-repeat url("public/media/half-a-tree-canyon-hero.png"); }
.share-card-motto { margin: 18px 0 24px; color: #525850; font: italic 16px/1.5 var(--english-font); }
.share-card-access { display: flex; align-items: center; gap: 20px; padding-top: 19px; border-top: 1px solid var(--line); }
.share-qr { width: 116px; height: 116px; padding: 5px; background: #fff; }
.share-card-url { margin: 0 0 12px; color: var(--ink); font: 600 13px/1.4 var(--english-font); letter-spacing: .02em; }
.share-card-button { display: inline-flex; border: 1px solid var(--moss); padding: 8px 13px; color: #fff; background: var(--moss-deep); font-size: 13px; text-decoration: none; }
.share-card-button:hover { background: var(--moss); }
.share-card-hint { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.site-card-section { grid-column: 1 / -1; margin-top: 30px; }
.site-card-download { display: flex; width: 100%; align-items: center; gap: 11px; border: 1px solid var(--line); padding: 9px; color: inherit; background: rgba(255,255,255,.32); font: inherit; text-align: left; transition: border-color .16s, background .16s; cursor: pointer; }
.site-card-download:hover { border-color: var(--moss); background: rgba(85,112,96,.07); }
.site-card-download:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }
.site-card-download img { width: 58px; height: 58px; padding: 2px; background: #fff; }
.site-card-copy { display: grid; gap: 2px; min-width: 0; }
.site-card-copy strong { color: var(--moss-deep); font-size: 14px; font-weight: 600; }
.site-card-copy em { color: var(--muted); font: italic 13px/1 var(--english-font); }
.site-card-copy small { color: #868b84; font-size: 11px; }


@media (max-width: 720px) {
  .wrap { width: min(100% - 34px, 1120px); }
  .identity { padding-top: 18px; }
  .site-nav { min-height: 49px; overflow-x: auto; }
  .rss-link { padding-right: 15px; }
  .rss-link span { display: none; }
  .nav-link { padding: 0 14px; white-space: nowrap; font-size: 13px; }
  .content-layout { display: flex; flex-direction: column; padding-top: 22px; }
  .sidebar { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-right: 0; padding: 30px 0 0; border-top: 1px solid var(--line); }
  .sidebar-section + .sidebar-section { margin-top: 0; }
  .archives-section { min-width: 0; }
  .filter-link { padding-left: 2px; }
  .reading-area { order: 1; padding-top: 0; }
  .post-card h3 { font-size: 21px; }
  .site-footer { gap: 18px; }
  .article-shell { width: min(100% - 34px, 780px); padding-top: 34px; }
  .article-body { font-size: 16px; }
  .share-card-access { gap: 16px; }
}

@media (max-width: 430px) {
  .sidebar { grid-template-columns: 1fr; }
  .archives-section { display: none; }
  h1 { font-size: 31px; }
  h1 em { display: block; margin-top: 3px; }
}
