@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

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

:root {
  --lime: #80ff00;
  --neon: #00ff00;
  --ink: #1f2617;
  --paper: #f2ffe0;
  --card: #fffff4;
  --mint: #d9ffab;
  --deep: #0d120a;
  --r: 28px;
  --edge: 3px solid var(--ink);
}

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

body {
  margin: 0;
  font-family: "DM Sans", "Nunito", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(31, 38, 23, .17) 1.1px, transparent 1.4px);
  background-size: 18px 18px;
}

h1, h2, h3, h4 {
  font-family: "Nunito", "DM Sans", system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}

a { color: inherit; }

img { max-width: 100%; }

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

/* 顶栏 */
.topbar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ink);
  border-bottom: 3px solid var(--lime);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 15px;
  background: var(--lime);
  color: var(--ink);
  border: var(--edge);
  border-radius: 999px;
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 1rem;
  text-decoration: none;
  transform: rotate(-2deg);
  animation: jitter 5s ease-in-out infinite;
}

.brand-mark {
  font-size: 1.05em;
  line-height: 1;
}

@keyframes jitter {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(1.6deg); }
}

.nav-details { position: relative; }

.nav-details > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 16px;
  background: var(--neon);
  border: var(--edge);
  border-radius: 999px;
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.nav-details > summary::-webkit-details-marker { display: none; }

.nav-details > summary::after {
  content: "\25be";
  font-size: .8em;
}

.nav-details > menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-details > menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 2px solid rgba(128, 255, 0, .55);
  border-radius: 999px;
  color: #eaffe0;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.nav-details > menu a:hover,
.nav-details > menu a:focus-visible {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.finder {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.finder input {
  width: 132px;
  min-height: 44px;
  padding: 8px 14px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.finder input:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 2px;
}

.finder button {
  min-height: 44px;
  min-width: 46px;
  padding: 8px 13px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
}

/* 锚点条 */
.pillbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  background: var(--lime);
  border-bottom: var(--edge);
  scrollbar-width: none;
}

.pillbar::-webkit-scrollbar { height: 0; }

.pillbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.pillbar a:first-child {
  background: var(--ink);
  color: var(--lime);
}

.pillbar a:hover { background: var(--neon); }

/* 跑马灯 */
.marquee {
  overflow: hidden;
  padding: 6px 0;
  background: var(--neon);
  border-bottom: var(--edge);
}

.marquee-in {
  display: inline-flex;
  white-space: nowrap;
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .04em;
  animation: slide 24s linear infinite;
}

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

/* 主区骨架 */
.page-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 16px 46px;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) 296px;
  grid-template-areas:
    "hero hero"
    "art rail";
  align-items: start;
}

/* Hero */
.hero {
  grid-area: hero;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: center;
  min-height: 45vh;
  padding: 24px;
  overflow: hidden;
  border: var(--edge);
  border-radius: var(--r);
  background-color: var(--mint);
  background-image: radial-gradient(rgba(31, 38, 23, .22) 1.2px, transparent 1.6px);
  background-size: 14px 14px;
}

.hero-txt { text-align: center; }

.hero h1 {
  font-size: clamp(1.85rem, 5.4vw, 3.2rem);
  margin-bottom: .35em;
}

.hero h1 {
  background: linear-gradient(transparent 64%, var(--neon) 64%);
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-lede {
  margin: 10px auto 0;
  max-width: 36ch;
  font-size: 1rem;
}

.hero-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 22px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 15px;
  text-decoration: none;
  transform: rotate(-1.6deg);
}

.btn.ghost {
  background: var(--card);
  color: var(--ink);
  transform: rotate(1.3deg);
}

.btn:hover { background: var(--neon); color: var(--ink); }

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  border: var(--edge);
  border-radius: 22px;
  transform: rotate(2.4deg);
  filter: saturate(135%);
}

.hero-blob {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: var(--edge);
  border-radius: 52% 46% 55% 48%;
  background: repeating-linear-gradient(48deg, var(--neon) 0 12px, var(--lime) 12px 24px);
  transform: rotate(-4deg);
}

.hero-stick {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: var(--edge);
  border-radius: 50%;
  background: var(--neon);
  font-size: 1.3rem;
  line-height: 1;
  transform: rotate(12deg);
}

/* 正文卡 */
.sheet {
  grid-area: art;
  position: relative;
  padding: 22px 20px 26px;
  background: var(--card);
  border: var(--edge);
  border-radius: var(--r);
  transform: rotate(-.35deg);
}

.sheet section { scroll-margin-top: 86px; }

