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

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

:root {
  --ink: #26171a;
  --ink-2: #1f1216;
  --rose: #eb879c;
  --rose-2: #ffb6c1;
  --text: #f8eaee;
  --mute: #d9bcc2;
  --line: rgba(255, 182, 193, 0.22);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.1);
  --r: 28px;
  --soft: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 46px -22px rgba(235, 135, 156, 0.45);
  --font-b: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-h: 'Rubik', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-color: var(--ink);
  background-image:
    radial-gradient(46vw 46vw at 84% 2%, rgba(235, 135, 156, 0.22), transparent 70%),
    radial-gradient(40vw 40vw at 4% 58%, rgba(255, 182, 193, 0.14), transparent 72%),
    radial-gradient(34vw 34vw at 60% 96%, rgba(235, 135, 156, 0.13), transparent 70%),
    linear-gradient(180deg, #2b1a1e, #26171a 48%, var(--ink-2));
  background-attachment: fixed;
}

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

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

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

menu { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-h); line-height: 1.22; letter-spacing: -0.01em; }

.shell { padding-left: 88px; }

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.028));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--line);
}

.mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass-2);
  color: var(--rose-2);
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  box-shadow: var(--soft);
  transition: transform 240ms ease, background 240ms ease;
}

.mark:hover { transform: translateY(-2px) rotate(-3deg); background: rgba(255, 182, 193, 0.22); }

.drop { position: relative; margin-top: 4px; }

.drop summary {
  width: 46px;
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 12px 0;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.22em;
  writing-mode: vertical-rl;
  cursor: pointer;
  list-style: none;
  transition: background 240ms ease, border-color 240ms ease;
}

.drop summary::-webkit-details-marker { display: none; }
.drop summary:hover { background: var(--glass-2); border-color: rgba(255, 182, 193, 0.45); }
.drop[open] summary { background: rgba(255, 182, 193, 0.2); border-color: var(--rose); }

.drop menu {
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  width: 216px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(38, 23, 26, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--soft);
}

.drop:not([open]) menu { display: none; }

.drop menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
  transition: background 220ms ease, transform 220ms ease, color 220ms ease;
}

.drop menu a:hover { background: var(--glass-2); color: var(--rose-2); transform: translateX(3px); }
.drop menu li { animation: fadeUp 260ms both; }
.drop menu li:nth-child(2) { animation-delay: 30ms; }
.drop menu li:nth-child(3) { animation-delay: 60ms; }
.drop menu li:nth-child(4) { animation-delay: 90ms; }
.drop menu li:nth-child(5) { animation-delay: 120ms; }
.drop menu li:nth-child(6) { animation-delay: 150ms; }
.drop menu li:nth-child(7) { animation-delay: 180ms; }

.rail-cta {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--rose), var(--rose-2));
  color: #2a1418;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 14px 34px -14px rgba(235, 135, 156, 0.85);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.rail-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(255, 182, 193, 0.9); }

/* ---------- hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  min-height: 45vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 28px;
  scroll-margin-top: 90px;
}

.hero-collage {
  position: relative;
  flex: 0 0 auto;
  width: min(46%, 370px);
  height: 232px;
  animation: pop 520ms ease both;
}

.shot {
  position: absolute;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--soft);
}

.shot1 { width: 56%; height: 88%; left: 0; top: 0; transform: rotate(-4deg); }
.shot2 { width: 50%; height: 78%; right: 0; bottom: 0; transform: rotate(5deg); border-color: rgba(255, 182, 193, 0.45); }

.blob {
  position: absolute;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--soft);
}

.blob.b1 {
  inset: 0 42% 34% 0;
  transform: rotate(-4deg);
  background: linear-gradient(140deg, rgba(235, 135, 156, 0.55), rgba(235, 135, 156, 0.08));
}

.blob.b2 {
  inset: 34% 0 0 44%;
  transform: rotate(5deg);
  background: linear-gradient(200deg, rgba(255, 182, 193, 0.5), rgba(255, 182, 193, 0.06));
}

.hero-say { flex: 1 1 auto; text-align: right; animation: fadeUp 520ms ease both; }

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  color: #fdf2f5;
  text-shadow: 0 10px 34px rgba(235, 135, 156, 0.35);
}

.slash {
  height: 54px;
  background: linear-gradient(90deg, var(--rose), var(--rose-2));
  clip-path: polygon(0 0, 100% 0, 100% 30%, 0 100%);
  opacity: 0.92;
}

/* ---------- 主体：侧栏在左 + 正文 ---------- */
main {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 56px;
  align-items: start;
}

