:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --deep: #1c1011;
  --fg: #fdf3f4;
  --muted: #ddbcc5;
  --card: rgba(32, 18, 19, 0.66);
  --line: rgba(255, 255, 255, 0.1);
  --r: 18px;
  --pad: clamp(1.15rem, 5vw, 3.5rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--deep);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 5.75rem;
  font-family: 'Poppins', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--fg);
  background: var(--deep);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -22vmax;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 45% at 22% 18%, #ff0000 0%, transparent 62%),
    radial-gradient(50% 50% at 78% 12%, #ff1493 0%, transparent 60%),
    radial-gradient(55% 55% at 55% 88%, #ff1493 0%, transparent 58%),
    radial-gradient(40% 40% at 15% 82%, #ff0000 0%, transparent 60%);
  background-size: 200% 200%;
  filter: blur(72px) saturate(1.2);
  opacity: 0.5;
  animation: aurora 11s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { background-position: 0% 0%, 100% 0%, 50% 100%, 0% 100%; transform: scale(1) rotate(0deg); }
  100% { background-position: 30% 40%, 60% 30%, 30% 60%, 40% 30%; transform: scale(1.16) rotate(6deg); }
}

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

a {
  color: #ff8ec4;
  text-decoration: underline;
  text-decoration-color: rgba(255, 20, 147, 0.55);
  text-underline-offset: 3px;
}

a:hover { color: #ffd0e6; }

:focus-visible {
  outline: 2px solid #ff8ec4;
  outline-offset: 3px;
  border-radius: 6px;
}

main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.6rem);
  padding: 0 0 2rem;
}

main > article {
  animation: rise 0.65s cubic-bezier(0.22, 0.68, 0, 1) both;
}

main > article:nth-child(2) { animation-delay: 0.06s; }
main > article:nth-child(3) { animation-delay: 0.12s; }
main > article:nth-child(4) { animation-delay: 0.18s; }
main > article:nth-child(5) { animation-delay: 0.24s; }
main > article:nth-child(6) { animation-delay: 0.3s; }
main > article:nth-child(7) { animation-delay: 0.36s; }
main > article:nth-child(8) { animation-delay: 0.42s; }
main > article:nth-child(9) { animation-delay: 0.48s; }
main > article:nth-child(10) { animation-delay: 0.54s; }

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

article[id] { scroll-margin-top: 2rem; }

main > article:not(.hero):not(.outro) {
  width: calc(100% - 2rem);
  max-width: 60rem;
  margin-inline: auto;
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 22px 50px -30px #000;
  backdrop-filter: blur(4px);
}

/* 首屏 */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0 0 50% 50% / 0 0 72px 72px;
}

.hero-fig {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: -2;
  background: linear-gradient(140deg, #3d1518, #261717 58%, #4b1028);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(1.15) contrast(1.05);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 70% at 82% 62%, rgba(255, 20, 147, 0.3), transparent 70%),
    linear-gradient(to top, rgba(28, 16, 17, 0.94), rgba(28, 16, 17, 0.12) 62%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.6;
  background-image:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.17) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.17) 0 1px, transparent 1px 46px);
  -webkit-mask-image: radial-gradient(120% 90% at 72% 32%, #000 18%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 72% 32%, #000 18%, transparent 78%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 66rem;
  margin-left: auto;
  padding: 7rem var(--pad) 8rem;
  text-align: right;
}

