/* ==========================================================================
   归云集 · 宣纸墨色主题
   纸为底，墨为字，朱砂为记。
   ========================================================================== */

/* ── 1. 设计变量 ───────────────────────────────────────────────────────── */
:root {
  /* 纸 */
  --paper: #f5f0e5;
  --paper-2: #efe8da;
  --paper-3: #fbf7ed;

  /* 墨 */
  --ink: #191815;
  --ink-2: #4c473d;
  --ink-3: #8b8371;
  --ink-body: #2e2b24;

  /* 线 */
  --rule: #ded5c2;
  --rule-2: #e2dac9;
  --rule-strong: #d5cbb8;

  /* 朱砂 */
  --cinnabar: #a63328;
  --cinnabar-deep: #7c231c;
  --cinnabar-soft: #c1685a;
  --cream: #f7f1e4;

  /* 深底 */
  --ink-bg: #1a1917;
  --ink-bg-2: #201f1b;
  --ink-line: #2e2c26;

  /* 辅助色（备而少用） */
  --dai: #2e4048;
  --bamboo: #6f8065;
  --bronze: #9a7b4f;

  /* 字体 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --kai: "LXGW WenKai TC", "LXGW WenKai", "Kaiti SC", "KaiTi", "楷体", "STKaiti", "Noto Serif SC", serif;
  --display: "ZCOOL XiaoWei", "Noto Serif SC", "Songti SC", serif;

  /* 尺度 */
  --content: 1200px;
  --gutter: 120px;
  --radius: 2px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── 2. 基础 ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  transition: color 0.35s var(--ease);
}

::selection {
  background: rgba(166, 51, 40, 0.16);
}

.container {
  width: min(var(--content), calc(100% - var(--gutter) * 2));
  margin: 0 auto;
}

/* ── 3. 通用件 ────────────────────────────────────────────────────────── */
.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}

.eyebrow-rule {
  width: 30px;
  height: 1px;
  background: var(--cinnabar);
  flex: none;
}

.sec-label {
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--cinnabar);
}

.sec-title {
  margin: 12px 0 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}

.sec-aside {
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.sec-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.14em;
}

.sec-link:hover,
.text-link:hover {
  color: var(--cinnabar);
}

.text-link {
  font-size: 12px;
  color: var(--cinnabar);
  letter-spacing: 0.2em;
}

.sec-link svg,
.text-link svg,
.btn svg {
  width: 14px;
  height: 9px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section {
  padding: 84px 0;
}

.section--alt {
  background: var(--paper-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-decoration: none;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.btn--primary {
  background: var(--cinnabar);
  color: var(--cream);
}

.btn--primary:hover {
  background: var(--cinnabar-deep);
  color: var(--cream);
}

.btn--ghost {
  border-color: rgba(25, 24, 21, 0.25);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn-outline {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid rgba(25, 24, 21, 0.3);
  border-radius: var(--radius);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
}

/* ── 4. 顶栏 ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header.scrolled {
  background: rgba(245, 240, 229, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex: none;
}

.logo-seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: var(--cream);
  font-size: 25px;
  font-weight: 600;
  border-radius: 3px;
  flex: none;
}

.logo-textwrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.logo-text {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--ink);
  line-height: 1.2;
}

.logo-sub {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  line-height: 1;
}

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

.nav-link {
  position: relative;
  padding: 4px 0;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--ink);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.header-actions .sep {
  width: 1px;
  height: 16px;
  background: var(--rule);
}

.icon-link {
  display: grid;
  place-items: center;
  color: var(--ink-2);
}

.icon-link:hover {
  color: var(--cinnabar);
}

.icon-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
}

.subscribe {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  text-decoration: none;
}

.subscribe:hover {
  color: var(--cinnabar);
}

.header-toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: flex-end;
}

.header-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.header-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header-toggle.active span:nth-child(2) {
  opacity: 0;
}

.header-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── 5. 卷首 ──────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 588px) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  padding: 56px 0 64px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: 92px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.13em;
  color: var(--ink);
}

.hero-sub {
  margin: 0;
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.34em;
  color: var(--ink-2);
}

.hero-rule {
  width: 56px;
  height: 2px;
  background: var(--cinnabar);
}

.hero-lead {
  margin: 0;
  max-width: 452px;
  font-size: 15px;
  line-height: 2.06;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.hero-stats {
  margin: 6px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.hero-side {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  justify-self: end;
  min-width: 0;
}

.mount {
  position: relative;
  padding: 16px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: 1px;
  flex: none;
}

.mount-frame {
  border: 1px solid #cfc5b0;
  background: var(--paper-2);
  overflow: hidden;
}

.mount img {
  display: block;
  width: 420px;
  height: 528px;
  max-width: 100%;
  object-fit: cover;
}

.mount-seal {
  position: absolute;
  right: 26px;
  bottom: 26px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: var(--cream);
  font-size: 18px;
  border-radius: 2px;
}

/* ── 6. 卷目 ──────────────────────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
}

.cat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.cat-seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cinnabar);
  border-radius: var(--radius);
  color: var(--cinnabar);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.cat-block:hover .cat-seal {
  background: var(--cinnabar);
  color: var(--cream);
}

.cat-name {
  font-size: 17px;
  letter-spacing: 0.12em;
}

.cat-count {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* ── 7. 精选（深墨段） ────────────────────────────────────────────────── */
.featured {
  background: var(--ink-bg-2);
  color: #f3eddf;
  padding: 72px 0 80px;
}

.featured .sec-title {
  color: #f3eddf;
}

.featured .sec-label {
  color: var(--cinnabar-soft);
}

.featured .sec-aside {
  color: #8b8371;
}

.featured .sec-link {
  color: #a29a88;
}

.featured .sec-link:hover {
  color: var(--cream);
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feat-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-decoration: none;
  color: inherit;
}

.feat-thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #3b382f;
  border-radius: 1px;
}

.feat-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.02);
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
}

/* 统一不同来源图片的调性，使其落回纸墨色系 */
.feat-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(32, 31, 27, 0.12);
  pointer-events: none;
}

