:root {
  --pink: #ff0080;
  --magenta: #ff00ff;
  --ink: #26171f;
  --bg: #1a0e15;
  --card: #2c1b26;
  --card-2: #241621;
  --paper: #fdf3f9;
  --muted: #d9c0d0;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: #ff7cc8;
}

/* ---------- aurora mesh backdrop ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.92;
  filter: saturate(1.15);
}

.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(72px);
  mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}

.aurora i:nth-child(1) {
  width: 68vw;
  height: 68vw;
  left: -16vw;
  top: -20vw;
  background: radial-gradient(circle at 34% 34%, #ff0080, transparent 68%);
}

.aurora i:nth-child(2) {
  width: 56vw;
  height: 56vw;
  right: -14vw;
  top: -10vw;
  background: radial-gradient(circle at 60% 40%, #ff00ff, transparent 66%);
  animation-duration: 32s;
}

.aurora i:nth-child(3) {
  width: 74vw;
  height: 74vw;
  left: 18vw;
  bottom: -34vw;
  background: radial-gradient(circle at 50% 50%, #7b2bff, transparent 70%);
  animation-duration: 38s;
}

.aurora i:nth-child(4) {
  width: 44vw;
  height: 44vw;
  right: 4vw;
  bottom: -14vw;
  background: radial-gradient(circle at 40% 60%, #ff2fa0, transparent 66%);
  animation-duration: 29s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(5vw, 7vh, 0) scale(1.22);
  }
}

/* ---------- top strip ---------- */
.ticker {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #1a0e15;
  background: linear-gradient(90deg, #ff0080, #ff00ff 42%, #ff3fa4 72%, #ff0080);
  background-size: 220% 100%;
  animation: sheen 11s linear infinite;
}

@keyframes sheen {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 220% 0;
  }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(26, 14, 21, 0.74);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 0, 128, 0.22);
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  text-decoration: none;
  overflow: hidden;
  background: conic-gradient(from 200deg, #ff0080, #ff00ff, #7b2bff, #ff0080);
  box-shadow: 0 6px 20px rgba(255, 0, 128, 0.36);
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mark span {
  font-size: 16px;
  font-weight: 700;
  color: #1a0e15;
  letter-spacing: 0.02em;
}

.topnav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-h {
  flex: 0 0 auto;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #ff9dd6;
}

.menu-h span {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 0, 255, 0.14);
}

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

.topnav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav ul::-webkit-scrollbar {
  display: none;
}

.topnav li {
  flex: 0 0 auto;
}

.topnav a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: #f0d9e8;
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: rgba(255, 0, 128, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.num {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #ff74c0;
}

/* ---------- shell ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 18px 0;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 30px;
  align-items: start;
}

.doc {
  min-width: 0;
  counter-reset: sec;
}

/* ---------- hero ---------- */
.doc > .hero {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 26px;
  align-items: center;
  min-height: 70vh;
  padding: 26px 0 30px;
  background: transparent;
}

.hero-art {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  min-height: 330px;
  background: conic-gradient(from 210deg at 44% 40%, #ff0080, #ff00ff, #7b2bff, #ff3fa4, #ff0080);
  box-shadow: 0 22px 60px -24px rgba(255, 0, 255, 0.7);
}

.hero-art .hero-pic {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.mesh {
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 240deg at 50% 50%, #ff0080, #ff00ff, #6f2dff, #ff6ec7, #ff0080);
  animation: swirl 20s linear infinite;
  filter: saturate(1.2);
}

@keyframes swirl {
  to {
    transform: rotate(1turn);
  }
}

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

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(29px, 5vw, 52px);
  line-height: 1.24;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #ffffff, #ffd9ee 46%, #ff5fb4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 auto;
  max-width: 34ch;
  color: #e8cfe0;
  font-size: 17px;
}

/* ---------- content blocks ---------- */
.doc > article {
  scroll-margin-top: 108px;
}

.doc > article:not(.hero) {
  position: relative;
  counter-increment: sec;
  margin-bottom: 20px;
  padding: 26px 24px;
  border-radius: 18px;
  background: var(--card);
  background-image: linear-gradient(150deg, rgba(255, 0, 128, 0.11), rgba(255, 0, 255, 0.05) 58%, transparent);
}

.doc h2 {
  margin: 0 0 14px;
  font-size: clamp(21px, 2.7vw, 27px);
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.doc h2 span,
.doc h3 span {
  background: linear-gradient(92deg, #ff4fae, #ff9df3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.doc > article:not(.hero) h2::before {
  content: counter(sec, decimal-leading-zero);
  display: inline-block;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #ff8ad2;
  background: rgba(255, 0, 128, 0.16);
  vertical-align: middle;
  transform: translateY(-3px);
}

.doc h3 {
  margin: 22px 0 10px;
  font-size: 19px;
  line-height: 1.5;
}

.doc p {
  margin: 0 0 14px;
  max-width: 64ch;
  color: #f4e3ee;
}

.doc p:last-child,
.doc ul:last-child,
.doc ol:last-child {
  margin-bottom: 0;
}

.doc ul,
.doc ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
  max-width: 64ch;
}

.doc li {
  margin: 0.35em 0;
}

.doc li::marker {
  color: #ff4fae;
}

.doc strong {
  color: #fff;
}

.doc a {
  color: #ff86cd;
  text-underline-offset: 3px;
}

.doc img {
  height: auto;
  border-radius: 14px;
  margin: 6px 0 14px;
}

.doc blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--magenta);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 0, 255, 0.1);
  color: #f0dbe8;
}

