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

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

:root {
  --ink: #26171a;
  --ink-soft: #4a3238;
  --rose: #eb879c;
  --rose-deep: #a8384f;
  --pink: #ffb6c1;
  --paper: #fdf2f4;
  --glass: rgba(255, 255, 255, 0.62);
  --line: rgba(38, 23, 26, 0.14);
  --s1: 0 2px 4px rgba(38, 23, 26, 0.10);
  --s2: 0 2px 4px rgba(38, 23, 26, 0.08), 0 16px 34px rgba(38, 23, 26, 0.12);
  --rail: 216px;
}

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

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 92% -8%, #ffe1e8 0%, rgba(255, 225, 232, 0) 62%),
    linear-gradient(180deg, #fdf2f4 0%, #f8e8ec 55%, #fdf2f4 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Jost', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

a { color: var(--rose-deep); }

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

:focus-visible {
  outline: 3px solid var(--rose-deep);
  outline-offset: 2px;
}

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 8px 12px;
  color: #ffe2e8;
  background: linear-gradient(160deg, #351f24 0%, #26171a 70%);
  border-bottom: 1px solid rgba(255, 182, 193, 0.28);
  box-shadow: var(--s2);
}

.rail :focus-visible { outline-color: var(--pink); }

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(150deg, var(--pink), var(--rose));
  color: #26171a;
  text-decoration: none;
  font-family: 'Bodoni Moda', 'Songti SC', Georgia, serif;
  font-size: 17px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--s1);
}

.rail-h {
  display: none;
  margin: 0;
  font-family: 'Bodoni Moda', 'Songti SC', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  color: #fff0f3;
}

.kicker {
  display: block;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--rose-deep);
}

.rail .kicker { display: none; color: var(--pink); }

.menu {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.menu ol {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: max-content;
  min-width: 100%;
}

.menu .sub { display: none; }

.menu .node { flex: 0 0 auto; }

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: #ffdbe2;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 240ms ease, background 240ms ease, border-color 240ms ease;
}

.menu a:hover {
  color: #fff;
  background: rgba(255, 182, 193, 0.14);
  border-bottom-color: var(--pink);
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  background: linear-gradient(150deg, var(--pink), var(--rose));
  color: #26171a;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), var(--s2);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.cta:hover { transform: translateY(-1px); }

/* ---------- 首屏 ---------- */
.main {
  min-width: 0;
  max-width: 100%;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 22px 16px 10px;
}

.lead {
  min-width: 0;
}

.lead .kicker { margin-bottom: 8px; }

.lead h1 {
  margin: 0;
  font-family: 'Bodoni Moda', 'Songti SC', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.95rem, 6vw, 3.2rem);
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: var(--ink);
  overflow-wrap: break-word;
}

.lede {
  max-width: 46ch;
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.collage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  min-height: 190px;
}

.collage .shot {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(150deg, #ffd9e0, var(--rose));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--s2);
  transition: transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.collage .two { transform: translateY(20px); }
.collage.flip .one { transform: translateY(20px); }
.collage.flip .two { transform: translateY(0); }

/* ---------- 正文 ---------- */
.paper {
  min-width: 0;
  max-width: 100%;
  padding: 10px 16px 44px;
}

.prose {
  max-width: 780px;
  min-width: 0;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: break-word;
  word-break: break-word;
}

.prose div {
  margin: 0 0 22px;
  padding: 24px 18px;
  min-width: 0;
  max-width: 100%;
  scroll-margin-top: 78px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-top: 2px solid var(--rose);
  box-shadow: var(--s2);
}

.prose div > small {
  display: block;
  margin-bottom: 6px;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--rose-deep);
}

.prose h2,
.prose h3 {
  margin: 0 0 12px;
  font-family: 'Bodoni Moda', 'Songti SC', Georgia, serif;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: break-word;
}

.prose h2 { font-size: clamp(1.45rem, 4.4vw, 1.85rem); }
.prose h3 { font-size: 1.2rem; }

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

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--s1);
}