.feat-card:hover .feat-thumb img {
  transform: scale(1.03);
  filter: saturate(1) contrast(1.02);
}

.feat-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #8b8371;
}

.feat-meta .cat {
  color: var(--cinnabar-soft);
}

.feat-meta .dot {
  width: 10px;
  height: 1px;
  background: #4a463c;
  flex: none;
}

.feat-title {
  margin: -4px 0 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: #f3eddf;
}

.feat-card:hover .feat-title {
  color: #fffaf0;
}

.feat-excerpt {
  margin: -4px 0 0;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: #a29a88;
}

/* ── 7.5 今日 · 一字与黄历 ───────────────────────────────────────────── */
.today-section {
  padding: 52px 0 60px;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

/* 今日一字：一张字课 */
.zi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 36px 32px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: 1px;
}

.zi-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.zi-head .widget-title {
  margin: 0;
  padding: 0;
  border: 0;
}

.zi-py {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--cinnabar);
}

.zi-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 44px;
}

/* 田字格：把字请进帖里 */
.zi-plate {
  position: relative;
  flex: 0 0 186px;
  width: 186px;
  height: 186px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--rule-2), var(--rule-2)),
    linear-gradient(var(--rule-2), var(--rule-2));
  background-size: 1px calc(100% - 26px), calc(100% - 26px) 1px;
  background-position: center center;
  background-repeat: no-repeat;
}

.zi-char {
  font-family: var(--kai);
  font-size: 116px;
  line-height: 1;
  color: var(--ink);
}

.zi-notes {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.zi-line {
  display: flex;
  gap: 16px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-body);
}

.zi-line i {
  flex: 0 0 auto;
  padding-top: 5px;
  font-style: normal;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.zi-quote {
  margin: 8px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  font-family: var(--kai);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}

.zi-from {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--cinnabar);
}

.almanac-widget {
  display: flex;
  flex-direction: column;
  padding: 24px 26px 22px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: 1px;
}

.almanac-widget .widget-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.almanac-widget .widget-title {
  margin: 0;
  padding: 0;
  border: 0;
}

.almanac-week {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.almanac-date {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 16px 0 12px;
}

.almanac-date span {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.almanac-date b {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--cinnabar);
}

.almanac-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule-2);
}

.almanac-grid > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-2);
  min-width: 0;
}

.almanac-grid > div:nth-child(odd) {
  padding-right: 12px;
}

.almanac-grid > div:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--rule-2);
}

.almanac-grid i {
  font-style: normal;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  flex: none;
}

