:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --ink-deep: #160e0e;
  --card: #241a1a;
  --text: #f7ecec;
  --dim: #cbb4b8;
  --line: rgba(255, 20, 147, 0.28);
  --radius: 4px;
  --ui: "Outfit", "Work Sans", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Work Sans", "Outfit", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  padding-top: 40px;
  overflow-x: hidden;
  background: var(--ink-deep);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  inset: -25% -25% -25% -25%;
  z-index: -2;
  background:
    radial-gradient(closest-side at 20% 24%, rgba(255, 20, 147, 0.55), rgba(255, 20, 147, 0) 72%),
    radial-gradient(closest-side at 76% 14%, rgba(255, 0, 0, 0.45), rgba(255, 0, 0, 0) 70%),
    radial-gradient(closest-side at 62% 82%, rgba(150, 26, 120, 0.5), rgba(150, 26, 120, 0) 72%),
    radial-gradient(closest-side at 12% 88%, rgba(255, 80, 0, 0.35), rgba(255, 80, 0, 0) 66%),
    conic-gradient(from 210deg at 50% 50%, #2b1519, #3c1421, #221315, #35111b, #2b1519);
  filter: saturate(1.2) blur(6px);
  animation: aurora 12s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mix-blend-mode: screen;
  opacity: 0.45;
}

@keyframes aurora {
  0% {
    transform: translate3d(-1%, -1%, 0) scale(1.02) rotate(-1deg);
  }
  100% {
    transform: translate3d(2%, 1.5%, 0) scale(1.08) rotate(1.5deg);
  }
}

@keyframes blade {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 0;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* 顶部细条 */
.tape {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 16px;
  background: rgba(22, 14, 14, 0.74);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 60;
}

.tape::before {
  content: "";
  order: -1;
  flex: 1 1 auto;
  height: 2px;
  border-radius: 2px;
  transform: skewX(-30deg);
  background: linear-gradient(90deg, rgba(255, 0, 0, 0), var(--red) 32%, var(--pink) 68%, rgba(255, 20, 147, 0));
}

.tape-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 6px;
  color: var(--dim);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.tape-link:hover {
  color: #fff;
}

/* 左侧竖栏 */
.brandbar {
  position: fixed;
  top: 40px;
  left: 0;
  bottom: 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(38, 23, 23, 0.88), rgba(22, 14, 14, 0.92));
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 20, 147, 0.2);
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-family: var(--ui);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.brand-name {
  line-height: 1.25;
}

.drawer summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 0, 0, 0.16);
  color: #ffd7e6;
  font-size: 0.96rem;
  letter-spacing: 0.12em;
}

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

.drawer summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--pink);
  border-bottom: 2px solid var(--pink);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

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

.drawer-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.drawer-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  border-radius: var(--radius);
  color: var(--dim);
  font-size: 0.97rem;
  line-height: 1.45;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.drawer-list a:hover,
.drawer-list a:focus-visible {
  background: rgba(255, 20, 147, 0.18);
  border-left-color: var(--pink);
  color: #fff;
}

@media (min-width: 921px) and (prefers-reduced-motion: no-preference) {
  .drawer[open] .drawer-list li {
    animation: slideIn 0.5s ease both;
    animation-delay: calc(var(--i, 0) * 45ms);
  }
}

/* 版心 */
main {
  margin-left: 232px;
  margin-right: auto;
  max-width: 1200px;
  padding: 56px 30px 30px 36px;
  display: grid;
  grid-template-columns: minmax(0, 196px) minmax(0, 1fr);
  gap: 1.5rem 2.2rem;
  align-items: start;
}

.hero {
  grid-column: 1 / -1;
  position: relative;
  min-height: 45vh;
  display: grid;
  place-items: center;
  padding: 14px 4px 44px;
  text-align: center;
}

.hero-title {
  margin: 0;
  max-width: 22ch;
  font-family: var(--ui);
  font-size: clamp(1.9rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  color: #fff2f7;
  background-image: linear-gradient(98deg, #ffffff, #ffd0e6 34%, #ff1493 66%, #ff0000);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blade {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: min(400px, 72%);
  height: 5px;
  border-radius: 3px;
  transform: translateX(-50%) skewX(-26deg);
  background-image: linear-gradient(90deg, var(--red), var(--pink), var(--red));
  background-size: 200% 100%;
  animation: blade 9s ease-in-out infinite alternate;
}

.rail {
  position: sticky;
  top: 74px;
  align-self: start;
  padding: 20px 16px;
  border-radius: var(--radius);
  background: rgba(255, 20, 147, 0.09);
}

.rail-title {
  margin: 0;
  font-family: var(--ui);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
  color: #ffe4ef;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--dim);
}

.rail-glow {
  display: block;
  margin-top: 16px;
  height: 64px;
  border-radius: var(--radius);
  background: radial-gradient(60% 120% at 30% 20%, rgba(255, 0, 0, 0.6), rgba(255, 20, 147, 0.24) 46%, rgba(38, 23, 23, 0) 82%);
}

/* 正文 */
.prose {
  min-width: 0;
}

.prose > article {
  margin: 0 0 18px;
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--card);
  scroll-margin-top: 88px;
  box-shadow: 0 18px 40px -32px #000;
}

.prose h2 {
  margin: 0 0 14px;
  font-family: var(--ui);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #ffe8f1;
}

.prose h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, var(--red), var(--pink));
}

.prose h3 {
  margin: 22px 0 10px;
  font-family: var(--ui);
  font-size: 1.12rem;
  font-weight: 600;
  color: #ffd9e7;
}

.prose p {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.prose li {
  margin: 0 0 8px;
}

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

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

.prose strong {
  color: #fff;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: var(--radius);
}

.prose blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 20, 147, 0.09);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.prose code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

/* 页脚 */
.foot {
  margin-left: 232px;
  padding: 30px 20px 46px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.42));
}

.foot-line {
  margin: 0 0 4px;
  font-family: var(--ui);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.foot-note {
  font-size: 0.86rem;
  letter-spacing: 0.1em;
}

.foot-note a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: #ff8cc0;
  text-decoration: none;
}

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

/* 滚动出现 */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

/* 窄屏 */
@media (max-width: 920px) {
  body::after {
    background-size: 40px 40px;
  }

  .brandbar {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    width: auto;
    gap: 10px;
    padding: 10px 16px 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 20, 147, 0.2);
  }

  .drawer summary {
    min-height: 46px;
  }

  .drawer-list a {
    min-height: 46px;
  }

  main {
    margin-left: 0;
    padding: 22px 16px 24px;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .hero {
    min-height: 40vh;
    padding: 10px 0 36px;
  }

  .rail {
    position: static;
  }

  .prose > article {
    padding: 22px 18px;
  }

  .foot {
    margin-left: 0;
  }
}

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

  body::before,
  .blade {
    animation: none;
  }

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

  .drawer[open] .drawer-list li {
    animation: none;
  }
}

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