@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,500;0,700;1,300;1,500&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

:root {
  color-scheme: dark;
  --void: #000000;
  --slate: #121212;
  --brass: #c9a227;
  --brass-dim: rgba(201, 162, 39, 0.24);
  --night: #16233f;
  --paper: #e9e5dc;
  --muted: #a29b8e;
  --line: rgba(233, 229, 220, 0.12);
  --dock-h: 66px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font-family: "Crimson Pro", "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  font-size: 17px;
  line-height: 1.78;
  padding-bottom: calc(var(--dock-h) + 44px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

::selection {
  background: rgba(201, 162, 39, 0.32);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 6px;
}

.aurora {
  position: fixed;
  inset: -26vh 0 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  background:
    radial-gradient(70vw 52vh at 50% -12%, rgba(22, 35, 63, 0.92), transparent 72%),
    radial-gradient(46vw 44vh at 88% 14%, rgba(201, 162, 39, 0.1), transparent 74%),
    radial-gradient(40vw 38vh at 6% 48%, rgba(22, 35, 63, 0.6), transparent 76%);
}

.hero,
.deck,
.colophon {
  position: relative;
  z-index: 1;
}

/* 首屏 */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 100px clamp(18px, 6vw, 64px) 46px;
}

.hero h1 {
  margin: 0;
  max-width: 24ch;
  font-family: "Cormorant Garamond", "Cinzel", "Songti SC", "Source Han Serif SC", serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 7.2vw, 5rem);
  line-height: 1.06;
  letter-spacing: 0.02em;
  color: #fbf7ee;
  text-shadow: 0 0 28px rgba(201, 162, 39, 0.22);
}

.hero-note {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 17px;
}

/* 主区 */
.deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 40px) 20px;
}

.deck > * {
  min-width: 0;
}

/* 正文 */
.prose > article {
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012) 44%, rgba(22, 35, 63, 0.3));
  border: 1px solid rgba(201, 162, 39, 0.16);
  border-radius: 28px;
  padding: clamp(20px, 3.6vw, 40px);
  box-shadow: 0 26px 70px -48px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  scroll-margin-top: 18px;
}

.prose > article + article {
  margin-top: 22px;
}

.prose h2 {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", "Songti SC", "Source Han Serif SC", serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.26;
  letter-spacing: 0.01em;
  color: #f6f1e6;
  text-shadow: 0 0 18px rgba(201, 162, 39, 0.16);
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--brass);
}

.prose p {
  margin: 0 0 16px;
  color: #cec8bd;
}

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

.prose a {
  color: #e0c163;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #fff2c4;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
  color: #cec8bd;
}

.prose li {
  margin: 0.35em 0;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--slate);
}

.prose blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 2px solid var(--brass-dim);
  color: var(--muted);
}

.prose strong {
  color: #f6f1e6;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

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

hr {
  height: 1px;
  border: 0;
  margin: 10px 0 18px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.55), rgba(201, 162, 39, 0.06) 72%, transparent);
}

/* 右侧目录 */
.rail {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 20px 16px 22px;
  border: 1px solid rgba(201, 162, 39, 0.16);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: 16px;
}

.rail-title {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--brass);
}

.rail-list {
  counter-reset: rail;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-list li {
  counter-increment: rail;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--brass);
  opacity: 0.75;
}

.rail-list a:hover {
  color: var(--paper);
}

/* 页脚 */
.colophon {
  margin-top: 46px;
  padding: 24px clamp(16px, 4vw, 40px) 30px;
  border-top: 1px solid var(--line);
}

.colophon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  max-width: 1180px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--muted);
}

.colophon-mark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  color: var(--brass);
  opacity: 0.8;
}

.colophon-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

.colophon-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 8px;
  color: var(--muted);
  text-decoration: none;
}

.colophon-nav a:hover {
  color: var(--paper);
}

.colophon-copy {
  margin: 0;
  letter-spacing: 0.08em;
}

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(10px, 3vw, 26px) calc(8px + env(safe-area-inset-bottom));
  background: rgba(9, 9, 9, 0.86);
  border-top: 1px solid var(--brass-dim);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.dock-nav {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.dock-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 12px 10px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.dock-link:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.05);
}

.dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  fill: var(--brass);
  opacity: 0.8;
}

.dock-brand .brand {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--brass);
  font-family: "Cormorant Garamond", "Songti SC", "Source Han Serif SC", serif;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-shadow: 0 0 16px rgba(201, 162, 39, 0.3);
}

.dock-brand .brand:hover {
  color: #ffeaa8;
}

.dock-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-search input {
  width: 128px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--paper);
  font-family: inherit;
  font-size: 16px;
}

.dock-search input::placeholder {
  color: #7e786d;
}

.dock-search button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--brass-dim);
  border-radius: 999px;
  background: transparent;
  color: var(--brass);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

.dock-search button:hover {
  background: rgba(201, 162, 39, 0.12);
}

/* 入场 */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 0.68, 0.32, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .aurora {
    transform: none !important;
  }
}

@media (max-width: 920px) {
  .deck {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 14px;
  }
  .rail {
    position: static;
    order: 2;
  }
}

@media (max-width: 860px) {
  .dock-search {
    display: none;
  }
  .dock-list {
    justify-content: flex-start;
  }
  .dock-brand {
    position: sticky;
    left: 0;
    z-index: 2;
    background: rgba(8, 8, 8, 0.94);
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 62vh;
    padding-top: 78px;
  }
  .hero h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }
  .prose > article {
    border-radius: 22px;
  }
  .rail {
    border-radius: 22px;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
