@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Righteous&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
  --rose: #eb879c;
  --pink: #ffb6c1;
  --ink: #26171a;
  --text: #f6e7ea;
  --muted: #d9bcc2;
  --line: rgba(255, 182, 193, 0.14);
  --r: 28px;
  --soft: 0 22px 48px -28px rgba(0, 0, 0, 0.9), 0 6px 14px -8px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

body {
  margin: 0;
  padding-left: 280px;
  min-height: 100vh;
  font-family: 'Poppins', 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 720px at 88% -8%, rgba(235, 135, 156, 0.2), transparent 62%),
    radial-gradient(820px 620px at 4% 104%, rgba(255, 182, 193, 0.12), transparent 58%),
    var(--ink);
  background-attachment: fixed;
}

h1, h2, h3, .brand, .foot-brand {
  font-family: 'Righteous', 'Poppins', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 400;
}

a { color: var(--pink); text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 10px;
}

hr {
  border: 0;
  height: 3px;
  width: 66px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--rose), rgba(255, 182, 193, 0.12));
  margin: 12px 0 22px;
}

/* 左侧固定立式导航 */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px 24px 26px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 23, 26, 0.97), rgba(38, 23, 26, 0.9));
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--pink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--rose), var(--pink));
  color: #26171a;
  font-size: 1.05rem;
  box-shadow: 0 10px 20px -12px rgba(235, 135, 156, 0.95);
}

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

.rail-nav li { counter-increment: n; }

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  color: #e8d2d7;
  font-size: 1rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.rail-nav a::before {
  content: counter(n, decimal-leading-zero);
  font-family: 'Righteous', sans-serif;
  font-size: 0.72rem;
  color: var(--rose);
  opacity: 0.85;
  padding-top: 2px;
}

.rail-nav a:hover {
  background: rgba(255, 182, 193, 0.11);
  color: #fff;
}

.rail-cta {
  margin-top: auto;
  display: block;
  padding: 14px 18px;
  text-align: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  color: #26171a;
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: 0 14px 28px -16px rgba(235, 135, 156, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rail-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -14px rgba(235, 135, 156, 0.95);
}

/* 版心 */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  align-items: start;
  gap: 34px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 36px 88px;
}

.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 44px;
  min-height: 70vh;
  padding: 6px 0 4px;
}

.hero-solo { grid-template-columns: 1fr; }

.hero-copy { text-align: right; }

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 4.4vw, 3.3rem);
  line-height: 1.14;
  color: #fff;
  letter-spacing: 0.01em;
}

.hero-lede {
  margin: 0 0 0 auto;
  max-width: 52ch;
  font-size: 1.02rem;
  color: #e3c8ce;
}

.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 62vh;
  object-fit: cover;
  border-radius: var(--r);
  box-shadow: var(--soft);
  will-change: transform;
}

/* 正文 */
.body-area { min-width: 0; }

.prose {
  min-width: 0;
  font-size: 1.03rem;
}

.prose > div {
  margin-top: 28px;
  padding: 30px 32px;
  border: 1px solid rgba(255, 182, 193, 0.09);
  border-radius: var(--r);
  background: linear-gradient(168deg, #37242a, #2a1a1e 62%);
  box-shadow: var(--soft);
}

.prose > div:first-child { margin-top: 0; }

.prose h2 {
  margin: 0 0 12px;
  font-size: clamp(1.32rem, 2.2vw, 1.66rem);
  line-height: 1.3;
  color: var(--pink);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.16rem;
  color: var(--pink);
}

.prose p {
  margin: 0 0 15px;
  line-height: 1.8;
  color: #f0dfe3;
}

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

.prose a {
  color: var(--pink);
  border-bottom: 1px solid rgba(255, 182, 193, 0.45);
}

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

.prose ul,
.prose ol {
  margin: 0 0 15px;
  padding-left: 1.2em;
  line-height: 1.8;
}

.prose li { margin-bottom: 6px; }

.prose strong { color: #ffe3e8; }

.prose blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--rose);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 182, 193, 0.07);
  color: #efd9de;
}

.prose pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.32);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

article > div { scroll-margin-top: 30px; }

/* 右侧栏 */
.side-note {
  position: sticky;
  top: 34px;
  align-self: start;
  padding: 24px 22px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(170deg, rgba(255, 182, 193, 0.09), rgba(255, 182, 193, 0.03));
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.9);
}

.side-note h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--pink);
}

.side-note ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: t;
}

.side-note li { counter-increment: t; }

.side-note a {
  display: flex;
  gap: 8px;
  padding: 10px 2px;
  font-size: 0.95rem;
  color: #e6ccd2;
  border-bottom: 1px dashed rgba(255, 182, 193, 0.12);
  transition: color 0.25s ease;
}

.side-note a::before {
  content: counter(t, decimal-leading-zero);
  font-family: 'Righteous', sans-serif;
  font-size: 0.72rem;
  color: var(--rose);
  padding-top: 4px;
}

.side-note a:hover { color: #fff; }

.side-note .to-top { margin: 14px 0 0; }

.side-note .to-top a {
  display: inline-block;
  padding: 11px 0;
  border: 0;
  color: var(--pink);
  font-size: 0.92rem;
}

.side-note .to-top a::before { content: none; }

/* 页脚 */
.site-foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 28px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 58px 36px 30px;
  border-top: 1px solid var(--line);
}

.foot-brand {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: rgba(255, 182, 193, 0.9);
}

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 4px 18px;
}

.foot-links a {
  display: inline-block;
  padding: 10px 0;
  font-size: 0.95rem;
  color: #e6ccd2;
}

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

.foot-host {
  margin: 0;
  padding-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
  word-break: break-all;
}

.foot-copy {
  grid-column: 1 / -1;
  display: block;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 182, 193, 0.1);
  font-size: 0.85rem;
  color: var(--muted);
}

/* 动效 */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.3s ease, transform 0.34s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art img { transform: none !important; }
}

@media (max-width: 960px) {
  body { padding-left: 0; }

  .rail {
    position: sticky;
    top: 0;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(38, 23, 26, 0.95);
  }

  .brand { font-size: 1.1rem; padding: 2px 0; }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 0.98rem;
  }

  .rail-nav {
    order: 3;
    width: 100%;
    margin: 0 0 4px;
  }

  .rail-nav ol {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

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

  .rail-nav a {
    padding: 11px 12px;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .rail-cta {
    margin-left: auto;
    margin-top: 0;
    padding: 11px 16px;
    font-size: 0.92rem;
  }

  .wrap {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 22px 16px 60px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 22px;
    padding: 4px 0 0;
  }

  .hero-copy { text-align: left; }

  .hero-lede { margin-left: 0; }

  .hero-art img {
    aspect-ratio: 16 / 10;
    max-height: none;
  }

  .prose > div {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .side-note { position: static; }

  .site-foot {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 40px 16px 24px;
  }

  .foot-brand { grid-column: 1 / -1; }

  .foot-host { padding-top: 4px; text-align: right; }

  article > div { scroll-margin-top: 150px; }
}

@media (max-width: 520px) {
  .site-foot { grid-template-columns: 1fr; }
  .foot-host { text-align: left; }
  .hero h1 { font-size: 1.85rem; }
}

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