:root {
  --ink: #1f1726;
  --ink-2: #251c2e;
  --ink-3: #2c2137;
  --paper: #f1e9dd;
  --purple: #56228b;
  --purple-lt: #a074d6;
  --brown: #8b4513;
  --brown-lt: #c4844a;
  --moss: #8fae6b;
  --muted: #bdaecb;
  --line: rgba(241, 233, 221, 0.14);
  --font-pix: 'Press Start 2P', 'VT323', monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(rgba(241, 233, 221, 0.045) 1px, transparent 1px),
    radial-gradient(1100px 620px at 8% -8%, rgba(86, 34, 139, 0.38), transparent 62%),
    radial-gradient(880px 520px at 92% 6%, rgba(139, 69, 19, 0.3), transparent 58%),
    radial-gradient(700px 700px at 50% 108%, rgba(143, 174, 107, 0.14), transparent 60%);
  background-size: 7px 7px, auto, auto, auto;
  color: var(--paper);
  font-family: 'VT323', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

a {
  color: var(--purple-lt);
}

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

/* 顶部导航 */
.dock {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(31, 23, 38, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 16px 6px 16px 6px;
  background: rgba(241, 233, 221, 0.06);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.burger:hover {
  background: rgba(86, 34, 139, 0.45);
}

.burger-bars {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--paper);
  box-shadow: 0 -5px 0 var(--paper), 0 5px 0 var(--paper);
  border-radius: 2px;
}

.dock-side {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-l {
  justify-content: flex-end;
}

.dock-r {
  justify-content: flex-start;
}

.dock-side a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  border-radius: 14px 6px 14px 6px;
  transition: color 0.18s ease, background 0.18s ease;
}

.dock-side a:hover {
  color: var(--paper);
  background: rgba(160, 116, 214, 0.18);
}

.mark {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: var(--paper);
  text-decoration: none;
  font-size: 19px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.mark::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 9px;
  border-radius: 62% 38% 55% 45%;
  background: linear-gradient(140deg, var(--purple-lt), var(--brown-lt));
}

/* 站内查找 */
.finder {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.finder input {
  width: 108px;
  min-height: 40px;
  padding: 7px 11px;
  font-family: inherit;
  font-size: 16px;
  color: var(--paper);
  background: rgba(241, 233, 221, 0.07);
  border: 1px solid var(--line);
  border-radius: 18px 6px 18px 6px;
}

.finder input::placeholder {
  color: rgba(241, 233, 221, 0.5);
}

.finder button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px 16px 6px 16px;
  background: rgba(86, 34, 139, 0.45);
  color: var(--paper);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

.finder button:hover {
  background: var(--purple);
}

.hits {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: none;
  width: 212px;
  max-height: 62vh;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #241b2e;
  border: 1px solid var(--line);
  border-radius: 16px 6px 16px 6px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
}

.hits.on {
  display: block;
}

.hits a {
  display: block;
  padding: 9px 10px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  border-radius: 10px;
}

.hits a:hover {
  background: rgba(160, 116, 214, 0.22);
}

/* 全屏遮罩菜单 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  gap: 22px;
  padding: 42px 20px;
  background: #150f1c;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.veil.on {
  opacity: 1;
  visibility: visible;
}

.veil-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.veil-list a {
  display: inline-block;
  min-height: 44px;
  padding: 11px 16px;
  color: var(--paper);
  text-decoration: none;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.veil-list a:hover {
  color: var(--moss);
}

.veil-close {
  justify-self: center;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 22px 8px 22px 8px;
  background: var(--purple);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  cursor: pointer;
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: 54px 20px 58px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(74vw, 640px);
  aspect-ratio: 1 / 1;
  border-radius: 58% 42% 47% 53% / 46% 55% 45% 54%;
  background: radial-gradient(circle at 42% 36%, rgba(86, 34, 139, 0.6), rgba(31, 23, 38, 0) 71%);
}

.ghost {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--font-pix);
  font-size: clamp(52px, 15vw, 168px);
  line-height: 1;
  letter-spacing: 0.05em;
  color: rgba(160, 116, 214, 0.15);
  will-change: transform;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 15em;
  margin: 0;
  font-size: clamp(30px, 6.4vw, 56px);
  line-height: 1.28;
  letter-spacing: 0.03em;
}

/* 主体骨架：侧栏在左 */
.wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px 66px;
}

.rail {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 22px 18px 18px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 24px 8px 24px 8px;
  box-shadow: -10px 14px 0 -6px rgba(139, 69, 19, 0.22);
}

.rail h2 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0.08em;
}

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

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px dashed rgba(241, 233, 221, 0.1);
  border-radius: 12px 4px 12px 4px;
  transition: color 0.16s ease, background 0.16s ease;
}

