@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #26171f;
  --ink-0: #120a0f;
  --pink: #ff0080;
  --mag: #ff00ff;
  --paper: #f9ecf2;
  --muted: #c8aeba;
  --line: rgba(255, 0, 128, 0.22);
  --panel: rgba(38, 23, 31, 0.62);
  --radius: 4px;
}

* { box-sizing: border-box; }

html {
  background: var(--ink-0);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: var(--paper);
  background: var(--ink);
  overflow-wrap: break-word;
}

body::before {
  content: "";
  position: fixed;
  inset: -25% -15%;
  z-index: -2;
  background:
    radial-gradient(38% 42% at 16% 20%, #ff0080 0%, rgba(255, 0, 128, 0) 62%),
    radial-gradient(42% 38% at 84% 16%, #ff00ff 0%, rgba(255, 0, 255, 0) 60%),
    radial-gradient(46% 40% at 70% 78%, #ff4da6 0%, rgba(255, 77, 166, 0) 64%),
    radial-gradient(50% 46% at 20% 88%, #a300ff 0%, rgba(163, 0, 255, 0) 62%),
    conic-gradient(from 210deg at 50% 50%, #26171f, #3a1f2d, #26171f, #43213a, #26171f);
  filter: blur(70px) saturate(150%);
  opacity: 0.62;
  mix-blend-mode: screen;
  animation: flow 26s ease-in-out infinite alternate;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 10, 15, 0.42), rgba(18, 10, 15, 0.92) 72%);
}

@keyframes flow {
  from { transform: translate3d(-3%, -2%, 0) scale(1.06); }
  to { transform: translate3d(4%, 3%, 0) scale(1.16); }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a { color: #ff8ccb; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--mag);
  outline-offset: 3px;
}

.shell { position: relative; z-index: 1; }

/* 页头 */
.masthead {
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 10, 15, 0.78), rgba(18, 10, 15, 0.18));
  backdrop-filter: blur(12px);
}

.brandrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: #fff;
  font-family: 'Calistoga', Georgia, serif;
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}

.logo {
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ff0080, #ff00ff, #ff4da6, #ff0080);
  box-shadow: 0 0 18px rgba(255, 0, 128, 0.85);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 3px 3px 3px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 10, 15, 0.6);
}

.search input {
  width: 148px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
}

.search input::placeholder { color: var(--muted); }

.search button {
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--pink), var(--mag));
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.search button:hover { filter: brightness(1.12); }

.navrow {
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 12px;
  overflow-x: auto;
}

.navrow ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navrow a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #e9d4de;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}

.navrow a:hover,
.navrow a:focus-visible,
.navrow a.on {
  background: rgba(255, 0, 128, 0.16);
  border-color: rgba(255, 0, 255, 0.42);
  color: #fff;
  transform: translateY(-1px);
}

.ico {
  width: 12px;
  height: 12px;
  flex: none;
  fill: var(--mag);
  opacity: 0.85;
}

/* 首屏 */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  max-width: 1180px;
  min-height: 45vh;
  margin: 0 auto;
  padding: 40px 20px 26px;
  text-align: right;
}

.hero h1 {
  margin: 0;
  font-family: 'Calistoga', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 7.6vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  background: linear-gradient(96deg, #fff 6%, #ffc2e0 46%, #ff00ff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 14px 34px rgba(255, 0, 128, 0.34));
}

.hero .lede {
  max-width: 46ch;
  margin: 0;
  color: #e9cfdb;
  font-size: 1.02rem;
}

/* 正文 */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px 56px;
}

.reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.prose article {
  margin: 0 0 18px;
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 48px -32px rgba(255, 0, 128, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  scroll-margin-top: 108px;
}

.prose h2 {
  margin: 0 0 10px;
  font-family: 'Calistoga', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.38rem, 3.4vw, 1.92rem);
  line-height: 1.26;
  color: #fff;
}

.prose h3 {
  margin: 20px 0 8px;
  font-family: 'Calistoga', Georgia, serif;
  font-weight: 400;
  font-size: 1.16rem;
  line-height: 1.34;
  color: #ffe3f0;
}

.prose p { margin: 0 0 13px; color: #f2dfe8; }
.prose p:last-child { margin-bottom: 0; }

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  box-shadow: 0 18px 36px -24px rgba(255, 0, 128, 0.9);
}

.prose blockquote {
  margin: 16px 0;
  padding: 8px 0 8px 16px;
  border-left: 2px solid var(--mag);
  color: #e8cfda;
}