.side {
  position: sticky;
  top: 22px;
  padding: 20px 18px 22px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--soft);
}

.side small {
  display: block;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--rose-2);
  margin-bottom: 4px;
}

.side h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: #fdf2f5;
}

.toc { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }

.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 14px;
  color: var(--mute);
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.toc a:hover { background: var(--glass-2); color: var(--text); transform: translateX(3px); }

.toc li { animation: fadeUp 260ms both; }
.toc li:nth-child(2) { animation-delay: 30ms; }
.toc li:nth-child(3) { animation-delay: 60ms; }
.toc li:nth-child(4) { animation-delay: 90ms; }
.toc li:nth-child(5) { animation-delay: 120ms; }
.toc li:nth-child(6) { animation-delay: 150ms; }
.toc li:nth-child(7) { animation-delay: 180ms; }

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

.prose > section {
  position: relative;
  margin: 0 0 26px;
  padding: 30px 30px 34px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--soft);
  scroll-margin-top: 96px;
}

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

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(23px, 2.8vw, 30px);
  font-weight: 600;
  color: #fdf2f5;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--rose-2);
}

.prose h4 { margin: 20px 0 8px; font-size: 18px; }

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

.prose ul,
.prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }

.prose a { color: var(--rose-2); text-decoration-color: rgba(255, 182, 193, 0.5); text-underline-offset: 3px; }
.prose a:hover { color: #ffe3e9; }

.prose strong { color: #ffe7ed; }

.prose blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  border-radius: 18px;
  border-left: 4px solid var(--rose);
  background: rgba(255, 182, 193, 0.09);
  color: var(--mute);
}

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

.prose img { border-radius: 20px; border: 1px solid var(--line); }

.prose hr { border: 0; height: 1px; background: var(--line); margin: 26px 0; }

.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 16px; }
.prose th,
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }

.js .prose > section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.js .prose > section.in { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.foot { max-width: 1180px; margin: 0 auto; padding: 22px 24px 44px; }

.foot-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 106px;
  padding: 22px 34px;
  border-radius: var(--r);
  background: linear-gradient(100deg, var(--rose), var(--rose-2));
  color: #2a1418;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 26px);
  text-decoration: none;
  box-shadow: 0 22px 54px -24px rgba(235, 135, 156, 0.9);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.foot-cta:hover { transform: translateY(-3px); box-shadow: 0 28px 60px -22px rgba(255, 182, 193, 0.95); }
.foot-cta .arw { font-size: 30px; line-height: 1; }

.foot-cols {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.foot address {
  font-style: normal;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 19px;
  color: var(--rose-2);
  line-height: 1.5;
}

.foot ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.foot ul a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 12px;
  color: var(--mute);
  font-size: 16px;
  text-decoration: none;
  transition: color 220ms ease, background 220ms ease;
}

.foot ul a:hover { color: var(--text); background: var(--glass-2); }

.copy { margin: 22px 0 0; text-align: center; font-size: 15px; color: var(--mute); }
.copy a { color: var(--rose-2); text-underline-offset: 3px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 880px) {
  .shell { padding-left: 0; padding-top: 68px; }

  .rail {
    right: 0;
    bottom: auto;
    width: 100%;
    height: 68px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mark { width: 44px; height: 44px; }

  .drop { margin-top: 0; }

  .drop summary {
    width: auto;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    writing-mode: horizontal-tb;
    letter-spacing: 0.14em;
    font-size: 16px;
  }

  .drop menu {
    top: calc(100% + 10px);
    left: auto;
    right: 0;
    width: min(84vw, 260px);
  }

  .rail-cta { right: 14px; bottom: 14px; padding: 12px 20px; }

  .hero {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    min-height: 0;
    padding: 24px 18px 18px;
  }

  .hero-collage { width: 100%; height: 152px; }
  .hero-say { text-align: left; }
  .hero h1 { font-size: clamp(28px, 8vw, 38px); }

  .slash { height: 34px; }

  main { grid-template-columns: 1fr; gap: 18px; padding: 22px 18px 40px; }

  .side { position: static; }

  .toc { grid-template-columns: 1fr 1fr; }
  .toc a { font-size: 15px; }

  .prose > section { padding: 22px 20px 26px; }

  .foot { padding: 18px 18px 36px; }
  .foot-cols { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .prose > section { opacity: 1; transform: none; }
}

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