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

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

:root {
  --plum: #56228b;
  --rust: #8b4513;
  --ink: #1f1726;
  --paper: #f4ece5;
  --muted: #bcabc4;
  --line: rgba(244, 236, 229, 0.14);
  --card: rgba(244, 236, 229, 0.055);
  --shadow: 0 22px 46px -28px rgba(0, 0, 0, 0.95);
  --font: 'Exo 2', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --display: 'Orbitron', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50vw 44vw at 92% -8%, rgba(86, 34, 139, 0.62), transparent 68%),
    radial-gradient(42vw 38vw at 2% 98%, rgba(139, 69, 19, 0.46), transparent 70%),
    radial-gradient(30vw 26vw at 70% 60%, rgba(86, 34, 139, 0.18), transparent 72%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.017) 0 2px, transparent 2px 4px);
}

a { color: #dbb6f0; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid #d9a97a; outline-offset: 3px; }

/* 顶部细条 */
.strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  z-index: 40;
  background: rgba(31, 23, 38, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(9px);
}

.strip p {
  margin: 0;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 左侧竖排导航 */
.rail {
  position: fixed;
  top: 44px;
  bottom: 0;
  left: 0;
  width: 92px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 26px 0;
  background: linear-gradient(180deg, rgba(86, 34, 139, 0.66), rgba(31, 23, 38, 0.94) 56%);
  border-right: 1px solid var(--line);
}

.mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 54% 46% 58% 42% / 46% 54% 46% 54%;
  background: linear-gradient(140deg, var(--plum), var(--rust));
  color: var(--paper);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.95);
  transition: transform 0.35s ease, border-radius 0.45s ease;
}

.mark:hover { transform: rotate(-6deg) scale(1.06); border-radius: 42% 58% 44% 56% / 56% 44% 58% 42%; }
.mark img { width: 34px; height: 34px; object-fit: contain; }

.dock { position: relative; width: 100%; }

.dock summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
  padding: 12px 4px;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--paper);
  border-radius: 16px 12px 18px 14px;
  border: 1px solid var(--line);
  background: rgba(244, 236, 229, 0.06);
  transition: background 0.3s ease, color 0.3s ease;
}

.dock summary::-webkit-details-marker { display: none; }
.dock summary::marker { content: ""; }
.dock summary:hover { background: rgba(86, 34, 139, 0.45); }
.dock[open] > summary { background: rgba(86, 34, 139, 0.72); color: #fff; }

.dock-menu {
  position: absolute;
  left: calc(100% + 12px);
  top: 0;
  margin: 0;
  padding: 10px;
  list-style: none;
  width: 196px;
  display: grid;
  gap: 2px;
  z-index: 60;
  background: #241a2d;
  border: 1px solid var(--line);
  border-radius: 20px 16px 22px 18px;
  box-shadow: 0 30px 60px -26px #000;
}

.dock-menu li { display: block; }

.dock-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--paper);
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.dock-menu a:hover { background: rgba(139, 69, 19, 0.45); transform: translateX(3px); }

/* 主体 */
main {
  position: relative;
  z-index: 1;
  padding: 44px 0 0 92px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 30px 64px;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

/* 侧栏目录 */
.side {
  position: sticky;
  top: 78px;
  order: 1;
  padding-top: 44px;
}

.side h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.side hr {
  border: 0;
  height: 1px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, var(--rust), transparent);
}

.index {
  list-style: none;
  counter-reset: idx;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.index li { counter-increment: idx; }

.index a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 15px 12px 16px 13px;
  font-size: 15px;
  line-height: 1.45;
  color: #dbcfdf;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.index a::before {
  content: counter(idx, decimal-leading-zero);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--rust);
}

.index a:hover { background: rgba(86, 34, 139, 0.4); color: #fff; transform: translateX(3px); }

/* 首屏 */
.stage { order: 2; min-width: 0; }

.hero {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  gap: 16px;
  padding: 56px 0 34px;
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: 1.14;
  letter-spacing: 0.005em;
  overflow-wrap: break-word;
  background: linear-gradient(118deg, #f8f2ec 26%, #cba6e8 64%, #d8a878 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  margin: 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

/* 正文 */
.body { display: block; padding-bottom: 8px; }

.body > div {
  scroll-margin-top: 84px;
  margin: 0 0 26px;
  padding: 30px 28px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px 18px 26px 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}

.body > div:nth-child(2n) { border-radius: 16px 26px 18px 24px; }
.body > div:nth-child(3n) { border-radius: 22px 24px 16px 20px; }

.body h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.28rem, 2.7vw, 1.72rem);
  line-height: 1.38;
  color: #f8f1eb;
}

.body h3 {
  margin: 22px 0 8px;
  font-size: 1.12rem;
  font-weight: 600;
  color: #e9d9f1;
}

.body hr {
  border: 0;
  height: 1px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, var(--rust), rgba(244, 236, 229, 0.06));
}

.body p { margin: 0 0 14px; }
.body p:last-child { margin-bottom: 0; }
.body ul, .body ol { margin: 0 0 16px; padding-left: 22px; }
.body li { margin: 0 0 8px; }
.body a { color: #dbb6f0; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.body a:hover { color: #fff; }
.body blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--plum);
  border-radius: 0 16px 16px 0;
  background: rgba(86, 34, 139, 0.22);
  color: #ecdff3;
}
.body strong { color: #fbf4ee; }
.body img { border-radius: 18px; }

/* 动效 */
.rise { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.3, 1); }
.rise.in { opacity: 1; transform: none; }

/* 页脚 */
footer {
  position: relative;
  z-index: 1;
  padding: 0 0 42px 92px;
}

.fcols {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 30px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.1fr 1.3fr auto;
  gap: 26px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.fcols address {
  font-style: normal;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #f2e7ee;
}

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

.flinks a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #dbcfdf;
  text-decoration: none;
}

.flinks a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.copy { margin: 0; text-align: right; font-size: 13px; letter-spacing: 0.04em; }

/* 移动端 */
@media (max-width: 860px) {
  .rail {
    top: auto;
    bottom: 0;
    right: 0;
    width: auto;
    height: 66px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    background: rgba(31, 23, 38, 0.96);
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .mark { width: 46px; height: 46px; font-size: 18px; }
  .dock { width: auto; }
  .dock summary { width: auto; padding: 10px 20px; }

  .dock-menu {
    top: auto;
    bottom: calc(100% + 12px);
    left: auto;
    right: 0;
    width: min(78vw, 258px);
    max-height: 56vh;
    overflow: auto;
  }

  main { padding: 44px 0 0; }

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

  .side { position: static; order: 3; padding-top: 12px; }
  .stage { order: 1; }

  .hero { min-height: 40vh; padding: 34px 0 26px; gap: 12px; }
  .hero h1 { font-size: clamp(1.85rem, 8.6vw, 2.6rem); }
  .hero .sub { font-size: 16px; }

  .body > div { padding: 22px 16px 16px; margin-bottom: 20px; scroll-margin-top: 60px; }

  footer { padding: 0 0 104px; }
  .fcols { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 22px 18px 0; align-items: start; }
  .copy { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .mark, .index a, .dock-menu a { transition: none; }
}

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