.prose table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.prose th,
.prose td { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); text-align: left; }

hr {
  height: 1px;
  margin: 12px 0 18px;
  border: 0;
  background: linear-gradient(90deg, var(--pink), var(--mag) 42%, rgba(255, 0, 255, 0));
}

.flash { outline: 2px solid var(--mag); outline-offset: 4px; }

/* 侧栏 */
.rail {
  padding: 16px 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 10, 15, 0.55);
  box-shadow: 0 20px 44px -32px rgba(255, 0, 255, 0.9);
}

.rail h2 {
  margin: 0 0 6px;
  font-family: 'Calistoga', Georgia, serif;
  font-weight: 400;
  font-size: 1.04rem;
  letter-spacing: 0.03em;
  color: #fff;
}

.rail hr { margin: 8px 0 12px; }

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

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 9px;
  border-left: 2px solid transparent;
  border-radius: var(--radius);
  color: #e3ccd7;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.22s, color 0.22s, border-color 0.22s;
}

.rail a:hover,
.rail a:focus-visible {
  background: rgba(255, 0, 255, 0.13);
  border-left-color: var(--mag);
  color: #fff;
}

/* 页脚 */
.foot {
  margin-top: 34px;
  padding: 34px 20px 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 10, 15, 0.4), rgba(10, 5, 9, 0.96));
}

.footcta {
  max-width: 1180px;
  margin: 0 auto 24px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-family: 'Calistoga', Georgia, serif;
  font-size: clamp(1.55rem, 5vw, 2.5rem);
  line-height: 1.16;
  color: #fff;
  text-decoration: none;
  transition: transform 0.25s, color 0.25s;
}

.cta::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--pink), var(--mag));
  box-shadow: 0 0 22px var(--pink);
}

.cta:hover { transform: translateY(-2px); color: #ffc2e0; }

.footgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.footaddr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Calistoga', Georgia, serif;
  font-size: 1.04rem;
  font-style: normal;
  color: #f2dfe8;
}

.brandmark {
  width: 13px;
  height: 13px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(from 90deg, #ff0080, #ff00ff, #ff4da6, #ff0080);
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.8);
}

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

.flinks a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #dcc4d0;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.flinks a:hover,
.flinks a:focus-visible { color: #fff; }

.copy {
  max-width: 1180px;
  margin: 24px auto 0;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #b49aa6;
  font-size: 0.95rem;
}

/* 动效 */
@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

.navrow li,
.rail li,
.flinks li { animation: rise 0.5s cubic-bezier(0.2, 0.75, 0.3, 1) both; }

.navrow li:nth-child(1), .rail li:nth-child(1), .flinks li:nth-child(1) { animation-delay: 0.03s; }
.navrow li:nth-child(2), .rail li:nth-child(2), .flinks li:nth-child(2) { animation-delay: 0.07s; }
.navrow li:nth-child(3), .rail li:nth-child(3), .flinks li:nth-child(3) { animation-delay: 0.11s; }
.navrow li:nth-child(4), .rail li:nth-child(4), .flinks li:nth-child(4) { animation-delay: 0.15s; }
.navrow li:nth-child(5), .rail li:nth-child(5), .flinks li:nth-child(5) { animation-delay: 0.19s; }
.navrow li:nth-child(6), .rail li:nth-child(6), .flinks li:nth-child(6) { animation-delay: 0.23s; }
.navrow li:nth-child(7), .rail li:nth-child(7), .flinks li:nth-child(7) { animation-delay: 0.27s; }
.navrow li:nth-child(8), .rail li:nth-child(8), .flinks li:nth-child(8) { animation-delay: 0.31s; }

/* 断点 */
@media (max-width: 599px) {
  body { font-size: 16.5px; }
  .hero { min-height: 38vh; padding-top: 26px; }
  .hero .lede { font-size: 0.98rem; }
  .brandrow { gap: 10px; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; }
  .prose article { padding: 18px 15px 20px; }
  .wrap { padding: 8px 15px 44px; }
  .masthead { padding: 14px 15px 0; }
  .foot { padding: 28px 15px 20px; }
}

@media (min-width: 760px) {
  .footgrid { grid-template-columns: 1.3fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .masthead { position: sticky; top: 0; z-index: 9; }
}

@media (min-width: 980px) {
  .reader {
    grid-template-columns: minmax(0, 1fr) 258px;
    gap: 32px;
    align-items: start;
  }
  .rail { position: sticky; top: 118px; }
  .prose article { padding: 26px 28px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  body::before { animation: none !important; }
}

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