.rail a:hover {
  color: var(--paper);
  background: rgba(86, 34, 139, 0.34);
}

/* 眉题 */
small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-pix);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.18em;
  color: var(--moss);
}

/* 正文卡片 */
.stream {
  min-width: 0;
}

.stream article > div {
  position: relative;
  margin-bottom: 26px;
  padding: 30px 24px 34px;
  background: var(--ink-2);
  box-shadow: 14px 16px 0 -6px rgba(86, 34, 139, 0.17);
  scroll-margin-top: 96px;
}

.stream article > div::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--purple), var(--brown), var(--moss));
}

.stream article > div:nth-child(even) {
  background: var(--ink-3);
}

.stream article h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.38;
  letter-spacing: 0.02em;
}

.stream article h3 {
  margin: 22px 0 10px;
  font-size: 20px;
  line-height: 1.45;
  color: var(--paper);
}

.stream article p {
  margin: 0 0 14px;
  color: #e4daea;
}

.stream article ul,
.stream article ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.stream article li {
  margin-bottom: 8px;
}

.stream article a {
  color: var(--purple-lt);
  text-underline-offset: 3px;
}

.stream article strong {
  color: var(--moss);
}

.stream article blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  background: rgba(139, 69, 19, 0.16);
  border-left: 3px solid var(--brown-lt);
  border-radius: 0 16px 16px 0;
}

.stream article img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

/* 页脚 */
.base {
  padding: 38px 20px 26px;
  background: #191220;
  border-top: 1px solid var(--line);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto 34px;
  padding: 26px 24px;
  border-radius: 24px 8px 24px 8px;
  background: linear-gradient(120deg, rgba(86, 34, 139, 0.6), rgba(139, 69, 19, 0.46));
}

.cta-mark {
  margin: 0;
  font-size: clamp(22px, 4vw, 34px);
  letter-spacing: 0.07em;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 22px 8px 22px 8px;
  background: var(--paper);
  color: #241b2e;
  text-decoration: none;
  font-size: 17px;
}

.cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.addr {
  display: grid;
  gap: 5px;
  font-style: normal;
}

.addr-mark {
  font-size: 19px;
  letter-spacing: 0.1em;
}

.addr-host {
  color: var(--muted);
  font-size: 16px;
  word-break: break-all;
}

.col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.col a:hover {
  color: var(--paper);
}

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

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

.mini {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.mini a:hover {
  color: var(--paper);
}

@media (max-width: 1000px) {
  .dock {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .dock-side {
    display: none;
  }

  .mark {
    justify-self: center;
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-top: 0;
  }

  .rail {
    position: static;
    box-shadow: none;
  }

  .rail ul {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0 10px;
  }

  .cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 18px;
  }

  .dock {
    padding: 8px 12px;
    gap: 6px;
  }

  .finder input {
    width: 74px;
    padding: 7px 9px;
  }

  .finder button {
    padding: 0 10px;
  }

  .hero {
    min-height: 45vh;
    padding: 40px 16px 46px;
  }

  .wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stream article > div {
    padding: 24px 16px 28px;
    box-shadow: 9px 10px 0 -5px rgba(86, 34, 139, 0.18);
  }

  .cols {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cta {
    padding: 20px 18px;
  }
}

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

  .ghost {
    transform: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

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