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

:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --glass: rgba(38, 23, 23, .5);
  --line: rgba(255, 255, 255, .15);
  --txt: #f9edef;
  --dim: rgba(249, 237, 239, .76);
  --r: 10px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--txt);
  background: #170e10;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(38% 42% at 20% 24%, rgba(255, 0, 0, .62), transparent 68%),
    radial-gradient(34% 38% at 76% 16%, rgba(255, 20, 147, .58), transparent 70%),
    radial-gradient(48% 46% at 62% 78%, rgba(255, 140, 60, .34), transparent 72%),
    radial-gradient(40% 38% at 22% 84%, rgba(255, 20, 147, .42), transparent 70%);
  background-size: 200% 200%;
  filter: saturate(1.25) blur(48px);
  animation: aurora 11s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { background-position: 0% 30%; transform: translate3d(0, 0, 0) scale(1); }
  50% { background-position: 62% 62%; transform: translate3d(-2%, 1%, 0) scale(1.07); }
  100% { background-position: 100% 18%; transform: translate3d(2%, -1%, 0) scale(1.02); }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .17) .9px, transparent .9px);
  background-size: 13px 13px;
  opacity: .22;
  -webkit-mask-image: radial-gradient(125% 100% at 50% 0%, #000 18%, transparent 86%);
  mask-image: radial-gradient(125% 100% at 50% 0%, #000 18%, transparent 86%);
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  align-items: start;
}

/* 左侧竖排导航栏 */
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 16px 28px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 23, 23, .74), rgba(23, 14, 16, .58));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.rail::-webkit-scrollbar { width: 0; height: 0; }

.mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: linear-gradient(140deg, var(--red), var(--pink));
  color: #fff;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(255, 20, 147, .35);
}

.mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r);
}

.find input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .07);
  color: var(--txt);
  font: inherit;
  font-size: 16px;
}

.find input::placeholder { color: rgba(255, 255, 255, .5); }

.find input:focus {
  outline: 2px solid rgba(255, 20, 147, .55);
  outline-offset: 1px;
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--dim);
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

.rail-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
}

.rail-nav a.on {
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
  background: linear-gradient(100deg, rgba(255, 0, 0, .38), rgba(255, 20, 147, .38));
}

.fold > summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 16px;
  color: rgba(255, 255, 255, .58);
  letter-spacing: .06em;
  cursor: pointer;
  list-style: none;
}

.fold > summary::-webkit-details-marker { display: none; }

.fold > summary::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s ease;
}

.fold[open] > summary::after { transform: rotate(-135deg); }

.sub {
  margin-left: 6px !important;
  padding-left: 8px !important;
  border-left: 1px solid rgba(255, 255, 255, .13);
}

li.off { display: none; }

.col { min-width: 0; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 44px) 40px;
}

/* 首屏 */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-block: clamp(24px, 6vh, 56px);
}

.hero-in {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
  width: 100%;
}

.hero-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(255, 0, 0, .4), rgba(255, 20, 147, .32));
  box-shadow: 0 24px 64px rgba(0, 0, 0, .48);
}

.hero-fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fig.turn img {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: turn 15s linear infinite;
}

.hero-fig.turn img:first-child { opacity: 1; }

@keyframes turn {
  0% { opacity: 0; }
  6% { opacity: 1; }
  28% { opacity: 1; }
  34% { opacity: 0; }
  100% { opacity: 0; }
}

.hero-txt {
  text-align: right;
  min-width: 0;
}

h1 {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(2rem, 5.2vw, 3.7rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: #fff;
  background: linear-gradient(100deg, #fff 0%, #ffd7e8 46%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

/* 正文玻璃卡片 */
.body-sec { padding-block: 8px 40px; }

.sheet {
  padding: clamp(18px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .38);
  overflow-wrap: break-word;
}

.sheet-head h2 { margin-bottom: .25em; }

.sheet h2 {
  margin: 0 0 .5em;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 600;
  line-height: 1.32;
  color: #fff;
  letter-spacing: .01em;
}

.sheet div h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 3px;
  background: linear-gradient(140deg, var(--red), var(--pink));
  vertical-align: baseline;
}

.subtitle {
  margin: 0 0 18px;
  max-width: 70ch;
  color: rgba(255, 255, 255, .74);
  font-size: 1rem;
  line-height: 1.75;
}

.sheet > div {
  padding-block: clamp(20px, 3vw, 32px);
  border-top: 1px solid rgba(255, 255, 255, .13);
}

.sheet > div:first-of-type {
  padding-top: 4px;
  border-top: 0;
}

div[id] { scroll-margin-top: 96px; }

.sheet p {
  margin: 0 0 1em;
  max-width: 70ch;
  color: var(--dim);
}

.sheet div p:last-child { margin-bottom: 0; }

.sheet ul,
.sheet ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
  max-width: 70ch;
  color: var(--dim);
}

.sheet li { margin-bottom: .4em; }
.sheet li::marker { color: var(--pink); }

.sheet a {
  color: #ffd0e4;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 208, 228, .5);
}

.sheet a:hover { color: #fff; }

.sheet strong { color: #fff; }

.sheet blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 255, 255, .06);
}

.sheet blockquote p { margin-bottom: 0; }

.sheet img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border-radius: var(--r);
}

.sheet table {
  width: 100%;
  margin-bottom: 1em;
  border-collapse: collapse;
  font-size: 1rem;
}

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

.sheet th { color: #fff; }

/* 页脚：仅 p 与 small */
.foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 44px) 34px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, .66);
  font-size: 1rem;
}

.foot p { margin: 0; }

.foot-brand strong {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.06rem;
  letter-spacing: .03em;
  color: #fff;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #ffd0e4;
  text-decoration: none;
}

.foot-links a:hover { color: #fff; }

.foot small { font-size: 1rem; color: rgba(255, 255, 255, .55); }

.foot-copy { align-self: center; }

.foot-top { text-align: right; }

.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
}

/* 滚动显现 */
.rv [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}

.rv [data-reveal].in {
  opacity: 1;
  transform: none;
}

@supports (animation-timeline: view()) {
  .sheet > div {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }

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

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mark { width: 38px; height: 38px; font-size: 18px; }

  .find {
    flex: 1 1 120px;
    order: 2;
    min-width: 0;
  }

  .find input { min-height: 40px; }

  .rail-nav {
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .rail-nav > ul {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .rail-nav > ul::-webkit-scrollbar { height: 0; }

  .grp { flex: 0 0 auto; }

  .fold > summary { display: none; }

  .rail-nav .sub {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
    border-left: 0;
  }

  .rail-nav li { flex: 0 0 auto; }

  .rail-nav a {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    white-space: nowrap;
  }

  .hero {
    min-height: 0;
    padding-block: 18px 26px;
  }

  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  .hero-txt { order: -1; text-align: left; }

  .hero-fig { aspect-ratio: 16 / 10; }

  div[id] { scroll-margin-top: 132px; }

  .foot { grid-template-columns: minmax(0, 1fr); }

  .foot-links,
  .foot-top { justify-content: flex-start; text-align: left; }
}

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

  body::before { animation: none; }

  .hero-fig.turn img {
    position: static;
    opacity: 1;
    animation: none;
  }

  .hero-fig.turn img:not(:first-child) { display: none; }

  .rv [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sheet > div { animation: none; }
}

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