:root {
  color-scheme: light;
  --bg: #fbf4e8;
  --bg-strong: #f2e5d3;
  --paper: #fffaf2;
  --paper-deep: #f7eddd;
  --ink: #241a13;
  --muted: #746350;
  --faint: #a39480;
  --line: #ded0bd;
  --line-strong: #b79370;
  --accent: #8f3323;
  --accent-deep: #6f241a;
  --gold: #b48a4f;
  --shadow: 0 18px 40px rgba(91, 61, 34, 0.12);
  --soft-shadow: 0 10px 28px rgba(91, 61, 34, 0.08);
  --radius: 8px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.9), rgba(255,255,255,0) 32%),
    linear-gradient(180deg, #fbf4e8 0%, #fff8ee 48%, #f8ecdc 100%);
  color: var(--ink);
}

body,
button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 44px 12px;
  background: rgba(251, 244, 232, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand img,
.footer-brand img {
  width: 40px;
  height: 40px;
}

.brand strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  white-space: nowrap;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

.site-nav a {
  position: relative;
  padding: 12px 0;
  color: #31261d;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--accent);
}

.site-nav a.active::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
}

.future-login {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(143, 51, 35, .42);
  border-radius: 8px;
  color: var(--accent-deep);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  opacity: .78;
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: -86px 0 0;
  background-image: url("./public-assets/hero-village.png");
  background-position: center top;
  background-size: cover;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(251,244,232,0), var(--bg));
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 44px 52px;
}

.hero-copy {
  max-width: 760px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 8vw, 120px);
  line-height: 1.05;
  letter-spacing: .03em;
  font-weight: 900;
  text-shadow: 0 3px 16px rgba(255, 250, 240, .7);
}

.hero-line {
  margin: 24px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
}

.hero-subline {
  margin: 0;
  color: #3f3328;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: .06em;
}

.access-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) 132px;
  gap: 12px;
  align-items: center;
  max-width: 920px;
  min-height: 74px;
  margin-top: 40px;
  padding: 14px;
  border: 1px solid rgba(143, 51, 35, .24);
  border-radius: 8px;
  background: rgba(255, 250, 242, .94);
  box-shadow: 0 18px 42px rgba(86, 57, 29, .12);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.access-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-deep);
  font-size: 16px;
}

.access-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.access-card input {
  min-width: 0;
  height: 46px;
  border: 1px solid rgba(183, 147, 112, .42);
  border-radius: 8px;
  padding: 0 14px;
  background: #fffdf8;
  outline: 0;
  color: var(--ink);
}

.access-card input:focus {
  border-color: var(--accent);
}

.access-card button {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: #2f3f35;
  color: #fffaf2;
  font-weight: 700;
}

.access-card.is-active {
  border-color: rgba(47, 63, 53, .32);
}

.access-card.is-active button {
  background: #78634c;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  max-width: 920px;
  min-height: 72px;
  margin-top: 18px;
  border: 1px solid rgba(170, 141, 106, .26);
  border-radius: 9px;
  background: rgba(255, 252, 247, .94);
  box-shadow: 0 24px 52px rgba(86, 57, 29, .16);
  overflow: hidden;
}

.hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 28px;
  background: transparent;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
}

.hero-search button {
  border: 0;
  background: linear-gradient(180deg, #a94733, #873122);
  color: #fff7ea;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  font-size: 17px;
}

.hero-search button:hover {
  background: linear-gradient(180deg, #b44e38, #79291e);
}

.hero-search input:disabled,
.hero-search button:disabled,
.hot-searches button:disabled,
.branch-controls input:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.hero-search button:disabled {
  background: #9b8d7b;
}

.hot-searches,
.search-status {
  max-width: 920px;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.hot-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  align-items: center;
  margin-top: 18px;
  color: #47392e;
}

.hot-searches span,
.search-status {
  color: var(--muted);
}

.hot-searches button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #3b2e25;
}

.hot-searches button:hover {
  color: var(--accent);
}

.search-status {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 14px;
}

.feature-grid,
.workspace-section,
.article-section,
.ancestor-section,
.updates-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 44px;
}

.feature-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: -8px;
}