.doc blockquote p {
  margin: 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 0 0 14px;
}

.doc th,
.doc td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 0, 255, 0.2);
}

.doc code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 0, 255, 0.16);
  font-size: 16px;
}

/* ---------- side rail ---------- */
.side {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 16px 14px;
  border-radius: 18px;
  background: var(--card-2);
  background-image: linear-gradient(200deg, rgba(255, 0, 255, 0.14), transparent 62%);
}

.side-h {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #ff9dd6;
}

.side-h span {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(255, 0, 255, 0.16);
}

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

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  color: #e6cddd;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  background: rgba(255, 0, 128, 0.2);
  color: #fff;
}

/* ---------- back to top ---------- */
.totop {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  font-size: 16px;
  font-weight: 700;
  color: #1a0e15;
  text-decoration: none;
  background: linear-gradient(100deg, #ff0080, #ff00ff);
  box-shadow: 0 10px 26px -8px rgba(255, 0, 128, 0.75);
}

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  margin-top: 56px;
  border-top: 1px solid rgba(255, 0, 255, 0.24);
  background: linear-gradient(180deg, rgba(255, 0, 128, 0.12), rgba(26, 14, 21, 0.96) 62%);
}

footer {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.1fr;
  gap: 24px;
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
  padding: 38px 18px 22px;
}

.fbrand {
  margin: 0;
  font-size: clamp(26px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(94deg, #ff0080, #ff00ff 70%, #ff8ad2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fnav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
}

.fnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  color: #e6cddd;
  text-decoration: none;
  font-size: 16px;
}

.fnav a:hover,
.fnav a:focus-visible {
  background: rgba(255, 0, 128, 0.18);
  color: #fff;
}

.fdesc {
  margin: 0;
  color: #c6aabb;
  font-size: 16px;
}

footer small {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
  font-size: 16px;
  color: #bb9db1;
}

/* ---------- reveal ---------- */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s ease, transform 0.62s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .aurora i,
  .mesh,
  .ticker {
    animation: none;
  }
  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .side {
    display: none;
  }
  .doc > .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 18px 0 24px;
  }
  .hero-art,
  .hero-art .hero-pic {
    min-height: 220px;
    border-radius: 22px;
  }
  footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }
  .wrap {
    padding: 14px 14px 0;
  }
  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }
  .menu-h {
    font-size: 13px;
    letter-spacing: 0.1em;
  }
  .doc > article:not(.hero) {
    padding: 20px 16px;
    border-radius: 18px;
  }
  .doc > article:not(.hero) h2::before {
    margin-right: 8px;
  }
  .hero-art,
  .hero-art .hero-pic {
    min-height: 180px;
  }
  .foot {
    margin-top: 40px;
  }
  .totop {
    right: 12px;
    bottom: 12px;
    padding: 0 14px;
  }
}

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