@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --neon: #80ff00;
  --lime: #00ff00;
  --ink: #1f2617;
  --paper: #f4ffe2;
  --olive: #2c3620;
  --deep: #151a10;
  --soft: 0 10px 26px rgba(0, 0, 0, 0.42);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.55em; font-weight: 700; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 26px 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 10%, rgba(0, 255, 0, 0.18), transparent 46%),
    radial-gradient(circle at 6% 84%, rgba(128, 255, 0, 0.22), transparent 42%),
    var(--ink);
}

.hero-art-box {
  position: relative;
  transform: rotate(-1.8deg);
}

.hero-art {
  width: 100%;
  height: 30vh;
  object-fit: cover;
  border: 4px solid var(--neon);
  border-radius: 10px;
  filter: saturate(150%) contrast(106%);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.45);
}

.hero-slab {
  height: 30vh;
  border: 4px solid var(--neon);
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, var(--neon) 0 14px, var(--olive) 14px 30px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.45);
}

.sticker {
  position: absolute;
  z-index: 3;
  background: var(--lime);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  animation: jitter 2.6s ease-in-out infinite;
}

.st1 { right: 4px; bottom: -16px; transform: rotate(5deg); }

@keyframes jitter {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-4px); }
}

.hero-copy { text-align: right; }

.hero-h1 {
  display: inline-block;
  margin: 0 0 14px;
  font-size: clamp(2rem, 8.4vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.5px;
  color: #f8ffe9;
  background: linear-gradient(transparent 63%, var(--neon) 63%, var(--neon) 90%, transparent 90%);
  padding: 0 2px 6px;
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero-desc {
  margin: 0 0 18px auto;
  max-width: 34ch;
  font-size: 17px;
  color: #cfe3b4;
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  background: var(--lime);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(128, 255, 0, 0.45);
}

/* ---------- 跑马灯 ---------- */
.tape {
  position: relative;
  margin: 6px 10px 0;
  background: var(--neon);
  color: var(--ink);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(-1deg);
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 2px;
}

.tape span {
  display: block;
  white-space: nowrap;
  padding: 8px 0;
  animation: slide 26s linear infinite;
  will-change: transform;
}

.tape i { font-style: normal; padding: 0 10px; }

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

/* ---------- 主体 ---------- */
.wrap {
  display: grid;
  gap: 22px;
  padding: 34px 16px 46px;
  max-width: 1180px;
  margin: 0 auto;
}

.rail {
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 6px 6px 0 var(--neon);
  min-width: 0;
}

.rail-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  margin: 0 0 10px;
}

.rail-h > span:first-child {
  background: linear-gradient(transparent 58%, var(--neon) 58%);
}

.rail-h .dot { font-size: 13px; color: #48711a; }

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

.rail-list a {
  display: block;
  min-height: 40px;
  padding: 8px 10px;
  border: 2px solid rgba(31, 38, 23, 0.25);
  border-radius: 8px;
  font-size: 16px;
  text-decoration: none;
  overflow-wrap: break-word;
}

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

.rail-p { margin: 0; font-size: 16px; word-break: break-word; }

.doc { min-width: 0; }

.prose {
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 22px 18px;
  box-shadow: var(--soft);
  overflow-wrap: break-word;
  min-width: 0;
}

.prose article { scroll-margin-top: 18px; }

.prose article + article {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 2px dashed rgba(31, 38, 23, 0.35);
}

.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.18rem; }

.prose h2 > span,
.prose h3 > span {
  background: linear-gradient(transparent 60%, var(--neon) 60%);
  padding: 0 2px;
}

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

.prose a {
  color: #2c5800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}

.prose img {
  border: 3px solid var(--ink);
  border-radius: 10px;
  margin: 14px 0;
}

.prose ul,
.prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 0 0 1em;
  padding: 12px 14px;
  border-left: 6px solid var(--neon);
  background: rgba(128, 255, 0, 0.16);
  border-radius: 0 10px 10px 0;
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(21, 26, 16, 0.97);
  border-top: 3px solid var(--neon);
  max-width: 100%;
}

.dock-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 2px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--neon);
  text-decoration: none;
}

.dock-menu { position: relative; flex: 0 0 auto; }

.dock-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 20px;
  background: var(--neon);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
}

.dock-menu summary::-webkit-details-marker { display: none; }

.dock-menu[open] summary { background: var(--lime); transform: rotate(-2deg); }

.dock-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(88vw, 460px);
  margin: 0;
  padding: 10px;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 7px 7px 0 var(--neon);
  max-height: 62vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.dock-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  border: 2px solid rgba(31, 38, 23, 0.28);
  border-radius: 8px;
  font-size: 16px;
  text-decoration: none;
  overflow-wrap: break-word;
}

.dock-list a:hover { background: var(--neon); border-color: var(--ink); }

/* ---------- 页脚 ---------- */
.foot {
  background: var(--deep);
  border-top: 3px solid var(--neon);
  padding: 34px 18px 26px;
  column-count: 2;
  column-gap: 22px;
  font-size: 16px;
  color: #d5eabc;
}

.foot p { margin: 0 0 14px; break-inside: avoid; }
.f-brand { font-weight: 700; color: var(--neon); }
.f-meta { word-break: break-word; }
.f-links a { text-decoration: underline; text-underline-offset: 3px; }
.f-top a { text-decoration: underline; text-underline-offset: 3px; }

.f-copy {
  display: block;
  column-span: all;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(213, 234, 188, 0.3);
  font-size: 16px;
  color: #a9c48c;
}

/* ---------- 揭示动效 ---------- */
html.js .prose article {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js .prose article.in { opacity: 1; transform: none; }

html.js .rail-list li {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

html.js .rail-list.in li { opacity: 1; transform: none; }
html.js .rail-list.in li:nth-child(2) { transition-delay: 0.05s; }
html.js .rail-list.in li:nth-child(3) { transition-delay: 0.1s; }
html.js .rail-list.in li:nth-child(4) { transition-delay: 0.15s; }
html.js .rail-list.in li:nth-child(5) { transition-delay: 0.2s; }
html.js .rail-list.in li:nth-child(6) { transition-delay: 0.25s; }
html.js .rail-list.in li:nth-child(7) { transition-delay: 0.3s; }

/* ---------- 窄屏兜底 ---------- */
@media (max-width: 400px) {
  .dock { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .dock-brand { font-size: 16px; }
  .dock-menu summary { padding: 8px 16px; }
  .dock-list { width: min(84vw, 420px); grid-template-columns: 1fr; }
  .hero-h1 { font-size: 1.95rem; }
}

/* ---------- 桌面 ---------- */
@media (min-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 40px;
    padding: 44px 40px;
  }

  .hero-art,
  .hero-slab { height: 56vh; }
  .hero-desc { font-size: 18px; }

  .wrap {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 30px;
    padding: 46px 24px 64px;
  }

  .rail { position: sticky; top: 20px; align-self: start; }

  .prose { padding: 30px 32px; }

  .dock { padding: 12px 24px; }

  .foot { column-count: 4; column-gap: 28px; padding: 40px 28px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .prose article,
  html.js .rail-list li { opacity: 1; transform: none; }
}

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