.feature-card {
  position: relative;
  min-height: 160px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-content: center;
  gap: 10px 18px;
  padding: 26px;
  border: 1px solid rgba(176, 144, 106, .25);
  border-radius: var(--radius);
  background: rgba(255, 251, 244, .88);
  box-shadow: var(--soft-shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(143, 51, 35, .32);
  box-shadow: var(--shadow);
}

.feature-icon {
  grid-row: span 3;
  display: inline-flex;
  width: 70px;
  height: 70px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1e6d6;
  color: #6d4b29;
  font-size: 31px;
  font-weight: 700;
}

.feature-card strong {
  align-self: end;
  font-size: 20px;
}

.feature-card small {
  color: var(--muted);
  line-height: 1.7;
}

.feature-card em {
  color: var(--accent);
  font-style: normal;
  font-size: 24px;
  line-height: 1;
}

.workspace-section,
.article-section,
.ancestor-section,
.updates-section {
  padding-top: 54px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(31px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: .05em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: nowrap;
}

.text-link:hover {
  color: var(--accent);
}

.public-panel,
.empty-panel {
  border: 1px solid rgba(176, 144, 106, .26);
  border-radius: var(--radius);
  background: rgba(255, 251, 244, .86);
  box-shadow: var(--soft-shadow);
}

.public-panel {
  padding: 26px;
}

.empty-panel {
  display: grid;
  gap: 8px;
  padding: 32px;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.empty-panel strong {
  color: var(--ink);
  font-size: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin: 0;
  font-size: 24px;
}

.filter-label,
.branch-controls label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

select,
input[type="range"] {
  accent-color: var(--accent);
}

select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fffaf2;
  color: var(--ink);
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-group {
  display: grid;
  gap: 10px;
}

.result-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.result-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(110px, .7fr) minmax(110px, .7fr) minmax(120px, .7fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(176, 144, 106, .24);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 253, 249, .92);
  color: var(--ink);
  text-align: left;
  transition: border-color .18s ease, transform .18s ease;
}

.result-card:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 51, 35, .35);
}

.result-name-visual {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-name-image,
.detail-glyph-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  min-height: 44px;
  border-radius: 6px;
  background: #f6efe4;
  border: 1px solid rgba(176, 144, 106, .25);
  overflow: hidden;
}

.result-name-image img {
  display: block;
  max-width: 100%;
  max-height: 58px;
  object-fit: contain;
}

.result-name-text {
  font-size: 22px;
  font-weight: 800;
}

