:root {
  --pink: #FF5C8A;
  --sun: #FFC94D;
  --ink: #2E2A4A;
  --ink-deep: #241F3E;
  --paper: #FFF7F3;
  --text: #F7F2FA;
  --dim: rgba(247, 242, 250, .74);
  --line: rgba(255, 255, 255, .14);
  --r: 10px;
}

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

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

body {
  margin: 0;
  font-family: "Nunito", "DM Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--ink);
  background-image:
    radial-gradient(62vw 62vw at 88% -12%, rgba(255, 92, 138, .30), transparent 62%),
    radial-gradient(54vw 54vw at -12% 28%, rgba(255, 201, 77, .18), transparent 62%);
  background-attachment: fixed;
  overflow-x: clip;
}

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

a {
  color: #FF87A9;
  text-decoration: none;
}

a:hover {
  color: var(--sun);
}

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* 顶栏 */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem 1rem;
  padding: .5rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(36, 31, 62, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  color: var(--text);
}

.brand:hover {
  color: var(--sun);
}

.dot {
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--pink), var(--sun));
  box-shadow: 0 4px 12px rgba(255, 92, 138, .55);
}

.top nav {
  flex: 1 1 100%;
  min-width: 0;
}

.top nav p {
  display: flex;
  gap: .12rem;
  margin: 0;
  padding-bottom: .15rem;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
  color: var(--text);
}

.top nav a:hover {
  background: var(--pink);
  color: #211A33;
}

@media (min-width: 860px) {
  .top {
    gap: 1rem;
  }

  .top nav {
    flex: 1 1 auto;
    margin-left: auto;
  }

  .top nav p {
    justify-content: flex-end;
    overflow: visible;
  }
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.6rem;
  min-height: 100vh;
  padding: 2.2rem 0 3rem;
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: 13%;
  height: clamp(64px, 11vh, 140px);
  background: linear-gradient(90deg, var(--pink), var(--sun));
  transform: skewY(-7deg);
  border-radius: var(--r);
  opacity: .92;
}

.hero .copy {
  position: relative;
}

.hero h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.1rem, 7.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  background-image: linear-gradient(100deg, #FFFFFF 0%, var(--sun) 40%, var(--pink) 76%, #FFFFFF 100%);
  background-size: 230% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    heroIn .9s cubic-bezier(.2, .75, .25, 1) both,
    shimmer 9s linear .9s infinite;
}

.hero .lead {
  margin: 1rem 0 0;
  max-width: 33ch;
  font-size: 1.05rem;
  color: var(--dim);
  animation: heroIn .9s cubic-bezier(.2, .75, .25, 1) .14s both;
}

@keyframes heroIn {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@keyframes shimmer {
  to {
    background-position: 240% 0;
  }
}

.heap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  align-items: center;
  margin-top: .2rem;
}

.shot {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--r);
  border: 3px solid rgba(255, 255, 255, .55);
  background: linear-gradient(160deg, rgba(255, 92, 138, .38), rgba(255, 201, 77, .22));
  box-shadow: 0 22px 40px rgba(12, 8, 30, .46);
  transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}

.shot:first-child {
  transform: rotate(-5deg) translateY(-4%);
}

.shot:nth-child(2) {
  transform: rotate(4deg) translateY(6%);
}

.shot:hover {
  transform: rotate(0deg) translateY(-2%);
}

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

@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: center;
    column-gap: 2.6rem;
  }

  .hero .copy {
    order: 2;
    text-align: right;
  }

  .hero .lead {
    margin-left: auto;
  }

  .heap {
    order: 1;
  }
}

/* 字块带 */
.tape {
  overflow: hidden;
  margin-top: .4rem;
  padding: .5rem 0;
  border-top: 2px dashed var(--line);
  border-bottom: 2px dashed var(--line);
}

.tape-track {
  display: flex;
  gap: 1.6rem;
  width: max-content;
  animation: slide 24s linear infinite;
}

.tape span {
  font-weight: 900;
  font-size: clamp(1.5rem, 4.2vw, 2.6rem);
  letter-spacing: -.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--pink);
}