h1 {
  font-family: 'Righteous', 'Poppins', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: clamp(2rem, 8vw, 4.4rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.8rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.hero .subtitle {
  margin: 0 0 0 auto;
  max-width: 40rem;
  color: #f2d6dc;
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.subtitle {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* 目录 + 配图 */
.outro {
  width: calc(100% - 2rem);
  max-width: 60rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 1.6rem);
  align-items: stretch;
}

.jump {
  padding: clamp(1.1rem, 3vw, 1.75rem);
  background: rgba(38, 23, 23, 0.74);
  border: 1px solid rgba(255, 20, 147, 0.28);
  border-radius: var(--r);
  box-shadow: 0 18px 45px -26px #000;
}

.jump h2 { margin: 0 0 0.35rem; }
.jump .subtitle { margin: 0 0 1rem; font-size: 1rem; }

.jump-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.jump-list a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #f9e8ec;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.jump-list a:hover,
.jump-list a.on {
  background: rgba(255, 20, 147, 0.16);
  border-color: rgba(255, 20, 147, 0.38);
  color: #fff;
}

.jump-list .n {
  font-family: 'Righteous', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: #ff7ab0;
}

.outro-fig {
  margin: 0;
  min-height: 240px;
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(150deg, #45161c, #2a1414 52%, #52122f);
  box-shadow: 0 18px 45px -26px #000;
}

.outro-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

/* 正文 */
main h2 {
  font-family: 'Righteous', 'Poppins', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.28;
  margin: 0 0 0.5rem;
}

main h2::after {
  content: "";
  display: block;
  width: 62px;
  height: 4px;
  margin-top: 0.6rem;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--red), var(--pink));
}

main h3 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.5rem;
  color: #ffe4ee;
}

main p { margin: 0 0 1rem; }
main ul, main ol { margin: 0 0 1rem; padding-left: 1.35rem; }
main li { margin: 0 0 0.4rem; }
main strong { color: #ffdcea; }

main blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 4px solid var(--pink);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 20, 147, 0.1);
}

main figure { margin: 1.25rem 0; }
main figure img { border-radius: var(--r); }

/* 页脚 */
.foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  margin-top: 2.5rem;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem) 1.25rem;
  background: rgba(20, 11, 12, 0.92);
  border-top: 1px solid rgba(255, 20, 147, 0.3);
}

.foot-col h2 {
  font-family: 'Righteous', 'Poppins', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: 'Righteous', 'Poppins', system-ui, sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
}

.foot-desc {
  margin: 0.4rem 0 0;
  font-size: 1rem;
  color: var(--muted);
}

.foot nav dl {
  margin: 0;
  display: grid;
  gap: 0.15rem;
}

.foot nav dt { margin: 0; }

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0;
  font-size: 1rem;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot nav a:hover {
  color: #ffd0e6;
  border-bottom-color: rgba(255, 20, 147, 0.6);
}

.sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sub input {
  flex: 1 1 9rem;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.sub input::placeholder { color: #c9abb3; }

.sub button {
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--red), var(--pink));
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.sub button:hover { filter: saturate(1.15) brightness(1.05); }

.copybar {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.copybar p {
  margin: 0;
  font-size: 1rem;
  color: #c8aab2;
}

/* 底部固定条 */
.dock {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: rgba(24, 13, 14, 0.9);
  border-top: 1px solid rgba(255, 20, 147, 0.38);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 -14px 34px -22px #000;
}

.dock-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  font-family: 'Righteous', 'Poppins', system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
}

.dock-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dock-links::-webkit-scrollbar { display: none; }

.dock-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  font-size: 1rem;
  white-space: nowrap;
  color: #e6c9d2;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.dock-links a:hover,
.dock-links a.on {
  color: #fff;
  background: rgba(255, 20, 147, 0.24);
}

@media (max-width: 760px) {
  .hero { border-radius: 0 0 50% 50% / 0 0 44px 44px; }
  .hero-copy { padding: 6rem 1.15rem 8rem; }
  .outro { grid-template-columns: 1fr; }
  .outro-fig { min-height: 190px; order: -1; }
  .foot { grid-template-columns: 1fr; }
  .dock { gap: 0.35rem; padding: 0.45rem 0.5rem; }
  .dock-mark { font-size: 0.95rem; padding: 0 0.35rem; }
  .dock-links a { padding: 0.55rem 0.6rem; }
}

@media (max-width: 420px) {
  body { font-size: 1rem; }
  main > article:not(.hero):not(.outro) { width: calc(100% - 1.4rem); }
  .outro { width: calc(100% - 1.4rem); }
}

@media (min-width: 900px) {
  .dock { padding-inline: 1.5rem; }
  .dock-links { gap: 0.25rem; }
  .dock-links a { padding-inline: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}

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