@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

:root {
  --ink: #26171f;
  --mag: #ff0080;
  --vio: #ff00ff;
  --plum: #120810;
  --txt: #fdf3f9;
  --dim: rgba(253, 243, 249, 0.76);
  --line: rgba(255, 255, 255, 0.16);
  --line2: rgba(255, 255, 255, 0.34);
  --card: rgba(255, 255, 255, 0.05);
  --r: 18px;
  --display: 'Lexend Mega', 'Public Sans', system-ui, sans-serif;
  --body: 'Public Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--plum);
  color: var(--txt);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 极光网格铺底 */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(36% 42% at 16% 20%, #ff0080 0%, rgba(255, 0, 128, 0) 60%),
    radial-gradient(44% 38% at 84% 14%, #ff00ff 0%, rgba(255, 0, 255, 0) 58%),
    radial-gradient(52% 50% at 68% 86%, #7a1e8c 0%, rgba(122, 30, 140, 0) 66%),
    radial-gradient(42% 44% at 10% 78%, #ff3fa4 0%, rgba(255, 63, 164, 0) 60%),
    conic-gradient(from 200deg at 50% 50%, #26171f, #5b1440, #26171f, #3a0f4f, #26171f);
  animation: aurora 28s ease-in-out infinite alternate;
  will-change: transform, filter;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 8, 16, 0.3) 0%, rgba(18, 8, 16, 0.64) 55%, rgba(18, 8, 16, 0.84) 100%),
    radial-gradient(70% 46% at 50% 0%, rgba(18, 8, 16, 0) 0%, rgba(18, 8, 16, 0.5) 100%);
}

@keyframes aurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(1.02); filter: hue-rotate(0deg) saturate(1.12); }
  50% { transform: translate3d(2%, 2%, 0) scale(1.08); filter: hue-rotate(-18deg) saturate(1.3); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.04); filter: hue-rotate(12deg) saturate(1.2); }
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0 0 0.55em;
  font-weight: 800;
}

a { color: #ffb8e0; }

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

hr {
  border: 0;
  height: 2px;
  margin: 0.6rem 0 1.4rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mag), var(--vio) 46%, rgba(255, 255, 255, 0.08));
}

/* 角落图标 */
.mark {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 41;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1.5px solid var(--line2);
  background: rgba(18, 8, 16, 0.62);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--txt);
  overflow: hidden;
}

.mark__glyph {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(140deg, var(--mag), var(--vio));
  -webkit-background-clip: text;
  background-clip: text;
  color: #ff8fd0;
  -webkit-text-fill-color: transparent;
}

.mark img { display: block; }

/* 底部胶囊导航 */
.masthead {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px clamp(12px, 3vw, 26px);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: rgba(18, 8, 16, 0.74);
  backdrop-filter: blur(16px) saturate(1.6);
  border-top: 1px solid var(--line);
}

.dock {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.dock p {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px;
}

.dock a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--txt);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.dock a:hover,
.dock a:focus-visible {
  background: linear-gradient(120deg, var(--mag), var(--vio));
  border-color: transparent;
  transform: translateY(-2px);
}

.hit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--mag), var(--vio));
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 800;
}

/* 首屏 */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: clamp(86px, 15vh, 124px) clamp(16px, 5vw, 48px) 44px;
}

.badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  min-height: 34px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line2);
  background: linear-gradient(120deg, rgba(255, 0, 128, 0.26), rgba(255, 0, 255, 0.26));
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #ffe3f2;
  transform: rotate(-2deg);
  animation: bob 7s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(1.6deg) translateY(-6px); }
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(2rem, 7.4vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 900;
  color: #ffd0ea;
  background: linear-gradient(102deg, #ffffff 8%, #ffd0ea 46%, #ff63bd 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin: 0;
  max-width: 46ch;
  color: var(--dim);
  font-size: 1rem;
}

/* 版心 */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 32px;
}

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

@media (min-width: 960px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 32px;
  }
  .rail {
    position: sticky;
    top: 84px;
  }
}

.flow {
  min-width: 0;
  max-width: 70ch;
}

.flow > article {
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  padding: clamp(18px, 3vw, 30px);
  margin-bottom: 20px;
  scroll-margin-top: 88px;
}

.flow :is(h2, h3) { margin-top: 0; }

.flow h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); letter-spacing: -0.02em; }

.flow p { margin: 0 0 1em; color: var(--dim); }

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

.flow strong { color: #fff; }

.flow ul,
.flow ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
  color: var(--dim);
}

.flow li { margin: 0.35em 0; }

.flow a { color: #ffb3dd; }

.flow blockquote {
  margin: 0 0 1em;
  padding: 12px 18px;
  border-left: 3px solid var(--vio);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 0, 255, 0.08);
  color: var(--txt);
}

/* 侧栏 */
.rail {
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: rgba(18, 8, 16, 0.55);
  backdrop-filter: blur(8px);
  padding: 18px;
}

.rail h2 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
}

.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--txt);
  text-decoration: none;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.rail a:hover,
.rail a:focus-visible {
  border-color: var(--vio);
  background: rgba(255, 0, 255, 0.14);
}

/* 页脚 */
.foot {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  background: rgba(10, 4, 8, 0.55);
  padding: 34px clamp(16px, 4vw, 32px) calc(112px + env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.foot__brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.9rem, 10vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #ffd0ea;
  background: linear-gradient(96deg, #ffffff, #ff7fc4 52%, #a24fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.foot address {
  font-style: normal;
  color: var(--dim);
  font-size: 0.94rem;
  letter-spacing: 0.04em;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot ul a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  color: var(--txt);
  text-decoration: none;
  font-size: 0.9rem;
}

.foot ul a:hover,
.foot ul a:focus-visible {
  background: linear-gradient(120deg, var(--mag), var(--vio));
  border-color: transparent;
}

.foot__note {
  margin: 0;
  color: rgba(253, 243, 249, 0.55);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #ffd0ea;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 92px; min-height: 42vh; }
  .hit { padding: 10px 14px; }
  .dock a { padding: 9px 13px; font-size: 0.76rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .prism-js .rv {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .prism-js .rv.in {
    opacity: 1;
    transform: none;
  }
}

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

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