:root {
  --ink: #261717;
  --red: #ff0000;
  --rose: #ff1493;
  --line: rgba(255, 20, 147, 0.26);
  --hair: rgba(255, 255, 255, 0.09);
  --soft: rgba(255, 255, 255, 0.78);
  --panel: rgba(38, 23, 23, 0.55);
  --serif: "Cormorant", "Songti SC", Georgia, serif;
  --sans: "Montserrat", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  color: #fff;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(36% 44% at 16% 20%, rgba(255, 0, 0, 0.55), transparent 62%),
    radial-gradient(40% 50% at 82% 14%, rgba(255, 20, 147, 0.5), transparent 60%),
    radial-gradient(46% 56% at 58% 86%, rgba(255, 0, 0, 0.32), transparent 66%),
    conic-gradient(from 200deg at 50% 50%, #2a1518, #3d1424, #261717, #2a1518);
  background-size: 200% 200%;
  filter: saturate(1.2) blur(3px);
  opacity: 0.92;
  animation: aurora 11s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 44%; }
  100% { background-position: 18% 100%; }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 52% 28%, #000 18%, transparent 78%);
  mask-image: radial-gradient(circle at 52% 28%, #000 18%, transparent 78%);
}

a {
  color: #ff8fbd;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
}

/* ---------- 左侧栏 ---------- */
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 30px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 13, 13, 0.9), rgba(22, 13, 13, 0.5));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.ticker {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 143, 189, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
  color: #fff;
  text-decoration: none;
}

.brand-link .mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.brand-link span {
  background: linear-gradient(96deg, #fff 8%, #ffc6da 52%, var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rail-hr {
  height: 1px;
  border: 0;
  margin: 12px 0 18px;
  background: linear-gradient(90deg, var(--rose), rgba(255, 0, 0, 0.5) 42%, transparent);
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-nav li {
  opacity: 0;
  transform: translateX(-10px);
  animation: slide-in 0.62s cubic-bezier(0.22, 0.7, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 68ms + 120ms);
}

@keyframes slide-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.rail-nav a {
  display: block;
  min-height: 44px;
  padding: 12px 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: #fff;
  padding-left: 12px;
}

.rail-nav a:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* ---------- 主栏 ---------- */
.col {
  min-width: 0;
}

main {
  padding: 0 clamp(18px, 4vw, 56px);
}

div {
  max-width: 830px;
  counter-reset: sec;
  padding-bottom: 20px;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 56px;
  overflow: hidden;
}

.ghost {
  position: absolute;
  left: -1%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: clamp(3.4rem, 15vw, 13rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 20, 147, 0.42);
  pointer-events: none;
  user-select: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 16em;
  font-size: clamp(2.1rem, 5.4vw, 4.1rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
  font-weight: 700;
  background: linear-gradient(100deg, #ffffff 6%, #ffd0e0 46%, var(--rose) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(255, 20, 147, 0.28);
}

div > section:not(.hero) {
  position: relative;
  margin: 0 0 26px;
  padding: clamp(20px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(158deg, rgba(38, 23, 23, 0.76), rgba(38, 23, 23, 0.34));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  scroll-margin-top: 24px;
  counter-increment: sec;
}

div > section:not(.hero)::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  color: var(--rose);
}

div h2 {
  margin: 0.1em 0 0.15em;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, #fff 10%, #ffc6da 58%, var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

div h3 {
  margin: 1.2em 0 0.4em;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 600;
  color: #ffe3ee;
}

div hr {
  height: 1px;
  border: 0;
  margin: 12px 0 20px;
  background: linear-gradient(90deg, var(--rose), rgba(255, 0, 0, 0.35) 46%, transparent);
}

div p {
  margin: 0 0 1em;
  color: var(--soft);
}

div ul,
div ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
  color: var(--soft);
}

div li {
  margin: 0.35em 0;
}

div li::marker {
  color: var(--rose);
}

div blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 2px solid var(--rose);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 20, 147, 0.08);
  color: #ffeaf2;
}

div strong {
  color: #fff;
}

div table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 16px;
}

div th,
div td {
  padding: 10px 12px;
  border: 1px solid var(--hair);
  text-align: left;
}

div th {
  background: rgba(255, 20, 147, 0.12);
  color: #fff;
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 14px 26px;
  align-items: end;
  margin-top: 32px;
  padding: 38px clamp(18px, 4vw, 56px) 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 13, 13, 0.2), rgba(22, 13, 13, 0.72));
}

.foot-cta {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.foot-cta a {
  display: inline-block;
  padding: 6px 0;
  min-height: 44px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(96deg, #fff 6%, #ffc6da 54%, var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  font-size: 16px;
}

.foot-links a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 9px;
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
  border-radius: 8px;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: #fff;
  background: rgba(255, 20, 147, 0.16);
}

.copyright {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.foot-top {
  margin: 0;
  text-align: right;
  font-size: 16px;
}

.foot-top a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0 8px 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.foot-top a:hover {
  color: #fff;
}

/* ---------- 滚动渐显 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1);
}

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

/* ---------- 回顶 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(38, 23, 23, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.to-top.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    height: auto;
    overflow: visible;
    padding: 14px 16px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(20, 12, 12, 0.78);
  }

  .ticker {
    margin-bottom: 8px;
  }

  .brand {
    font-size: 1.25rem;
  }

  .rail-hr {
    margin: 10px 0 8px;
  }

  .rail-nav ul {
    display: flex;
    gap: 4px;
    margin: 4px -16px 0;
    padding: 0 16px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .rail-nav li {
    flex: 0 0 auto;
    opacity: 1;
    transform: none;
    animation: none;
  }

  .rail-nav a {
    padding: 12px 11px;
    min-height: 44px;
    white-space: nowrap;
    border-bottom: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
  }

  .rail-nav a:hover,
  .rail-nav a:focus-visible {
    padding-left: 11px;
  }

  .hero {
    min-height: 88vh;
    min-height: 88svh;
    padding: 34px 0 40px;
  }

  .ghost {
    font-size: clamp(3rem, 20vw, 7rem);
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    text-align: left;
  }

  .foot-links {
    justify-content: flex-start;
  }

  .foot-top {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rail-nav li,
  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

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