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

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

:root {
  --ink: #26171f;
  --card: #2a1824;
  --rose: #ff0080;
  --magenta: #ff00ff;
  --text: #f7eaf2;
  --muted: #d2bac9;
  --line: rgba(255, 255, 255, .12);
  --serif: Lora, Georgia, "Songti SC", "Noto Serif SC", serif;
  --sans: Raleway, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

html {
  background: #150d13;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -1;
  background:
    radial-gradient(38% 40% at 20% 16%, rgba(255, 0, 128, .55), transparent 72%),
    radial-gradient(32% 34% at 80% 22%, rgba(255, 0, 255, .42), transparent 74%),
    radial-gradient(44% 42% at 64% 84%, rgba(150, 0, 110, .55), transparent 76%),
    radial-gradient(30% 30% at 12% 76%, rgba(255, 0, 140, .3), transparent 78%),
    conic-gradient(from 200deg at 50% 45%, #26171f, #3a1c2f, #2a1526, #26171f);
  filter: blur(12px) saturate(1.05);
  animation: aurora 24s ease-in-out infinite alternate;
}

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

/* ── 顶栏 ─────────────────────────────── */

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(14px, 4vw, 28px);
  background: linear-gradient(180deg, rgba(21, 13, 19, .93), rgba(21, 13, 19, .5));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  z-index: 70;
}

.mark:hover, .mark:focus-visible { background: rgba(255, 255, 255, .1); }
.mark img { display: block; width: 30px; height: 30px; border-radius: 4px; }
.mark-txt { font-family: var(--serif); font-size: 1.02rem; letter-spacing: .04em; }

.dish { position: relative; z-index: 70; }

.dish > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 4px;
  background: linear-gradient(100deg, var(--rose), var(--magenta));
  color: #fff;
  font-size: 1rem;
  letter-spacing: .1em;
  user-select: none;
  box-shadow: 0 8px 24px rgba(255, 0, 128, .28);
}

.dish > summary::-webkit-details-marker { display: none; }
.dish > summary::marker { content: ""; }

.bars {
  display: block;
  width: 17px;
  height: 2px;
  background: #fff;
  box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 65;
  margin: 0;
  padding: 96px clamp(18px, 6vw, 64px) 40px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  background:
    radial-gradient(70% 50% at 80% 0%, rgba(255, 0, 128, .28), transparent 70%),
    linear-gradient(160deg, rgba(38, 23, 31, .98), rgba(17, 9, 15, .99));
  backdrop-filter: blur(14px);
}

.drawer li { list-style: none; animation: rise .45s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }

.drawer a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 4.2vw, 1.45rem);
}

.drawer a:hover, .drawer a:focus-visible {
  background: rgba(255, 0, 128, .2);
  color: #fff;
}

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

/* ── 版心 ─────────────────────────────── */

.core {
  max-width: 1140px;
  margin: 0 auto;
  padding: 88px clamp(14px, 4vw, 28px) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: clamp(20px, 3vw, 38px);
  align-items: start;
}

.prose { min-width: 0; }

.hero {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: clamp(16px, 4vw, 40px);
  min-height: 66vh;
  padding: clamp(20px, 4vw, 44px) 0 clamp(26px, 4vw, 48px);
  text-align: right;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: right top;
}

.hero-copy { flex: 1 1 auto; min-width: 0; }

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 5.6vw, 3.2rem);
  line-height: 1.26;
  letter-spacing: .01em;
  background: linear-gradient(96deg, #ffffff 18%, #ffd7ea 46%, var(--magenta) 76%, var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 24px auto;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.jump {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  background: linear-gradient(100deg, var(--rose), var(--magenta));
  box-shadow: 0 12px 32px rgba(255, 0, 128, .3);
}

.jump:hover, .jump:focus-visible { filter: brightness(1.12); }