.almanac-grid span {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.almanac-yiji {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.almanac-yiji h4 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
}

.almanac-yiji .yi h4 {
  color: var(--cinnabar);
}

.almanac-yiji .ji h4 {
  color: var(--dai);
}

.almanac-yiji p {
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.almanac-pos {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-2);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.almanac-fallback {
  margin: 0;
  padding: 6px 0;
  font-size: 12px;
  text-align: center;
  color: var(--ink-3);
}

/* ── 8. 岁时 ──────────────────────────────────────────────────────────── */
.solar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px 16px;
}

.solar-divider {
  display: none;
}

.solar-item {
  padding: 4px 0;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.35s var(--ease);
}

a.solar-item:hover {
  color: var(--cinnabar);
}

.solar-item.is-now {
  color: var(--cinnabar);
  font-weight: 600;
}

/* ── 9. 笔墨 ──────────────────────────────────────────────────────────── */
.stream-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 80px;
}

.stream-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.stream-desc {
  margin: 0;
  max-width: 220px;
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.stream-list {
  display: flex;
  flex-direction: column;
}

.stream-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 68px;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-2);
  text-decoration: none;
  color: inherit;
}

.stream-row:first-child {
  border-top: 1px solid var(--rule-2);
}

.stream-date {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.stream-title {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.09em;
  transition: color 0.35s var(--ease);
}

.stream-row:hover .stream-title {
  color: var(--cinnabar);
}

.stream-cat {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-align: right;
}

/* ── 10. 卷尾 ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink-bg);
  color: #ede6d6;
  padding: 56px 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-seal {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: var(--cream);
  font-size: 20px;
  font-weight: 600;
  border-radius: 2px;
  flex: none;
}

.footer-name {
  font-size: 18px;
  letter-spacing: 0.24em;
  color: #ede6d6;
}

.footer-desc {
  margin: 0;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.03em;
  color: #8b8371;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 76px;
  justify-content: end;
}

.footer-heading {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--cinnabar-soft);
}

.footer-links-inline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #a29a88;
  text-decoration: none;
}

.footer-link:hover {
  color: #ede6d6;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--ink-line);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #6e675a;
}

/* ── 11. 列表页 / 分类页 ──────────────────────────────────────────────── */
.page-head {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--rule);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--cinnabar);
}

.breadcrumb .sep {
  color: var(--rule-strong);
}

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: 22px;
}

.page-title {
  margin: 12px 0 0;
  font-size: 54px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.18em;
}

.page-desc {
  margin: 14px 0 0;
  max-width: 560px;
  font-size: 14px;
  font-weight: 300;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.page-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  white-space: nowrap;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px 0;
}

.chip {
  padding: 9px 20px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.chip:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}

.chip.is-active {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: var(--cream);
}

.chip.is-active:hover {
  color: var(--cream);
}

.term-grid {
  padding: 40px 0 84px;
}

.term-grid .cat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
}

.term-cloud {
  padding: 34px 0 84px;
  gap: 12px;
}

.chip-n {
  margin-left: 8px;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--ink-3);
}

.archive {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
  padding-bottom: 24px;
}

.archive-item {
  display: block;
  padding-top: 22px;
  border-top: 1px solid var(--rule-strong);
  text-decoration: none;
  color: inherit;
}

.archive-index {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.archive-index .dot {
  color: var(--rule-strong);
}

.archive-title {
  margin: 14px 0 10px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  transition: color 0.35s var(--ease);
}

.archive-item:hover .archive-title {
  color: var(--cinnabar);
}

.archive-excerpt {
  margin: 0;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.95;
  color: var(--ink-2);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 56px 0 76px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.page-link {
  color: var(--ink-2);
  text-decoration: none;
}

.page-link:hover {
  color: var(--cinnabar);
}

.page-current {
  color: var(--cinnabar);
  font-weight: 500;
}

/* ── 12. 文章页 ───────────────────────────────────────────────────────── */
.article-head {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.article-head .breadcrumb {
  justify-content: center;
}

.article-cats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}

.article-cats::before,
.article-cats::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--cinnabar);
  flex: none;
}

.article-cat {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--cinnabar);
  text-decoration: none;
}

.article-title {
  margin: 20px auto 0;
  max-width: 820px;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.48;
  letter-spacing: 0.07em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.article-meta .meta-dot {
  color: var(--rule-strong);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 740px) 236px;
  gap: 72px;
  justify-content: center;
  padding: 48px 0 72px;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-cover {
  margin: 0 0 34px;
}

.article-cover img {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
}

/* 正文 */
.prose {
  font-size: 16px;
  line-height: 2.12;
  letter-spacing: 0.05em;
  color: var(--ink-body);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 26px;
}

.prose h2 {
  position: relative;
  margin: 46px 0 22px;
  padding-top: 26px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.prose h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--cinnabar);
}

