:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --bg: #140b0b;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 197, 205, 0.18);
  --txt: #f7eceb;
  --dim: #cbb2b1;
  --serif: "Noto Serif JP", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans JP", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --r: 28px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 400 17px/1.78 var(--sans);
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(38% 42% at 22% 16%, rgba(255, 0, 0, 0.55), transparent 70%),
    radial-gradient(42% 38% at 84% 24%, rgba(255, 20, 147, 0.48), transparent 72%),
    radial-gradient(48% 46% at 54% 84%, rgba(126, 18, 92, 0.62), transparent 70%),
    radial-gradient(32% 30% at 10% 90%, rgba(255, 96, 64, 0.34), transparent 70%);
  filter: saturate(1.25) blur(14px);
  animation: drift 11s ease-in-out infinite alternate;
  background-size: 180% 180%;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 11, 11, 0.35), rgba(20, 11, 11, 0.86) 70%);
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}

a { color: #ffb9cd; text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.02em; }

small {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.3em;
  color: #ff9dbd;
  font-family: var(--sans);
}

/* 顶部细条 */
.ticker {
  padding: 9px 18px;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: #ffdfe6;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.4), rgba(255, 20, 147, 0.4), rgba(255, 0, 0, 0.4));
  border-bottom: 1px solid var(--line);
}

.ticker p { margin: 0; }

/* 吸顶导航 */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(20, 11, 11, 0.66);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid var(--line);
}

.mark {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(255, 0, 0, 0.85), rgba(255, 20, 147, 0.7));
  color: #fff;
  font-family: var(--serif);
  font-size: 19px;
  box-shadow: 0 6px 22px rgba(255, 20, 147, 0.28);
}

.mark img { display: block; border-radius: 10px; }

.bar-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.bar-nav::-webkit-scrollbar { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  white-space: nowrap;
  font-size: 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #ffe3e9;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.pill:hover,
.pill:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(120deg, rgba(255, 0, 0, 0.55), rgba(255, 20, 147, 0.55));
  border-color: rgba(255, 255, 255, 0.4);
}

/* 首屏 */
.veil {
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 72px 20px 104px;
  overflow: hidden;
  border-radius: 0 0 48px 48px;
  isolation: isolate;
}

.veil-art { position: absolute; inset: 0; z-index: 0; }

.veil-art .veil-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: saturate(1.2) contrast(1.05);
  mix-blend-mode: screen;
}

.veil::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -130px;
  width: 640px;
  height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 20, 147, 0.5), transparent 72%);
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}

.veil-in {
  position: relative;
  z-index: 1;
  max-width: 860px;
  text-align: center;
}

.veil-badge {
  display: inline-block;
  margin: 0 0 20px;
  padding: 7px 18px;
  font-size: 16px;
  letter-spacing: 0.2em;
  border-radius: 999px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(120deg, rgba(255, 0, 0, 0.55), rgba(255, 20, 147, 0.55));
  backdrop-filter: blur(8px);
  animation: float 9s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-9px); }
}

.veil h1 {
  margin: 0;
  font-size: clamp(33px, 8vw, 70px);
  line-height: 1.18;
  color: #fff;
  text-shadow: 0 12px 44px rgba(255, 20, 147, 0.4);
}

.veil-lead {
  margin: 22px auto 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.8;
  color: #f3d9dd;
}

/* 主体栅格 */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.stage {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  padding: 54px 0 20px;
}

.rail {
  position: sticky;
  top: 82px;
  padding: 22px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.rail h2 {
  margin: 8px 0 14px;
  font-size: 20px;
  color: #fff;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  font-size: 16px;
  color: #e7cdd1;
  border-bottom: 1px dashed rgba(255, 197, 205, 0.16);
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.rail-list li:last-child a { border-bottom: 0; }

.rail-list a:hover {
  color: #fff;
  padding-left: 8px;
}

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

.prose > div {
  scroll-margin-top: 96px;
  margin: 0 0 22px;
  padding: 28px 26px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(10, 5, 5, 0.32);
}

.prose > div:nth-child(even) {
  background: linear-gradient(150deg, rgba(255, 20, 147, 0.09), rgba(255, 255, 255, 0.03));
}

.prose > div > :first-child { margin-top: 0; }
.prose > div > :last-child { margin-bottom: 0; }

.prose h2 {
  margin: 26px 0 12px;
  font-size: clamp(23px, 3.4vw, 29px);
  line-height: 1.35;
  color: #fff;
}

.prose h2 + small { margin-top: -6px; }

.prose h3 {
  margin: 22px 0 10px;
  font-size: 20px;
  line-height: 1.45;
  color: #ffd9e2;
}

.prose p {
  margin: 0 0 16px;
  color: #f0dedd;
}

.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; }

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

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

.prose strong { color: #fff; }

.prose a {
  border-bottom: 1px solid rgba(255, 185, 205, 0.45);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
  margin: 18px 0;
}

.prose code {
  font-family: ui-monospace, monospace;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.9fr;
  gap: 30px;
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 44px 20px 40px;
  border-top: 1px solid var(--line);
}

.foot div { min-width: 0; }

.foot h2 {
  margin: 8px 0 14px;
  font-size: 21px;
  color: #fff;
}

.foot-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--dim);
}

.foot-nav nav dl {
  margin: 0;
  counter-reset: k;
}

.foot-nav dt { margin: 0; }

.foot-nav dt a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: #efd7db;
  transition: color 0.2s ease, transform 0.2s ease;
}

.foot-nav dt a:hover { color: #fff; transform: translateX(4px); }

.foot-nav dd {
  margin: 0;
  counter-increment: k;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.24em;
  color: #b98f93;
}

.foot-nav dd::before { content: counter(k, decimal-leading-zero); }

.sub-form { display: grid; gap: 10px; }

.sub-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font: 16px/1.5 var(--sans);
  color: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.sub-form input::placeholder { color: #bda2a4; }

.sub-form button {
  min-height: 44px;
  padding: 10px 16px;
  font: 500 16px/1.5 var(--sans);
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(120deg, var(--red), var(--pink));
  transition: filter 0.25s ease, transform 0.2s ease;
}

.sub-form button:hover { filter: brightness(1.12); transform: translateY(-2px); }

.copy {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
}

.totop {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 50;
  min-height: 44px;
  padding: 10px 18px;
  font: 500 16px/1.4 var(--sans);
  color: #fff;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(120deg, rgba(255, 0, 0, 0.9), rgba(255, 20, 147, 0.9));
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(255, 20, 147, 0.3);
}

.totop[hidden] { display: none; }

/* 揭示动画 */
.rv {
  opacity: 0;
  transform: translateY(20px);
}

.rv.on {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.7, 0.3, 1);
}

@media (max-width: 1000px) {
  .foot { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; gap: 22px; padding-top: 34px; }
  .rail { position: static; }
  .rail-list { grid-template-columns: 1fr 1fr; column-gap: 16px; }
}

@media (max-width: 760px) {
  .bar { flex-wrap: wrap; padding: 10px 14px; }
  .bar-nav { order: 3; flex: 0 0 100%; margin-left: 0; padding: 4px 0 2px; }
  .veil { min-height: 64vh; padding: 56px 18px 76px; border-radius: 0 0 34px 34px; }
  .prose > div { padding: 22px 18px; }
  .foot { grid-template-columns: 1fr; gap: 24px; padding-top: 34px; }
}

@media (max-width: 420px) {
  .rail-list { grid-template-columns: 1fr; }
  .veil-lead { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before,
  .veil-badge { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  .pill:hover, .sub-form button:hover, .foot-nav dt a:hover { transform: none; }
}

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