.sheet section + section {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 3px dashed rgba(31, 38, 23, .3);
}

.sheet h2 {
  font-size: clamp(1.35rem, 3.4vw, 1.85rem);
  display: inline-block;
  padding-bottom: 2px;
  background: linear-gradient(transparent 62%, var(--lime) 62%);
}

.sheet h3 { font-size: 1.15rem; margin-top: 1.2em; }

.sheet p { margin: 0 0 1em; }

.sheet ul, .sheet ol { margin: 0 0 1.1em; padding-left: 1.25em; }

.sheet li { margin: .35em 0; }

.sheet li::marker { color: #43870a; font-weight: 900; }

.sheet a { color: #2f6d00; font-weight: 700; }

.sheet a:hover { background: var(--neon); }

.sheet blockquote {
  margin: 1.2em 0;
  padding: 13px 16px;
  border-left: 6px solid var(--neon);
  border-radius: 0 18px 18px 0;
  background: var(--mint);
}

.sheet img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border: var(--edge);
  border-radius: 20px;
}

.sheet hr {
  border: 0;
  width: 64px;
  height: 5px;
  margin: .1em 0 1.1em;
  border-radius: 4px;
  background: var(--ink);
}

.sheet table {
  width: 100%;
  margin: 0 0 1.2em;
  border-collapse: collapse;
  font-size: 15px;
}

.sheet th, .sheet td {
  padding: 8px 10px;
  border: 2px solid var(--ink);
  text-align: left;
}

.sheet th { background: var(--mint); font-family: "Nunito", sans-serif; }

.sheet code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--mint);
  font-size: .92em;
}

/* 右侧栏 */
.rail {
  grid-area: rail;
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rail-card {
  padding: 16px;
  background: var(--card);
  border: var(--edge);
  border-radius: 22px;
  transform: rotate(.9deg);
}

.rail h2 { font-size: 1.08rem; margin: 0; }

.rail hr {
  border: 0;
  width: 46px;
  height: 4px;
  margin: 8px 0 12px;
  border-radius: 3px;
  background: var(--neon);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.rail-list a:hover { background: var(--neon); }

.rail-sticker {
  width: 100%;
  height: auto;
  border: var(--edge);
  border-radius: 18px;
  transform: rotate(-2.2deg);
  filter: saturate(130%);
}

.rail-top { margin: 0; }

.rail-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px dashed var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.rail-top a:hover { background: var(--lime); }

/* 页脚 */
.foot {
  padding: 28px 16px 22px;
  background: var(--ink);
  color: #eaffe0;
  border-top: var(--edge);
  text-align: center;
}

.foot-cta { margin: 0 0 14px; }

.foot-cta a {
  display: inline-block;
  padding: 14px 28px;
  background: var(--lime);
  color: var(--ink);
  border: var(--edge);
  border-radius: 999px;
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 1.12rem;
  text-decoration: none;
  transform: rotate(-1.2deg);
}

.foot-cta a:hover { background: var(--neon); }

.foot small { display: block; font-size: 14px; opacity: .82; }

/* 滚动出现 */
.anim .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.anim .reveal.on {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .55s cubic-bezier(.2, .9, .3, 1.35);
}

/* 平板与手机 */
@media (max-width: 899px) {
  .nav-details { order: 4; width: 100%; }
  .nav-details > menu { display: none; }
  .nav-details[open] > menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: 10px;
  }
  .page-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hero"
      "art"
      "rail";
    gap: 20px;
    padding: 16px 13px 40px;
  }
  .sheet { transform: none; padding: 18px 15px 22px; }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px 15px 22px;
  }
  .hero-art { order: -1; max-height: 152px; overflow: hidden; border-radius: 20px; }
  .hero-img { height: 152px; object-fit: cover; transform: none; border-radius: 18px; }
  .hero-blob { aspect-ratio: auto; height: 120px; border-radius: 18px; transform: none; }
  .hero-lede { max-width: none; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .rail-card { flex: 1 1 230px; transform: none; }
  .rail-sticker { width: 44%; flex: 0 0 auto; }
}

@media (max-width: 620px) {
  .finder {
    order: 6;
    width: 100%;
    margin-left: 0;
  }
  .finder input { flex: 1 1 auto; width: auto; min-width: 0; }
  .brand { font-size: .95rem; padding: 8px 12px; }
  .marquee-in { font-size: 13px; }
  .hero-acts .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand, .marquee-in { animation: none; }
  .anim .reveal { opacity: 1; transform: none; }
  .anim .reveal.on { transition: none; }
}

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