:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f6f8fc;
  --ink: #111111;
  --muted: #5f6675;
  --accent: #d1583c;
  --accent-2: #1c6b6a;
  --line: rgba(17, 17, 17, 0.1);
  --shadow: 0 16px 36px rgba(17, 17, 17, 0.09);
  --radius: 18px;
  --header-height: 92px;
}

[data-theme='dark'] {
  --bg: #12100d;
  --surface: #1c1813;
  --surface-muted: #211c16;
  --ink: #f5eee5;
  --muted: #b8ac9d;
  --accent: #e0895f;
  --accent-2: #7fc2b6;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height);
}

.site-loading .hero-text {
  visibility: hidden;
}

main,
header,
footer {
  position: relative;
  z-index: 2;
}

main {
  flex: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 6vw;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  z-index: 60;
}

[data-theme='dark'] .site-header {
  background: rgba(19, 16, 13, 0.8);
}

.logo {
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
  font-size: 23px;
  letter-spacing: 0.8px;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

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

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a.active,
.nav a:hover {
  color: var(--ink);
  background: rgba(209, 88, 60, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.mobile-search-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.mobile-menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.search-box {
  position: relative;
}

.search-input {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 999px;
  min-width: 220px;
  color: var(--ink);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(420px, 90vw);
  min-width: 100%;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 6px;
  display: none;
  z-index: 7;
  max-height: 320px;
  overflow: auto;
}

.search-results.active {
  display: block;
}

.search-item {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
}

.search-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

.search-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.theme-toggle.spin {
  transform: rotate(220deg);
}

.theme-icon {
  font-size: 17px;
  line-height: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 48px 8vw 24px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--accent-2);
}

.hero h1 {
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
  font-size: clamp(34px, 4vw, 62px);
  margin: 12px 0;
}

.subtitle {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 760px;
}

.hero-cta {
  margin-top: 22px;
  display: flex;
  gap: 12px;
}

.btn {
  background: var(--accent);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
}

.latest {
  padding: 28px 8vw 80px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.section-title h2,
.section-title h1 {
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
  margin: 0;
}

.filters {
  display: flex;
  gap: 10px;
}

select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 280px;
  height: 100%;
}

.post-card .image {
  width: 100%;
  height: 200px;
  min-height: 200px;
  background-size: cover;
  background-position: center;
}

.lazy-bg {
  background-color: var(--surface-muted);
}

.post-card .content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-card h3 {
  margin: 0;
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
  font-size: 23px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card small {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-height: 28px;
  overflow: hidden;
}

.post-grid.list-mode {
  grid-template-columns: repeat(var(--list-cols, 3), minmax(0, 1fr));
}

.latest .post-grid {
  grid-template-columns: repeat(var(--home-cols, 3), minmax(0, 1fr));
  gap: 20px;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(209, 88, 60, 0.12);
  color: var(--accent);
  font-size: 12px;
}

.issue-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 107, 106, 0.12);
  color: var(--accent-2);
  font-size: 12px;
  margin-left: 6px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  min-height: 30px;
  align-content: flex-start;
}

.post-card .tag-row {
  margin-top: auto;
}

#latest #postGrid.post-grid {
  grid-template-columns: repeat(var(--home-cols, 3), minmax(0, 1fr));
}

.list-page #postGrid.post-grid.list-mode {
  grid-template-columns: repeat(var(--list-cols, 3), minmax(0, 1fr));
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 107, 106, 0.12);
  color: var(--accent-2);
}

.post-page {
  padding: 40px 4vw 80px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  max-width: 1460px;
  margin: 0 auto;
}

.progress {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 65;
}

.post-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  margin: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 4px;
}

.post-meta .pill,
.post-meta .issue-pill,
#postDate,
#postTags .tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
}

#postDate {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

#postTags.tag-row {
  margin-top: 0;
}

.post-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.post-hero h1 {
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
  font-size: clamp(30px, 4vw, 50px);
  margin: 0;
}

.post-excerpt {
  font-size: 17px;
  color: var(--muted);
  margin: 0;
}

.post-cover {
  height: 340px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}

.post-body {
  margin-top: 28px;
  line-height: 1.9;
  font-size: 17px;
}

.post-body h2,
.post-body h3 {
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
}