.result-cell {
  display: grid;
  gap: 4px;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.cell-label {
  color: var(--faint);
  font-size: 12px;
}

.tag {
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f0e1cf;
  color: var(--accent-deep);
  font-size: 13px;
}

.tag.success {
  background: #e2ecdf;
  color: #35633a;
}

.tag.muted {
  background: #eee6dc;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 22px;
}

.name-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.name-title-row span {
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.name-title-row h3 {
  margin: 8px 0 0;
  font-size: 34px;
}

#detail-glyph {
  max-width: 120px;
  max-height: 68px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid rgba(176, 144, 106, .24);
  border-radius: 6px;
  background: #f6efe4;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f0e4d4;
  color: #5d4c3e;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.biography-card h4 {
  margin: 24px 0 8px;
  color: var(--accent-deep);
  font-size: 18px;
}

.biography-card p {
  margin: 0;
  color: #3a2e24;
  font-size: 17px;
  line-height: 2;
  white-space: pre-wrap;
}

.source-label {
  color: var(--muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.route-card h3,
.branch-panel h3 {
  margin-top: 0;
}

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

.route-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(176, 144, 106, .2);
  border-radius: 8px;
  background: rgba(255, 253, 249, .72);
  cursor: pointer;
}

.route-generation {
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.route-person strong {
  display: block;
  font-size: 18px;
}

.route-person span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.tree-note,
.notice-box {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(176, 144, 106, .24);
  border-radius: 8px;
  background: #fbf2e7;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

.branch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-bottom: 18px;
}

.branch-controls input {
  width: 160px;
}

.branch-controls strong {
  min-width: 42px;
  color: var(--accent-deep);
}

.branch-view-wrap {
  position: relative;
  min-height: 260px;
  overflow: auto;
  border-radius: 8px;
  background:
    linear-gradient(rgba(143,51,35,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,51,35,.04) 1px, transparent 1px),
    rgba(255, 253, 248, .72);
  background-size: 24px 24px;
}

.hanging-tree-svg,
.hanging-tree-canvas {
  position: absolute;
  inset: 0;
}

.hanging-tree-canvas {
  min-width: 100%;
  min-height: 260px;
}

.graph-edge-lite {
  fill: none;
  stroke: rgba(129, 87, 50, .36);
  stroke-width: 2;
}

.graph-edge-lite.is-focus {
  stroke: rgba(143, 51, 35, .58);
  stroke-width: 2.4;
}

.tree-generation-tag {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  padding: 8px 6px;
  border: 1px solid rgba(176, 144, 106, .3);
  border-radius: 8px;
  background: #f3e5d3;
  text-align: center;
}

.tree-generation-tag strong {
  writing-mode: vertical-rl;
  letter-spacing: .12em;
}

.tree-generation-tag span {
  margin-top: 8px;
  color: var(--muted);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.tree-node-vertical {
  position: absolute;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 28px;
  align-items: center;
  justify-items: center;
  padding: 10px 8px;
  border: 1px solid rgba(176, 144, 106, .3);
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 8px 20px rgba(91, 61, 34, .08);
  color: var(--ink);
}

.tree-node-vertical.is-focus {
  border-color: rgba(143, 51, 35, .55);
  background: #fff3e3;
}

.tree-node-vertical.is-modern {
  background: #f4f7ed;
}

.glyph-thumb {
  width: 58px;
  height: 42px;
  border-radius: 5px;
  border: 1px solid rgba(176, 144, 106, .24);
  background-color: #f5ecdf;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.vertical-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
}

.vertical-meta {
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.scroll-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.scroll-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 218px;
  padding: 22px 24px 22px 130px;
  border: 1px solid rgba(150, 111, 67, .34);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(121, 74, 39, .18) 0 4px, transparent 4px calc(100% - 4px), rgba(121, 74, 39, .18) calc(100% - 4px)),
    #fbf2e4;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.scroll-card img {
  position: absolute;
  left: 22px;
  top: 24px;
  width: 86px;
  height: 128px;
  object-fit: cover;
  border: 1px solid rgba(150, 111, 67, .28);
  opacity: .82;
}

.scroll-card strong {
  margin-top: 12px;
  font-size: 22px;
}

.scroll-card span {
  color: #4c3b2d;
  line-height: 1.8;
}

.scroll-card em {
  color: var(--accent);
  font-style: normal;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.ancestor-arrows {
  display: inline-flex;
  gap: 12px;
}

.ancestor-arrows button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(176, 144, 106, .32);
  border-radius: 50%;
  background: rgba(255, 251, 244, .84);
  color: var(--accent);
  font-size: 24px;
}

.featured-person {
  --featured-gap: 18px;
  --featured-card-width: calc((100% - 36px) / 3);
  overflow: hidden;
}

.featured-track {
  display: flex;
  gap: var(--featured-gap);
  transform: translateX(0);
  transition: transform .45s ease;
  will-change: transform;
}

.featured-card {
  flex: 0 0 var(--featured-card-width);
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 248px;
  border: 1px solid rgba(176, 144, 106, .28);
  border-radius: var(--radius);
  background: rgba(255, 251, 244, .9);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.featured-person-image {
  width: 100%;
  min-height: 248px;
  background-color: rgba(246, 239, 228, .86);
  background-image: url("./public-assets/portrait-placeholder.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: min(78%, 96px) auto;
  border-right: 1px solid rgba(176, 144, 106, .24);
}

.featured-card-copy {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 24px 24px 24px 22px;
}

.featured-person span {
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.featured-person h3 {
  margin: 8px 0 14px;
  font-size: 30px;
}

.featured-person p {
  margin: 0;
  color: #44362b;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.8;
}

.featured-person button {
  margin-top: 22px;
  min-height: 40px;
  padding: 0 22px;
  border: 1px solid rgba(143, 51, 35, .42);
  border-radius: 6px;
  background: rgba(255, 250, 242, .88);
  color: var(--accent-deep);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.updates-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(176, 144, 106, .28);
  border-radius: var(--radius);
  background: rgba(255, 251, 244, .86);
  box-shadow: var(--soft-shadow);
}

.update-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 24px;
  border-right: 1px solid rgba(176, 144, 106, .2);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.update-item:last-child {
  border-right: 0;
}

.update-item span {
  grid-row: span 2;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #efe3d2;
  color: var(--accent);
}

.update-item strong {
  font-size: 16px;
}

.update-item small {
  color: #4e4034;
}

.update-item time {
  grid-row: span 2;
  color: var(--faint);
  font-size: 14px;
}

.digital-preface-card {
  margin-top: 26px;
  border: 1px solid rgba(176, 144, 106, .28);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 46px);
  background: rgba(255, 251, 244, .9);
  box-shadow: var(--soft-shadow);
}

.preface-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: .08em;
}

.digital-preface-card h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 46px);
}

.preface-notice {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
  border-left: 4px solid rgba(143, 51, 35, .72);
  padding: 16px 18px;
  background: #f6ead9;
  color: #44362b;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.85;
}

.preface-notice p,
.preface-body p {
  margin: 0;
}

.preface-body {
  display: grid;
  gap: 16px;
  max-width: 980px;
  color: #352920;
  font-size: 17px;
  line-height: 2;
}

.preface-signature {
  margin-top: 8px !important;
  color: var(--accent-deep);
  text-align: right;
  font-weight: 700;
}

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(120px, .7fr));
  gap: 42px;
  max-width: var(--max);
  margin: 72px auto 0;
  padding: 54px 44px 72px;
  border-top: 1px solid rgba(176, 144, 106, .24);
  background: linear-gradient(180deg, rgba(251,244,232,0), rgba(233,220,200,.45));
}

