:root {
  color-scheme: dark;
  --ink: #f1f1f1;
  --body: #d7d7d7;
  --dim: #8d8d8d;
  --line: #1e1e1e;
  --line-soft: #141414;
  --panel: #0c0c0c;
  --panel-2: #121212;
  --blue: #24345a;
  --glow: #7fb0ff;
  --gold: #d3ad6d;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  background: #000;
  color: var(--body);
  font-family: "Source Serif 4", "Songti SC", Georgia, "Noto Serif CJK SC", serif;
  font-size: 18px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: "Playfair Display", "Source Serif 4", "Songti SC", Georgia, serif;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

a { color: inherit; }

::selection { background: #1d2b4d; color: #fff; }

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

.skip {
  position: fixed;
  top: -80px;
  left: 14px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #3c4a6d;
  border-radius: var(--radius);
  background: #0f1726;
  color: #e5eeff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: .06em;
  text-decoration: none;
  transition: top .2s ease;
}
.skip:focus { top: 12px; }

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .88);
  border-top: 1px solid #1b1b1b;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dock-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid #262626;
  border-radius: var(--radius);
  background: #0a0a0a;
  color: #ededed;
  font-family: "Playfair Display", serif;
  font-size: 20px;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.dock-brand:hover {
  border-color: #3d4a68;
  color: #fff;
  box-shadow: 0 0 14px rgba(127, 176, 255, .18);
}

.dock-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.dock-nav p {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.dock-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  color: #b6b6b6;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: .02em;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
.dock-nav a:hover { color: #fff; background: #121212; }
.dock-nav a[aria-current] {
  color: #fff;
  background: #14161d;
  box-shadow: inset 0 -2px 0 -1px var(--glow);
}

.dock-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #33405f;
  border-radius: var(--radius);
  background: #0d1421;
  color: #dae5ff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(127, 176, 255, .35);
  transition: background .2s ease, border-color .2s ease;
}
.dock-cta:hover { background: #13203a; border-color: #4a5d86; }

/* 首屏 */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 32px 120px;
  overflow: hidden;
}

.stage-ghost {
  position: absolute;
  right: 0;
  top: 5%;
  z-index: 0;
  font-family: "Playfair Display", "Songti SC", serif;
  font-size: clamp(4.5rem, 19vw, 14rem);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.05em;
  color: #0a0d15;
  -webkit-text-stroke: 1px #1f2738;
  pointer-events: none;
  user-select: none;
}

.collage {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: min(62vh, 540px);
}
.collage.is-empty { min-height: 26vh; }

.plate {
  position: absolute;
  display: block;
  overflow: hidden;
  border: 1px solid #1d1d1d;
  border-radius: var(--radius);
  background: #0b0b0b;
  box-shadow: 0 30px 70px -34px #000, 0 0 0 1px rgba(255, 255, 255, .02);
  transition: transform .45s ease, box-shadow .45s ease;
}
.plate-a {
  top: 0;
  left: 0;
  width: 76%;
  aspect-ratio: 4 / 5;
  transform: rotate(-2deg);
}
.plate-b {
  right: 0;
  bottom: 0;
  width: 57%;
  aspect-ratio: 1 / 1;
  transform: rotate(2.6deg);
}
.plate:hover { transform: translateY(-6px) rotate(-1deg); }
.plate-b:hover { transform: translateY(-6px) rotate(1.4deg); }

.plate-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.85) contrast(1.06) brightness(.9);
  transition: transform .6s ease;
}
.plate:hover .plate-img { transform: scale(1.04); }

.stage-copy {
  position: relative;
  z-index: 2;
  text-align: right;
}

.stage-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.025em;
  text-shadow: 0 0 26px rgba(127, 176, 255, .18);
}

.stage-rule {
  width: 44%;
  margin: 24px 0 0 auto;
  height: 0;
  border: 0;
  border-top: 1px solid var(--blue);
  box-shadow: 0 0 12px rgba(127, 176, 255, .22);
}

/* 正文 + 侧栏 */
.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: clamp(28px, 5vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 32px 96px;
  border-top: 1px solid var(--line-soft);
}

.prose {
  min-width: 0;
  max-width: 44rem;
  font-size: 1.02rem;
  line-height: 1.88;
  color: var(--body);
}