.hero-art {
  flex: 0 0 auto;
  width: clamp(110px, 20vw, 210px);
  filter: drop-shadow(0 18px 40px rgba(255, 0, 128, .35));
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
  animation: float 12s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translateY(-8px) rotate(-3deg); }
  to   { transform: translateY(8px) rotate(3deg); }
}

/* ── 正文 ─────────────────────────────── */

.sheet { display: block; }

.sheet > article {
  position: relative;
  margin: 0 0 20px;
  padding: clamp(18px, 3.4vw, 34px);
  border-radius: 4px;
  background: linear-gradient(180deg, #2b1926, #24151f);
  scroll-margin-top: 96px;
}

.sheet > article:last-child { margin-bottom: 0; }

.sheet p { margin: 0 0 1em; color: #ecdae5; }
.sheet p:last-child { margin-bottom: 0; }

.sheet h2 {
  margin: 0 0 .6em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.28rem, 3.4vw, 1.72rem);
  line-height: 1.36;
  color: #ff6cb4;
}

.sheet h3 {
  margin: 1.3em 0 .5em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  line-height: 1.4;
  color: #ff9ccb;
}

.sheet h2 span, .sheet h3 span, .rail h2 span {
  background: linear-gradient(96deg, var(--rose), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sheet a { color: #ff77bd; text-decoration-color: rgba(255, 119, 189, .5); }
.sheet a:hover { color: #fff; }

.sheet ul, .sheet ol { margin: 0 0 1em; padding-left: 1.3em; }
.sheet li { margin: .35em 0; }

.sheet img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border-radius: 4px;
}

.sheet figure { margin: 1em 0; }
.sheet figcaption { font-size: 1rem; color: var(--muted); }

.sheet blockquote {
  margin: 1em 0;
  padding: 12px 16px;
  border-radius: 4px;
  background: rgba(255, 0, 128, .12);
  color: #f6dbe9;
}

.sheet table { width: 100%; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.sheet th, .sheet td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.sheet th { color: #ffb2d3; font-weight: 600; }

.sheet time { font-size: 1rem; color: var(--muted); letter-spacing: .04em; }

/* ── 侧栏 ─────────────────────────────── */

.rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.rail .block {
  padding: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .055);
}

.rail h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: .12em;
}

.rail .toc { margin: 0; padding: 0; list-style: none; }
.rail .toc li { list-style: none; }

.rail .toc a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border-left: 2px solid rgba(255, 0, 128, .45);
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
}

.rail .toc a:hover, .rail .toc a:focus-visible {
  background: rgba(255, 0, 128, .16);
  color: #fff;
}

.totop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  letter-spacing: .08em;
  text-decoration: none;
  background: linear-gradient(100deg, var(--rose), var(--magenta));
}

/* ── 页脚 ─────────────────────────────── */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px clamp(14px, 4vw, 28px) 30px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--muted);
}

.site-foot .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  color: var(--text);
  letter-spacing: .04em;
}

.site-foot .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--rose), var(--magenta));
  box-shadow: 0 0 14px rgba(255, 0, 128, .8);
}

.site-foot nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }

.site-foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
}

.site-foot nav a:hover, .site-foot nav a:focus-visible { color: #fff; background: rgba(255, 255, 255, .09); }
.site-foot .copy { color: rgba(255, 255, 255, .58); }

/* ── 动效 ─────────────────────────────── */

.rv { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }

/* ── 响应式 ───────────────────────────── */

@media (max-width: 900px) {
  .core { grid-template-columns: minmax(0, 1fr); padding-top: 82px; }
  .rail { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    text-align: right;
    min-height: 0;
    padding-top: 14px;
    gap: 18px;
  }
  .hero-art { order: -1; align-self: flex-end; width: 118px; }
  .lede { font-size: 1rem; }
  .rail { grid-template-columns: 1fr; }
  .site-foot { justify-content: space-between; }
  .site-foot .copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, .hero-art svg, .drawer li { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
}

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