.site-footer div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.site-footer strong {
  font-size: 18px;
}

.site-footer a,
.site-footer span {
  color: #5f5145;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

.footer-brand {
  max-width: 280px;
}

.qr-placeholder img {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  border: 1px solid rgba(143, 51, 35, .18);
  border-radius: 8px;
  background: #fffaf2;
}

.copyright {
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 22px;
  margin: 0;
  border-top: 1px solid rgba(176, 144, 106, .2);
  padding-top: 14px;
  color: var(--faint);
  text-align: center;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

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

  .detail-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .featured-person {
    --featured-card-width: calc((100% - 18px) / 2);
  }

  .updates-row {
    grid-template-columns: 1fr;
  }

  .update-item {
    border-right: 0;
    border-bottom: 1px solid rgba(176, 144, 106, .2);
  }

  .update-item:last-child {
    border-bottom: 0;
  }

  .preface-body {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    padding: 16px 18px 8px;
    gap: 12px;
  }

  .brand strong {
    font-size: 20px;
  }

  .brand small,
  .future-login {
    display: none;
  }

  .site-nav {
    gap: 18px;
    font-size: 14px;
  }

  .hero {
    min-height: 520px;
  }

  .hero-art {
    inset: -40px -420px 0 -140px;
  }

  .hero-inner {
    padding: 52px 18px 36px;
  }

  .hero h1 {
    font-size: 64px;
  }

  .hero-line {
    font-size: 25px;
  }

  .hero-subline {
    font-size: 17px;
    line-height: 1.7;
  }

  .hero-search {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-top: 38px;
  }

  .access-card {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .hero-search input,
  .hero-search button {
    min-height: 58px;
  }

  .feature-grid,
  .workspace-section,
  .article-section,
  .ancestor-section,
  .updates-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .feature-grid,
  .scroll-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 134px;
    padding: 20px;
  }

  .section-heading,
  .panel-head {
    align-items: start;
    flex-direction: column;
  }

  .public-panel {
    padding: 18px;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .detail-tags span {
    border-radius: 8px;
  }

  .branch-controls {
    display: grid;
  }

  .branch-controls label {
    justify-content: space-between;
  }

  .branch-controls input {
    width: min(45vw, 180px);
  }

  .scroll-card {
    min-height: 190px;
    padding-left: 118px;
  }

  .scroll-card img {
    width: 76px;
    height: 112px;
  }

  .featured-card-copy {
    padding: 26px 20px;
  }

  .featured-person {
    --featured-card-width: 100%;
  }

  .featured-card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 220px;
  }

  .featured-person-image {
    min-height: 220px;
    background-size: min(78%, 78px) auto;
  }

  .featured-person h3 {
    font-size: 26px;
  }

  .update-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .update-item time {
    grid-column: 2;
    grid-row: auto;
  }

  .digital-preface-card {
    padding: 22px 18px;
  }

  .preface-notice {
    padding: 14px;
  }

  .preface-body {
    font-size: 16px;
    line-height: 1.9;
  }

  .site-footer {
    margin-top: 48px;
    padding: 38px 18px 78px;
    gap: 26px;
  }

  .copyright {
    left: 18px;
    right: 18px;
  }
}