.tape span:nth-child(even) {
  color: var(--sun);
  -webkit-text-stroke: 0;
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* 正文区 */
.shell {
  display: grid;
  gap: 2rem;
  padding: clamp(2rem, 6vw, 4rem) 0;
}

@media (min-width: 1000px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) 272px;
    align-items: start;
    gap: 2.4rem;
  }
}

.prose {
  min-width: 0;
  background: var(--paper);
  color: #2A2543;
  border-radius: var(--r);
  padding: clamp(1.1rem, 3vw, 2.4rem);
  box-shadow: 0 24px 46px rgba(10, 6, 26, .42);
}

.prose [id] {
  scroll-margin-top: 112px;
}

.prose section {
  padding-block: clamp(1.2rem, 3vw, 2rem);
  border-top: 2px dashed rgba(46, 42, 74, .16);
}

.prose section:first-child {
  padding-top: 0;
  border-top: 0;
}

.prose h2 {
  margin: 0 0 .4rem;
  font-size: clamp(1.35rem, 3.4vw, 1.95rem);
  line-height: 1.26;
  letter-spacing: -.02em;
  color: var(--ink);
}

.prose h2::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 6px;
  margin-top: .55rem;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--pink), var(--sun));
}

.prose h3 {
  margin: 1.3rem 0 .35rem;
  font-size: 1.1rem;
  color: var(--ink-deep);
}

.prose p {
  margin: .85rem 0;
  line-height: 1.85;
}

.prose ul,
.prose ol {
  margin: .85rem 0;
  padding-left: 1.25rem;
  line-height: 1.85;
}

.prose li {
  margin: .35rem 0;
}

.prose a {
  color: #D32F6B;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #A8184E;
}

.prose strong {
  color: var(--ink-deep);
}

.prose blockquote {
  margin: 1rem 0;
  padding: .7rem 1rem;
  border-left: 5px solid var(--sun);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 201, 77, .2);
}

.prose blockquote p {
  margin: .3rem 0;
}

.prose img {
  border-radius: var(--r);
}

/* 右栏 */
.rail {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 18px 34px rgba(10, 6, 26, .32);
}

@media (min-width: 1000px) {
  .rail {
    position: sticky;
    top: 104px;
  }
}

.rail-h {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: .04em;
  color: var(--text);
}

.rail .subtitle {
  margin: .2rem 0 .85rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--sun);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .12rem;
  counter-reset: rail;
}

.rail-list li {
  counter-increment: rail;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 42px;
  padding: .3rem .55rem;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: .8rem;
  font-weight: 900;
  color: var(--pink);
}

.rail-list a:hover {
  background: rgba(255, 92, 138, .18);
  color: var(--sun);
}

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: .7rem;
  padding: 0 .55rem;
  font-weight: 800;
  font-size: .95rem;
  color: var(--sun);
}

/* 页脚 */
.foot {
  margin-top: 2.5rem;
  padding: 2.2rem clamp(1rem, 4vw, 2.5rem) 1.2rem;
  border-top: 2px solid var(--line);
  background: rgba(0, 0, 0, .22);
}

.foot-in {
  max-width: 1200px;
  margin: 0 auto;
}

.foot-big {
  margin: 0 0 1.6rem;
  font-weight: 900;
  font-size: clamp(2rem, 9vw, 5rem);
  line-height: .96;
  letter-spacing: -.04em;
  background-image: linear-gradient(92deg, var(--pink), var(--sun));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-cols {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 760px) {
  .foot-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.foot-cols dl {
  margin: 0;
}

.foot-cols dt {
  margin-bottom: .45rem;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--sun);
}

.foot-cols dd {
  margin: 0;
}

.foot-cols dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .1rem 0;
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
}

.foot-cols dd a:hover {
  color: var(--pink);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: var(--dim);
  font-size: .95rem;
}

.foot-base .copy {
  margin: 0;
  font-weight: 700;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .4rem;
  font-weight: 800;
  color: var(--sun);
}

/* 滚动显现 */
.js .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

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