@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@400;500;600;700&display=swap');

:root {
  --ink: #1a1a2e;
  --bg: #0b0b14;
  --bg-2: #101020;
  --red: #ff0000;
  --pink: #ff006e;
  --line: rgba(255, 0, 110, 0.28);
  --line-soft: rgba(255, 0, 110, 0.16);
  --txt: #ece9f6;
  --dim: #a9a4c2;
  --rad: 18px;
  --serif: "Noto Serif JP", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Noto Sans JP", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --shell: 1240px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 560px at 84% -12%, rgba(255, 0, 110, 0.16), transparent 68%),
    radial-gradient(900px 520px at -10% 104%, rgba(255, 0, 0, 0.13), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 0, 110, 0.055) 0 1px, transparent 1px 96px),
    var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
  opacity: 0.55;
}

main { flex: 1 0 auto; }

a { color: var(--pink); }

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

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

/* 顶部细条 */
.ticker {
  background: linear-gradient(90deg, var(--red), var(--pink) 60%, #ff2d8f);
  color: #14000a;
  border-bottom: 1px solid #000;
  overflow: hidden;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.ticker-row {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  padding: 6px 0;
  animation: slide 30s linear infinite;
}

.ticker-row .sep {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  background: #14000a;
  transform: rotate(45deg);
}

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

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px 16px;
}

.mark,
.foot-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--pink);
  border-radius: 12px;
  background: rgba(255, 0, 110, 0.08);
  color: var(--pink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 0 12px rgba(255, 0, 110, 0.25);
}

.mark:hover,
.foot-mark:hover {
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.6);
}

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

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

.mainnav ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px 0;
  list-style: none;
}

.mainnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt);
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.mainnav a:hover {
  color: #fff;
  border-color: var(--pink);
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.55);
}

/* 大图 */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(255, 0, 110, 0.12) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 0, 110, 0.08) 0 1px, transparent 1px 72px),
    radial-gradient(620px 340px at 24% 106%, rgba(255, 0, 110, 0.4), transparent 72%);
  opacity: 0.85;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 11, 20, 0.45), rgba(11, 11, 20, 0.9) 68%, var(--bg)),
    linear-gradient(90deg, rgba(11, 11, 20, 0.92), rgba(11, 11, 20, 0.1));
}

.hero-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.06);
}

.hero-in {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 20px 44px;
  text-align: left;
}

.hero-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 7vw, 64px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.8), 0 0 46px rgba(255, 0, 0, 0.45);
}

.hero-sub {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--pink);
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.7);
}

.subtitle {
  margin: 0;
  max-width: 62ch;
  color: var(--dim);
  font-size: 17px;
  line-height: 1.8;
}

/* 版心 */
.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 276px;
  gap: 44px;
  align-items: start;
  padding: 52px 0 76px;
}

.doc-main {
  min-width: 0;
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.9;
}

.doc-main > div {
  padding: 0 0 40px;
  margin: 0 0 40px;
  border-bottom: 1px solid var(--line-soft);
}

.doc-main > div:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.doc-main h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.45;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.45);
}

.doc-main h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--red), var(--pink));
  box-shadow: 0 0 10px rgba(255, 0, 110, 0.8);
}

.doc-main h2 + p { margin-top: 14px; }

.doc-main h3 {
  margin: 30px 0 10px;
  font-size: 20px;
  line-height: 1.6;
  color: #ffe1ed;
}

.doc-main p { margin: 0 0 18px; }

.doc-main a {
  color: var(--pink);
  text-underline-offset: 3px;
}

.doc-main a:hover { color: var(--red); }

.doc-main ul,
.doc-main ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
}

.doc-main li { margin: 0 0 8px; }

.doc-main li::marker { color: var(--pink); }

.doc-main time {
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--pink);
}

.doc-main blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--rad) var(--rad) 0;
  background: rgba(255, 0, 110, 0.06);
  color: #ded9ef;
}

.doc-main img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--rad);
}

.doc-main figure { margin: 0 0 20px; }

.doc-main table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 16px;
  font-family: var(--sans);
}

.doc-main th,
.doc-main td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

.doc-main th {
  background: rgba(255, 0, 110, 0.1);
  color: #fff;
}

.doc-main pre {
  margin: 0 0 20px;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 16px;
  line-height: 1.7;
}

.doc-main code { font-size: 16px; }

.doc-main hr {
  height: 1px;
  border: 0;
  margin: 30px 0;
  background: var(--line);
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  font-family: var(--sans);
}

.rail-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: rgba(255, 255, 255, 0.02);
  color: var(--dim);
  font-size: 16px;
}

.rail-tag p { margin: 0; }

.rail-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
}

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

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 10px 10px 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.55;
  text-decoration: none;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.rail-nav a:hover {
  color: #fff;
  border-left-color: var(--pink);
  background: rgba(255, 0, 110, 0.1);
}

/* 页脚 */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
  border-top: 1px solid var(--line);
  padding: 20px clamp(16px, 4vw, 56px);
  background: rgba(10, 10, 18, 0.7);
  font-family: var(--sans);
}

footer div {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

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

.foot-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
}

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

/* 滚动显现 */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* 断点 */
@media (max-width: 960px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 38px 0 56px;
  }

  .rail {
    position: static;
    gap: 14px;
    order: 2;
    padding-top: 24px;
    border-top: 1px solid var(--line-soft);
  }

  .rail-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .rail-nav a {
    border-left: 0;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    min-height: 44px;
  }

  .rail-nav a:hover { border-color: var(--pink); }
}

@media (max-width: 640px) {
  body { font-size: 17px; }

  .hero { min-height: 68vh; }

  .hero-in { padding: 44px 16px 34px; }

  .hero-sub { letter-spacing: 0.24em; }

  .wrap { padding: 0 16px; }

  .doc-main { font-size: 17px; }

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

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

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

  .ticker-row { animation: none; }

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

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