.prose figure {
  margin: 16px 0;
  max-width: 100%;
  min-width: 0;
}

.prose blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(255, 182, 193, 0.22);
  border-left: 3px solid var(--rose);
  color: var(--ink-soft);
  overflow-wrap: break-word;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(168, 56, 79, 0.45);
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}

.prose a:hover { text-decoration-color: var(--rose-deep); }

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 16px;
}

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

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 12px 14px;
  background: rgba(38, 23, 26, 0.05);
  border: 1px solid var(--line);
  font-size: 16px;
}

.prose pre,
.prose code { overflow-wrap: anywhere; }

/* ---------- 页脚 ---------- */
.foot {
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
  padding: 34px 16px 26px;
  color: #ffdbe2;
  background: linear-gradient(180deg, #2f1c21 0%, #26171a 100%);
  border-top: 2px solid var(--rose);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  max-width: 780px;
  min-width: 0;
  margin: 0 auto;
}

.foot address {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-style: normal;
  overflow-wrap: break-word;
}

.foot address strong {
  font-family: 'Bodoni Moda', 'Songti SC', Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  color: #fff0f3;
}

.foot address span { color: #f3c9d2; }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  min-width: 0;
  list-style: none;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #ffdbe2;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 182, 193, 0.4);
  transition: color 240ms ease, border-color 240ms ease;
}

.foot-links a:hover {
  color: #fff;
  border-bottom-color: var(--pink);
}

.foot :focus-visible { outline-color: var(--pink); }

.copy {
  max-width: 780px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 16px;
  color: #f3c9d2;
}

/* ---------- 动效 ---------- */
.js .prose div > * {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 280ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .prose div.on > * {
  opacity: 1;
  transform: none;
}

/* ---------- 桌面 ---------- */
@media (min-width: 900px) {
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: var(--rail);
    max-width: var(--rail);
    padding: 30px 20px 26px;
    overflow-x: hidden;
    overflow-y: auto;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 182, 193, 0.24);
  }

  .rail .kicker { display: block; margin-top: 10px; }

  .rail-h { display: block; }

  .menu {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 6px;
    overflow: visible;
  }

  .menu ol {
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
  }

  .menu a {
    padding: 10px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    white-space: normal;
    line-height: 1.4;
    min-height: 42px;
  }

  .menu a:hover {
    border-left-color: var(--pink);
    border-bottom-color: transparent;
  }

  .menu .sub {
    display: none;
    margin: 2px 0 4px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 182, 193, 0.35);
  }

  .menu .sub li { list-style: none; }

  .menu .sub a {
    font-size: 16px;
    color: #f0bfc9;
    min-height: 40px;
  }

  .has-sub:hover > .sub,
  .has-sub:focus-within > .sub { display: block; }

  .cta {
    width: 100%;
    margin-top: auto;
  }

  .main {
    margin-left: var(--rail);
    overflow-x: clip;
  }

  .stage {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.82fr);
    align-items: center;
    gap: 44px;
    min-height: 45vh;
    padding: 46px 56px 34px;
  }

  .lead { grid-column: 1; grid-row: 1; }

  .collage {
    grid-column: 2;
    grid-row: 1;
    gap: 14px;
    min-height: 300px;
  }

  .collage .two { transform: translateY(34px); }
  .collage.flip .one { transform: translateY(34px); }
  .collage.flip .two { transform: translateY(0); }

  .paper { padding: 12px 56px 56px; }

  .prose div {
    padding: 36px 40px;
    margin-bottom: 26px;
    scroll-margin-top: 24px;
  }

  .foot {
    margin-left: var(--rail);
    padding: 46px 56px 30px;
  }

  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
}

@media (min-width: 1200px) {
  :root { --rail: 240px; }
  .prose { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .prose div > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .collage .shot,
  .cta { transition: none; }
}

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