.post-audio {
  margin: 22px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.post-audio-title {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.post-audio audio {
  width: 100%;
}

.post-audio figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.more {
  margin-top: 0;
  position: sticky;
  top: calc(var(--header-height) + 18px);
  align-self: start;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  max-height: calc(100vh - var(--header-height) - 30px);
  overflow: hidden;
}

.more h2 {
  margin: 4px 0 14px;
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
  font-size: 26px;
}

.more-list {
  display: grid;
  gap: 10px;
  counter-reset: reading;
  max-height: calc(100vh - var(--header-height) - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.more-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.more-item::after {
  counter-increment: reading;
  content: counter(reading, decimal-leading-zero);
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.more-item:hover {
  border-color: rgba(209, 88, 60, 0.38);
}

.more-thumb {
  background-size: cover;
  background-position: center;
  min-height: 68px;
  border-radius: 8px;
}

.more-info {
  padding-right: 26px;
}

.more-info h3 {
  margin: 5px 0;
  font-size: 16px;
  line-height: 1.35;
}

.more-info small {
  margin-left: 8px;
  font-size: 11px;
  color: var(--muted);
}

.more-info p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-page {
  padding: 40px 8vw 80px;
}

.issues-page {
  padding: 40px 8vw 80px;
}

.issues-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.issue-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  align-self: start;
  align-content: start;
}

.issue-cover {
  height: 220px;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}

.issue-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 30%, rgba(0, 0, 0, 0.25));
}

.issue-body {
  padding: 20px;
}

.issue-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.issue-body h2 {
  margin: 8px 0;
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
}

.issue-note {
  background: rgba(0, 0, 0, 0.04);
  padding: 12px;
  border-radius: 12px;
  margin: 12px 0;
  color: var(--muted);
}

.issue-count {
  font-size: 13px;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.issue-posts {
  display: grid;
  gap: 8px;
}

.issue-expand {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.issue-expand summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent-2);
  user-select: none;
}

.issue-expand summary::marker {
  color: var(--accent-2);
}

.issue-expand[open] summary {
  margin-bottom: 10px;
}

.issue-post {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.issue-post small {
  color: var(--muted);
}

.chip-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
}

.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.about {
  padding: 56px 8vw 100px;
}

.about-shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 38px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-kicker {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent-2);
  margin: 0 0 10px;
}

.about-main h1 {
  margin: 0;
}

.about-lead {
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
}

.about-detail {
  line-height: 1.85;
}

.about-side {
  background: linear-gradient(165deg, rgba(209, 88, 60, 0.08), rgba(28, 107, 106, 0.08));
}

.about-side h2 {
  margin: 0;
  font-family: 'Times New Roman', 'Noto Serif SC', 'Songti SC', serif;
}

.about-facts {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.about-fact {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
}

.about-fact .meta-value {
  margin-top: 4px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.about-mail {
  margin-top: 16px;
  display: inline-block;
  text-decoration: none;
  color: var(--accent-2);
  font-size: 14px;
}

.meta-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer {
  margin-top: auto;
  padding: 18px 8vw 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.latest,
.post-page,
.list-page,
.issues-page,
.about {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

@media (max-width: 1200px) {
  .post-grid.list-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-page #postGrid.post-grid.list-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .site-header {
    padding: 8px 3.5vw;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .logo {
    font-size: 19px;
    flex: 0 0 auto;
  }

  .nav {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    white-space: nowrap;
    font-size: 13px;
    padding: 6px 8px;
  }

  .header-actions {
    width: auto;
    margin-left: auto;
    flex: 0 0 auto;
  }

  .search-input {
    min-width: 170px;
    padding: 7px 11px;
    font-size: 13px;
  }

  .hero {
    padding-top: 30px;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .latest .post-card,
  .latest .post-card:first-child,
  .latest .post-card:nth-child(2),
  .latest .post-card:nth-child(3) {
    min-height: 0;
  }

  .latest .post-grid {
    grid-template-columns: 1fr;
  }

  #latest #postGrid.post-grid,
  #latest #postGrid.post-grid.list-mode {
    grid-template-columns: 1fr;
  }

  .post-grid.list-mode {
    grid-template-columns: 1fr;
  }

  .list-page #postGrid.post-grid.list-mode {
    grid-template-columns: 1fr;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .more {
    position: static;
    top: auto;
  }

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

@media (max-width: 600px) {
  .site-header {
    padding: 7px 3vw;
    gap: 6px;
  }

  .logo {
    font-size: 17px;
    flex: 0 1 auto;
    min-width: 0;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 3vw;
    left: 3vw;
    z-index: 79;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    gap: 4px;
  }

  .site-header.mobile-menu-open .nav {
    display: flex;
  }

  .nav a {
    font-size: 12px;
    padding: 9px 10px;
    border-radius: 8px;
  }

  .search-box {
    display: none;
  }

  .mobile-search-toggle {
    display: inline-flex;
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .mobile-theme-action {
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--ink);
    border-radius: 8px;
    width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    cursor: pointer;
  }

  .site-header.mobile-search-open .search-box {
    display: block;
    position: absolute;
    top: calc(100% + 6px);
    right: 3vw;
    left: 3vw;
    z-index: 80;
  }

  .site-header.mobile-search-open .search-input {
    width: 100%;
    min-width: 0;
    background: var(--surface);
  }

  .site-header.mobile-search-open .search-results {
    width: 100%;
    min-width: 0;
  }

  .theme-toggle {
    display: inline-flex;
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .hero h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .subtitle {
    font-size: 15px;
    line-height: 1.6;
  }

  .section-title h1,
  .section-title h2 {
    font-size: 28px;
  }

  .latest,
  .post-page,
  .list-page,
  .issues-page,
  .about {
    padding-left: 4vw;
    padding-right: 4vw;
  }

  .post-page {
    padding-left: 0;
    padding-right: 0;
  }

  .post-article {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    background: transparent;
    padding: 18px 5vw;
  }

  .post-cover {
    height: 240px;
  }

  .post-body {
    font-size: 17px;
  }

  .more {
    display: none;
  }

  .issues-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    padding: 22px;
  }
}
