:root {
  --ink: #26171a;
  --ink-2: #553a40;
  --rose: #eb879c;
  --pink: #ffb6c1;
  --paper: #fdf5f6;
  --glass: rgba(255, 255, 255, 0.62);
  --line: rgba(38, 23, 26, 0.13);
  --line-rose: rgba(235, 135, 156, 0.42);
  --sh-1: 0 1px 2px rgba(38, 23, 26, 0.06);
  --sh-2: 0 14px 34px -22px rgba(38, 23, 26, 0.45);
  --sh-3: 0 22px 48px -30px rgba(38, 23, 26, 0.5);
  --r: 4px;
  --serif: 'Libre Bodoni', 'Times New Roman', Georgia, serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 48vh at 88% -12%, rgba(255, 182, 193, 0.62), transparent 70%),
    radial-gradient(52vw 44vh at 4% 18%, rgba(235, 135, 156, 0.3), transparent 72%),
    radial-gradient(64vw 52vh at 62% 106%, rgba(255, 182, 193, 0.46), transparent 74%);
}

a {
  color: var(--ink);
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.005em;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r);
}

.skip {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 90;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r);
  text-decoration: none;
  transition: top 0.22s ease;
}

.skip:focus {
  top: 12px;
}

.shell {
  display: block;
  min-width: 0;
}

/* ---------- 左侧竖排导航 ---------- */

.rail {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(253, 245, 246, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line-rose);
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(150deg, var(--pink), var(--rose));
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.mark img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.rail nav {
  flex: 1 1 auto;
  min-width: 0;
}

.rail nav p {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.rail nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.rail nav a:hover,
.rail nav a:focus-visible {
  background: var(--pink);
  border-color: var(--rose);
  transform: translateY(-1px);
  box-shadow: var(--sh-1);
}

.find {
  display: none;
}

/* ---------- 首屏 ---------- */

main {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 26px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 92px 20px 34px;
  text-align: center;
}

.hero-copy {
  max-width: 32ch;
  padding-top: 4px;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 8.6vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero-art {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 520px;
  align-self: stretch;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(160deg, rgba(255, 182, 193, 0.55), rgba(235, 135, 156, 0.3));
  box-shadow: var(--sh-2), var(--sh-3);
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 34vh;
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform;
}

.art-fill {
  display: block;
  min-height: 34vh;
  background: radial-gradient(72% 72% at 50% 40%, rgba(255, 255, 255, 0.7), transparent 72%);
}

/* ---------- 正文与右侧栏 ---------- */

.body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 20px 60px;
}

.prose {
  min-width: 0;
}

.prose > div {
  position: relative;
  margin: 0 0 24px;
  padding: 26px 20px 28px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r);
  box-shadow: var(--sh-1), var(--sh-2);
  scroll-margin-top: 88px;
  transition: box-shadow 0.26s ease;
}

.prose > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, var(--rose), var(--pink), transparent);
}

.prose > div.flash {
  box-shadow: 0 0 0 3px var(--rose), var(--sh-2);
}

.prose h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.42rem, 4.6vw, 1.85rem);
  line-height: 1.25;
}

.prose h2 + hr {
  width: 62px;
  height: 3px;
  margin: 0 0 18px;
  border: 0;
  border-radius: 2px;
  background: var(--rose);
}

.prose h3 {
  margin: 26px 0 8px;
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.35;
}

.prose h3 + hr {
  width: 40px;
  height: 2px;
  margin: 0 0 14px;
  border: 0;
  background: var(--pink);
}

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

.prose p {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose li {
  margin: 0.3em 0;
}

.prose figure {
  margin: 18px 0;
  overflow: hidden;
  border-radius: var(--r);
}

.prose img {
  display: block;
  height: auto;
  border-radius: var(--r);
}

.prose blockquote {
  margin: 18px 0;
  padding: 12px 0 12px 16px;
  border-left: 3px solid var(--rose);
  color: var(--ink-2);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

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

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--rose);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.prose a:hover {
  background: rgba(255, 182, 193, 0.35);
}

.side {
  align-self: start;
  padding: 20px 18px 22px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r);
  box-shadow: var(--sh-1), var(--sh-2);
}

.side h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.18rem;
}

.side h2 + hr {
  width: 44px;
  height: 3px;
  margin: 0 0 14px;
  border: 0;
  border-radius: 2px;
  background: var(--rose);
}

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

.side li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-left: 3px solid transparent;
  border-radius: var(--r);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.side li a:hover {
  background: rgba(255, 182, 193, 0.34);
  border-left-color: var(--rose);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.totop:hover {
  background: var(--pink);
}

/* ---------- 页脚 ---------- */

footer {
  margin-top: 20px;
  padding: 30px 20px 42px;
  border-top: 1px solid var(--line-rose);
  background: rgba(255, 255, 255, 0.56);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.f-cols {
  display: grid;
  gap: 14px;
}

.f-brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}

.f-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
}

.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.f-links a:hover {
  background: var(--pink);
}

.f-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.f-base small {
  font-size: 1rem;
}

.f-base a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  border-bottom: 2px solid var(--rose);
}

/* ---------- 桌面端 ---------- */

@media (min-width: 720px) {
  .f-cols {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 24px;
  }
}

@media (min-width: 900px) {
  .rail {
    right: auto;
    bottom: 0;
    width: 264px;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px 20px 26px;
    overflow-y: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line-rose);
  }

  .rail nav p {
    flex-wrap: wrap;
    overflow: visible;
  }

  .find {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
  }

  .find input {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
  }

  .find button {
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--rose);
    background: var(--rose);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.22s ease, transform 0.22s ease;
  }

  .find button:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
  }

  .shell {
    padding-left: 264px;
  }

  .hero {
    padding: 52px 48px 44px;
  }

  .hero-copy {
    max-width: 36ch;
  }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  }

  .hero-art {
    max-width: 660px;
    max-height: 46vh;
  }

  .prose > div {
    padding: 34px 32px 36px;
    scroll-margin-top: 28px;
  }

  footer {
    padding: 36px 44px 48px;
  }
}

@media (min-width: 1000px) {
  .body {
    grid-template-columns: minmax(0, 1fr) 272px;
    gap: 40px;
    align-items: start;
    padding: 10px 44px 96px;
  }

  .side {
    position: sticky;
    top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .hero-img {
    transform: none !important;
  }
}

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