:root {
  --page-bg: #efe7da;
  --page-bg-soft: #f8f2e9;
  --page-bg-alt: #e7ddcf;
  --ink: #241d18;
  --ink-soft: #665d55;
  --ink-faint: #8b837a;
  --line: rgba(74, 56, 36, 0.14);
  --line-strong: rgba(74, 56, 36, 0.22);
  --card: rgba(255, 251, 245, 0.76);
  --card-strong: rgba(255, 251, 245, 0.9);
  --shadow-soft: 0 24px 80px rgba(56, 41, 22, 0.09);
  --shadow-image: 0 42px 96px rgba(38, 28, 15, 0.16);
  --accent: #7b624c;
  --accent-cool: #748173;
  --radius-hero: 42px;
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1380px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(161, 146, 123, 0.24), transparent 28%),
    radial-gradient(circle at right 12%, rgba(120, 136, 124, 0.16), transparent 24%),
    linear-gradient(180deg, #f4ede3 0%, #eee4d6 44%, #f6f0e8 100%);
  font: 400 17px/1.68 "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

.page-shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(249, 244, 237, 0.82);
  box-shadow: 0 18px 36px rgba(71, 54, 30, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  border: 1px solid rgba(88, 68, 42, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 250, 243, 0.96), rgba(229, 214, 193, 0.9)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.brand-meta {
  display: grid;
  gap: 2px;
}

.brand-meta strong,
.hero-copy h1,
.section-head h2,
.hall-copy h3,
.note-card h3,
.archive-card h3,
.subhero-copy h1,
.chapter-header h2,
.image-caption h4,
.text-panel h3,
.role-copy h3,
.lineage-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-meta strong {
  font-size: 16px;
  line-height: 1.15;
}

.brand-meta span,
.nav-links a,
.eyebrow,
.section-intro,
.hero-copy p,
.note-card p,
.archive-card p,
.image-caption p,
.text-panel p,
.role-copy p,
.lineage-item p,
.footer-copy,
.subhero-copy p,
.principle-item p {
  color: var(--ink-soft);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a,
.hall-link,
.ghost-link,
.back-link,
.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.hall-link:hover,
.hall-link:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.detail-link:hover,
.detail-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.detail-link:hover,
.detail-link:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
}

.hall-link {
  width: fit-content;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff9f2;
}

.hall-link:hover,
.hall-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(31, 25, 19, 0.12);
}

.ghost-link,
.back-link,
.detail-link {
  width: fit-content;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: min(79vh, 900px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-image);
  background: #d8cdc0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}

.hero-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 14, 11, 0.08) 0%, rgba(17, 14, 11, 0.22) 42%, rgba(17, 14, 11, 0.1) 100%),
    linear-gradient(180deg, rgba(18, 15, 12, 0.08) 0%, rgba(18, 15, 12, 0.18) 100%);
}

.hero-panel {
  overflow: hidden;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-panel-right img {
  object-position: center top;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  height: 100%;
  padding: clamp(34px, 4vw, 60px);
  color: #f8f2ea;
}

.hero-copy .eyebrow,
.hero-copy p,
.hero-copy .meta-line span {
  color: rgba(248, 242, 234, 0.82);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(245, 236, 226, 0.12);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 9.8ch;
  font-size: clamp(50px, 7vw, 112px);
  line-height: 0.92;
}

.hero-copy p {
  max-width: 640px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.58;
}

.meta-line,
.stat-line,
.hero-actions,
.archive-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-line span,
.stat-line span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(245, 236, 226, 0.1);
  font-size: 13px;
}

.section {
  margin-top: 40px;
}

.section-head,
.chapter-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-head h2,
.chapter-header h2,
.subhero-copy h1 {
  font-size: clamp(32px, 4vw, 60px);
  line-height: 1;
}

.section-intro {
  max-width: 560px;
}

.hall-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hall-card,
.note-card,
.archive-card,
.image-panel,
.text-panel,
.role-card,
.lineage-block,
.subhero-copy,
.principle-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.hall-card,
.role-card,
.image-panel {
  overflow: hidden;
}

.hall-visual {
  position: relative;
  min-height: 480px;
}

.hall-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hall-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 10, 8, 0.05) 0%, rgba(12, 10, 8, 0.5) 100%);
}

.hall-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: -144px;
  padding: 28px;
  color: #fbf6ef;
}

.hall-copy p {
  max-width: 36ch;
  color: rgba(251, 246, 239, 0.86);
}

.note-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
}

.note-card,
.archive-card,
.text-panel,
.lineage-block {
  padding: 26px;
}

.note-card h3,
.archive-card h3,
.text-panel h3,
.role-copy h3,
.lineage-title {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.08;
}

.archive-list,
.text-stack {
  display: grid;
  gap: 14px;
}

.archive-item {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.archive-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.archive-item strong,
.principle-item strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.subhero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 20px;
  align-items: stretch;
}

.subhero-copy {
  display: grid;
  align-content: end;
  gap: 18px;
  min-height: 420px;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.84), rgba(243, 235, 224, 0.8)),
    radial-gradient(circle at top left, rgba(132, 150, 141, 0.12), transparent 32%);
}

.subhero-visual {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-image);
}

.subhero-visual img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.principle-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.principle-item {
  padding: 20px 22px;
}

.chapter {
  margin-top: 34px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.image-caption {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  background: var(--card-strong);
}

.image-caption h4 {
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.08;
}

.text-list {
  padding-left: 18px;
  color: var(--ink-soft);
}

.text-list li + li {
  margin-top: 8px;
}

.role-grid,
.lineage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.role-card img {
  width: 100%;
  aspect-ratio: 4 / 3.8;
  object-fit: cover;
}

.role-copy {
  padding: 18px 18px 20px;
}

.lineage-item {
  position: relative;
  padding-left: 18px;
}

.lineage-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(123, 98, 76, 0.56);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 40px;
  padding: 24px 4px 0;
  border-top: 1px solid var(--line);
}

.fade-up {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 720ms ease forwards;
}

.delay-1 {
  animation-delay: 90ms;
}

.delay-2 {
  animation-delay: 170ms;
}

.delay-3 {
  animation-delay: 250ms;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .hall-grid,
  .note-row,
  .archive-grid,
  .subhero,
  .principle-band,
  .chapter-grid,
  .role-grid,
  .lineage {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel-right {
    display: none;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 26px), var(--max-width));
    padding-top: 14px;
  }

  .topbar,
  .section-head,
  .chapter-header,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .subhero-copy,
  .subhero-visual img,
  .image-panel img,
  .hall-visual {
    min-height: auto;
  }

  .hero-copy {
    padding: 26px;
  }

  .hero-copy h1,
  .section-head h2,
  .chapter-header h2,
  .subhero-copy h1 {
    font-size: 36px;
  }

  .hall-copy,
  .note-card,
  .archive-card,
  .subhero-copy,
  .text-panel,
  .lineage-block {
    padding: 20px;
  }

  .hall-copy {
    margin-top: -120px;
  }
}