.prose div {
  padding-block: 40px;
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: 32px;
}
.prose div:first-child { padding-top: 0; }
.prose div:last-child { border-bottom: 0; padding-bottom: 0; }

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3.3vw, 2.3rem);
  letter-spacing: -.015em;
  text-shadow: 0 0 18px rgba(127, 176, 255, .12);
}
.prose h3 {
  margin: 30px 0 12px;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: #f4f4f4;
}

.prose hr {
  width: 52px;
  height: 0;
  margin: 0 0 22px;
  border: 0;
  border-top: 1px solid #39476a;
}

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

.prose a {
  color: #cfe0ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #3a4a72;
}
.prose a:hover { text-decoration-color: var(--glow); }

.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.25em; }
.prose li { margin-bottom: 8px; }

.prose figure {
  margin: 26px 0;
}
.prose figure img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid #1c1c1c;
}
.prose figcaption {
  margin-top: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--dim);
}

.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid #2c3a5a;
  color: #bac5d9;
  font-style: italic;
}

.prose img { border-radius: var(--radius); }

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: .95rem;
}
.prose th, .prose td {
  padding: 9px 12px;
  border-bottom: 1px solid #1c1c1c;
  text-align: left;
}
.prose th { color: #fff; font-weight: 600; }

.prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .88em;
  padding: 1px 5px;
  border-radius: 4px;
  background: #101010;
  color: #dfe7f5;
}
.prose pre {
  overflow-x: auto;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #1b1b1b;
  border-radius: var(--radius);
  background: #0a0a0a;
}
.prose pre code { padding: 0; background: none; }

/* 右侧栏 */
.rail {
  position: sticky;
  top: 28px;
  align-self: start;
  padding: 18px 18px 20px;
  border: 1px solid #1b1b1b;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0c0c0c, #070707);
  box-shadow: 0 24px 54px -32px #000;
}
.rail h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: .04em;
}
.rail hr {
  width: 34px;
  height: 0;
  margin: 0 0 12px;
  border: 0;
  border-top: 1px solid #2a2a2a;
}
.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
}
.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid #111;
  color: #adadad;
  text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.rail a:hover { color: #fff; padding-left: 4px; }

/* 页脚 */
.base {
  padding: 48px 32px 20px;
  border-top: 1px solid #1a1a1a;
  background: #050505;
}

.base-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto 28px;
}

.base-addr {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin: 0;
  font-style: normal;
  color: #cfcfcf;
  font-size: .95rem;
}
.base-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #262626;
  border-radius: 9px;
  font-family: "Playfair Display", serif;
  font-size: 17px;
  color: #ededed;
}
.base-addr strong { font-size: 1.02rem; color: #f0f0f0; letter-spacing: .02em; }
.base-tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .16em;
  color: #7c88a2;
}

.base-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
}
.base-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: #b2b2b2;
  text-decoration: none;
  transition: color .2s ease;
}
.base-links a:hover { color: #fff; }

.sub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto 20px;
}
.sub input {
  flex: 1 1 220px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #232323;
  border-radius: var(--radius);
  background: #0d0d0d;
  color: #ededed;
  font: inherit;
  font-size: .95rem;
}
.sub input::placeholder { color: #6f6f6f; }
.sub button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #33405f;
  border-radius: var(--radius);
  background: #101827;
  color: #dfe9ff;
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.sub button:hover { background: #16233c; border-color: #4a5d86; }

.base-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 14px;
  border-top: 1px solid #111;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .1em;
  color: #757575;
}

/* 滚动进场 */
.js .prose div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .prose div.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  body { font-size: 17px; }
  .stage {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 40px 20px 44px;
    gap: 30px;
  }
  .stage-ghost {
    top: auto;
    bottom: 2%;
    right: -.08em;
    font-size: clamp(3.6rem, 26vw, 8rem);
  }
  .stage-copy { order: -1; }
  .stage-copy h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .stage-rule { margin-top: 18px; }
  .collage { min-height: 46vh; }
  .sheet {
    grid-template-columns: 1fr;
    padding: 40px 20px 64px;
  }
  .rail { position: static; }
  .base { padding: 36px 20px 16px; }
  .base-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .dock { gap: 6px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); }
  .dock-brand { width: 42px; height: 42px; font-size: 18px; }
  .dock-nav a { padding: 0 8px; font-size: 12px; }
  .dock-cta { padding: 0 10px; font-size: 12px; }
  .prose { font-size: 1rem; }
  .base-links { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .js .prose div { opacity: 1; transform: none; }
}

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