.prose h3 {
  margin: 34px 0 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.prose h4 {
  margin: 28px 0 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.prose blockquote {
  margin: 32px 0;
  padding: 24px 32px 18px;
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
  font-family: var(--kai);
  font-size: 17px;
  line-height: 2;
  letter-spacing: 0.08em;
  color: #3a362d;
}

.prose blockquote p {
  margin: 0 0 10px;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 32px auto;
  padding: 16px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
}

.prose a {
  color: var(--cinnabar);
  text-decoration: none;
  border-bottom: 1px solid rgba(166, 51, 40, 0.3);
}

.prose a:hover {
  border-bottom-color: var(--cinnabar);
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

.prose em {
  font-style: normal;
  color: var(--cinnabar-deep);
}

.prose ul,
.prose ol {
  margin: 0 0 26px;
  padding-left: 1.4em;
}

.prose li {
  margin: 10px 0;
}

.prose li::marker {
  color: var(--cinnabar-soft);
}

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

.prose code {
  padding: 2px 6px;
  background: var(--paper-2);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.88em;
  letter-spacing: 0;
}

.prose pre {
  margin: 0 0 26px;
  padding: 20px 24px;
  background: var(--ink-bg-2);
  color: #e8e1d2;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.8;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.prose table {
  width: 100%;
  margin: 0 0 26px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.8;
}

.prose th,
.prose td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.prose th {
  border-bottom-color: var(--rule-strong);
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* 标签 / 翻页 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.tags-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}

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

.tag {
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  text-decoration: none;
}

.tag:hover {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.nav-prev,
.nav-next {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.nav-next {
  align-items: flex-end;
  text-align: right;
}

.nav-dir {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}

.nav-title {
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.06em;
}

.nav-prev:hover .nav-title,
.nav-next:hover .nav-title {
  color: var(--cinnabar);
}

/* 侧栏 */
.article-side {
  position: sticky;
  top: 124px;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding-top: 6px;
  min-width: 0;
}

.widget-title {
  margin: 0 0 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.26em;
  color: var(--ink-3);
}

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

.toc-body ul ul {
  padding-left: 12px;
}

.toc-body li {
  margin: 0;
}

.toc-body a {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
}

.toc-body a:hover {
  color: var(--cinnabar);
}

.widget-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.widget-link {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
}

.widget-link:hover {
  color: var(--cinnabar);
}

.widget-empty {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
}

/* ── 13. 404 ──────────────────────────────────────────────────────────── */
.error-page {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding: 60px 0;
}

.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.error-seal {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cinnabar);
  border-radius: var(--radius);
  color: var(--cinnabar);
  font-size: 24px;
}

.error-title {
  margin: 0;
  font-family: var(--display);
  font-size: 64px;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1;
}

.error-line {
  width: 56px;
  height: 2px;
  background: var(--cinnabar);
  margin: 6px 0 4px;
}

.error-text {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.16em;
}

.error-sub {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* ── 14. 返回顶部 ─────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-3);
  color: var(--ink-2);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.35s var(--ease), border-color 0.35s var(--ease);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ── 15. 响应式 ───────────────────────────────────────────────────────── */
@media (min-width: 1081px) {
  .solar-divider {
    display: block;
    grid-column: 1 / -1;
    height: 1px;
    background: var(--rule);
    margin: 10px 0;
  }
}

@media (max-width: 1240px) {
  :root {
    --gutter: 72px;
  }

  .hero {
    gap: 40px;
  }

  .mount img {
    width: 360px;
    height: 452px;
  }

  .stream-wrap {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 56px;
  }
}

@media (max-width: 1080px) {
  :root {
    --gutter: 48px;
  }

  .header-inner {
    height: 76px;
  }

  .header-toggle {
    display: flex;
  }

  .header-actions {
    margin-left: auto;
    margin-right: 18px;
  }

  .header-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
      visibility 0.3s;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }

  .header-nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    padding: 14px var(--gutter);
    border-bottom: 1px solid var(--rule-2);
    font-size: 16px;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link.active {
    color: var(--cinnabar);
  }

  /* 今日双栏改为上下 */
  .today-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 卷首改为上下结构 */
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding: 32px 0 56px;
  }

  .hero-side {
    justify-self: start;
    align-items: flex-end;
    gap: 18px;
  }

  .mount img {
    width: min(420px, 78vw);
    height: auto;
    aspect-ratio: 420 / 528;
  }

  .cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .term-grid .cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .feat-grid .feat-card:last-child:nth-child(odd) {
    display: none;
  }

  .solar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .stream-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .stream-desc {
    max-width: none;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    justify-content: start;
  }

  .archive {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding: 40px 0 64px;
  }

  .article-side {
    position: static;
    order: 2;
    padding-top: 0;
  }

  .page-title {
    font-size: 44px;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
  }

  body {
    font-size: 15px;
    line-height: 1.95;
  }

  .section {
    padding: 56px 0;
  }

  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 32px;
  }

  .sec-title {
    font-size: 26px;
    letter-spacing: 0.16em;
  }

  .sec-aside {
    flex-wrap: wrap;
    gap: 10px 14px;
    white-space: normal;
  }

  .hero {
    padding: 20px 0 44px;
    gap: 34px;
  }

  .hero-title {
    font-size: clamp(46px, 14vw, 66px);
    letter-spacing: 0.1em;
  }

  .hero-sub {
    font-size: 15px;
    letter-spacing: 0.24em;
  }

  .hero-lead {
    font-size: 14px;
    line-height: 2;
  }

  .hero-side {
    gap: 14px;
    align-items: flex-start;
  }

  .mount {
    padding: 10px;
  }

  .mount-seal {
    right: 18px;
    bottom: 18px;
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .today-section {
    padding: 36px 0 44px;
  }

  .zi-card {
    padding: 22px 22px 26px;
  }

  .zi-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .zi-plate {
    flex: 0 0 132px;
    width: 132px;
    height: 132px;
  }

  .zi-char {
    font-size: 78px;
  }

  .zi-line {
    font-size: 13px;
  }

  .almanac-widget {
    padding: 20px;
  }

  .almanac-date b {
    font-size: 38px;
  }

  .almanac-yiji p {
    max-height: none;
  }

  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
  }

  .term-grid {
    padding: 28px 0 56px;
  }

  .term-grid .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
  }

  .cat-seal {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .cat-name {
    font-size: 15px;
  }

  .feat-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .feat-grid .feat-card:last-child:nth-child(odd) {
    display: flex;
  }

  .feat-title {
    font-size: 18px;
  }

  .featured {
    padding: 52px 0 58px;
  }

  .solar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 6px;
  }

  .solar-item {
    font-size: 14px;
    letter-spacing: 0.06em;
  }

  .stream-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 16px 0;
  }

  .stream-date {
    grid-column: 1 / -1;
    order: -1;
    font-size: 10px;
  }

  .stream-title {
    font-size: 15px;
  }

  .stream-cat {
    font-size: 10px;
    align-self: end;
  }

  .site-footer {
    padding: 44px 0 28px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 30px;
  }

  .page-head {
    padding: 26px 0 24px;
  }

  .page-head-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 18px;
  }

  .page-title {
    font-size: 34px;
    letter-spacing: 0.14em;
  }

  .page-desc {
    font-size: 13px;
  }

  .page-meta {
    flex-direction: row;
    gap: 16px;
    align-items: center;
  }

  .chips {
    padding: 22px 0;
    gap: 8px;
  }

  .chip {
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .archive {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .archive-title {
    font-size: 18px;
  }

  .pagination {
    padding: 40px 0 56px;
    gap: 16px;
  }

  .article-head {
    padding: 28px 0 26px;
  }

  .article-cats {
    margin-top: 16px;
  }

  .article-title {
    font-size: 26px;
    letter-spacing: 0.05em;
    line-height: 1.5;
    margin-top: 14px;
  }

  .article-meta {
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.14em;
    margin-top: 14px;
  }

  .article-layout {
    padding: 30px 0 52px;
    gap: 36px;
  }

  .prose {
    font-size: 15.5px;
    line-height: 2;
    letter-spacing: 0.03em;
  }

  .prose h2 {
    font-size: 19px;
    margin: 38px 0 18px;
    padding-top: 22px;
  }

  .prose blockquote {
    padding: 20px 20px 14px;
    font-size: 16px;
    margin: 26px 0;
  }

  .prose img {
    padding: 10px;
    margin: 26px auto;
  }

  .article-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 34px;
  }

  .nav-next {
    align-items: flex-start;
    text-align: left;
    padding-top: 18px;
    border-top: 1px solid var(--rule-2);
  }

  .article-tags {
    margin-top: 34px;
  }

  .error-title {
    font-size: 52px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 420px) {
  .solar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-title {
    font-size: 44px;
  }

  .logo-sub {
    display: none;
  }

  .header-actions .subscribe {
    display: none;
  }

  .header-actions .sep {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
