/* ============================================================
   月球大蒜帝国 战争档案局 — 解密档案风格
   墨色纸面 · 印章红 · 衬线公文
   ============================================================ */

:root {
  --ink: #0b0d12;
  --ink-2: #10131a;
  --panel: #14171f;
  --line: #262b36;
  --line-soft: #1c202a;
  --bone: #d8d2c0;
  --bone-dim: #8f8b7d;
  --bone-faint: #5d5a4e;
  --seal: #b03a34;
  --seal-dark: #7e2823;
  --paper: #e6e0d0;
  --paper-ink: #26221a;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", "Source Han Serif SC", serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--ink);
  color: var(--bone);
  line-height: 2;
  font-size: 16px;
  overflow-x: hidden;
}

section { scroll-margin-top: 80px; }

::selection { background: var(--seal); color: var(--paper); }

/* ---------- 星空(克制) ---------- */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 40% at 50% -5%, rgba(216, 210, 192, 0.05), transparent),
    var(--ink);
}

.stars i {
  position: absolute;
  width: var(--s, 1.5px);
  height: var(--s, 1.5px);
  border-radius: 50%;
  background: var(--bone);
  opacity: 0;
  animation: twinkle var(--d, 6s) ease-in-out infinite alternate;
}

@keyframes twinkle {
  0%, 20% { opacity: 0.04; }
  50%     { opacity: var(--o, 0.3); }
  80%, 100% { opacity: 0.04; }
}

/* ---------- 静海广播台 ---------- */
.radio {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.55rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--bone-faint);
  background: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
}

.radio__tag {
  color: var(--seal);
  border: 1px solid var(--seal-dark);
  padding: 0.1rem 0.5rem;
  flex-shrink: 0;
}

.radio__line {
  transition: opacity 1.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio__line.fading { opacity: 0; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav__emblem { width: 30px; height: 30px; }
.nav__name { color: var(--bone); font-weight: 700; letter-spacing: 3px; font-size: 0.98rem; }
.nav__code { color: var(--bone-faint); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 2px; }

.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 2px;
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--bone); }

.nav__cta {
  flex-shrink: 0;
  color: var(--seal);
  text-decoration: none;
  border: 1px solid var(--seal-dark);
  padding: 0.35rem 1rem;
  font-size: 0.88rem;
  letter-spacing: 2px;
  transition: background 0.25s, color 0.25s;
}
.nav__cta:hover { background: var(--seal); color: var(--paper); }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}
@media (max-width: 460px) {
  .nav__code { display: none; }
  .nav__name { font-size: 0.88rem; letter-spacing: 2px; }
}

/* ---------- 卷首 ---------- */
.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(3.5rem, 9vw, 7rem) 1.5rem 0;
}

.hero__stamp {
  display: inline-flex;
  gap: 1.2rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--bone-faint);
  border: 1px solid var(--line);
  padding: 0.45rem 1.3rem;
}

.hero__stamp-declass {
  color: var(--seal);
  border: 1.5px solid var(--seal);
  padding: 0.08rem 0.45rem;
  transform: rotate(-2deg);
}

.hero__kicker {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 5px;
  color: var(--bone-dim);
}

.hero__title {
  margin-top: 1rem;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 6px;
  line-height: 1.4;
}

.hero__sub {
  max-width: 560px;
  margin: 1.4rem auto 0;
  color: var(--bone-dim);
  font-size: 0.98rem;
}

/* 倒计时 */
.countdown {
  margin: 3.2rem auto 0;
  max-width: 660px;
}

.countdown__label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 6px;
  color: var(--bone-faint);
  margin-bottom: 1.1rem;
}

.countdown__grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.countdown__cell {
  min-width: clamp(78px, 14vw, 120px);
  padding: 0.4rem 0.3rem;
  border-left: 1px solid var(--line-soft);
}

.countdown__cell:first-child { border-left: none; }

.countdown__cell span {
  display: block;
  font-family: var(--mono);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  line-height: 1.2;
}

.countdown__cell small {
  color: var(--bone-faint);
  font-size: 0.72rem;
  letter-spacing: 4px;
}

.countdown__note {
  margin: 1.4rem auto 0;
  max-width: 520px;
  color: var(--bone-faint);
  font-size: 0.85rem;
  line-height: 2;
}

.hero__actions {
  margin-top: 2.6rem;
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__btn {
  color: var(--bone);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.8rem 2.2rem;
  font-size: 0.95rem;
  letter-spacing: 4px;
  transition: border-color 0.25s, background 0.25s;
}

.hero__btn:hover { border-color: var(--bone-dim); }

.hero__btn--solid {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
  font-weight: 700;
}
.hero__btn--solid:hover { background: var(--paper); border-color: var(--paper); }

.hero__scene {
  max-width: 1150px;
  margin: 0.5rem auto 0;
}

.hero__art { width: 100%; height: auto; display: block; }

.clove {
  animation: transit 9s ease-in-out infinite alternate;
}
.clove--2 { animation-duration: 12s; animation-delay: -3s; }
.clove--3 { animation-duration: 10s; animation-delay: -6s; }

@keyframes transit {
  from { transform: translateX(-8px); }
  to   { transform: translateX(8px); }
}

.hero__hint {
  color: var(--bone-faint);
  font-size: 0.8rem;
  letter-spacing: 3px;
  padding: 0.6rem 0 3rem;
}

/* ---------- 章节 ---------- */
.chapter {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem;
}

.chapter--paper {
  max-width: none;
  background: var(--ink-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.chapter--paper > * { max-width: 880px; margin-left: auto; margin-right: auto; }

.chapter__mark {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 4px;
  color: var(--seal);
  border: 1px solid var(--seal-dark);
  padding: 0.25rem 0.8rem;
  margin-bottom: 1.6rem;
}

.chapter__head h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 1.2rem;
}

.chapter__lead {
  color: var(--bone-dim);
  font-size: 0.96rem;
  border-left: 3px solid var(--line);
  padding-left: 1.1rem;
  margin-bottom: 3rem;
}

/* ---------- 编年史 ---------- */
.chronicle { display: flex; flex-direction: column; }

.chron {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.6rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.chron:first-child { border-top: 1px solid var(--line-soft); }

.chron__when {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--bone);
  letter-spacing: 1px;
}

.chron__when i {
  display: block;
  font-style: normal;
  color: var(--bone-faint);
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

.chron__what { color: var(--bone-dim); font-size: 0.97rem; }
.chron__what::first-letter { color: var(--bone); }

@media (max-width: 640px) {
  .chron { grid-template-columns: 1fr; gap: 0.5rem; }
}

.verdict {
  margin-top: 3rem;
  padding: 1.8rem 2rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--seal);
  background: var(--panel);
}

.verdict p { color: var(--bone); font-size: 1.04rem; }

/* ---------- 备忘录 ---------- */
.memo { display: grid; gap: 2.2rem; }

.memo__item h3 {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--bone);
  margin-bottom: 0.5rem;
}

.memo__item h3::before {
  content: "§ ";
  color: var(--seal);
  font-weight: 400;
}

.memo__item p { color: var(--bone-dim); font-size: 0.97rem; }

.postscript {
  margin-top: 3.2rem;
  text-align: right;
  border-top: 1px dashed var(--line);
  padding-top: 1.8rem;
}

.postscript p { color: var(--bone); font-size: 1.02rem; text-align: left; }

.postscript__sign {
  display: block;
  margin-top: 1rem;
  color: var(--bone-faint);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 2px;
}

/* ---------- 战役日程 ---------- */
.course__list { display: flex; flex-direction: column; gap: 2.6rem; }

.course__item { display: grid; grid-template-columns: 150px 1fr; gap: 1.8rem; }

.course__day {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 3px;
  color: var(--seal);
  padding-top: 0.35rem;
}

.course__item p { color: var(--bone-dim); font-size: 0.97rem; }

.course__blank {
  display: inline-block;
  width: 3.2em;
  border-bottom: 1.5px solid var(--bone-faint);
  transform: translateY(-0.2em);
}

.redacted {
  color: var(--bone-faint);
  background: repeating-linear-gradient(-45deg, transparent 0 5px, rgba(143,139,125,0.07) 5px 10px);
  padding: 0 0.2em;
}

@media (max-width: 640px) {
  .course__item { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- 条约 ---------- */
.treaty { display: flex; flex-direction: column; }

.article {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.article:first-child { border-top: 1px solid var(--line-soft); }

.article__no {
  font-family: var(--mono);
  color: var(--bone);
  font-size: 0.88rem;
  letter-spacing: 2px;
  padding-top: 0.2rem;
}

.article p { color: var(--bone-dim); font-size: 0.97rem; }

@media (max-width: 640px) {
  .article { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---------- 答问 ---------- */
.qa { display: flex; flex-direction: column; gap: 0.9rem; }

.qa__item {
  border: 1px solid var(--line);
  background: var(--panel);
}

.qa__item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  padding-right: 3.2rem;
  transition: color 0.25s;
}

.qa__item summary::-webkit-details-marker { display: none; }
.qa__item summary:hover { color: var(--seal); }

.qa__item summary::before {
  content: "问";
  color: var(--seal);
  font-weight: 400;
  margin-right: 0.7em;
}

.qa__item summary::after {
  content: "+";
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  color: var(--bone-faint);
  transition: transform 0.3s;
}

.qa__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa__item[open] summary { color: var(--bone); border-bottom: 1px solid var(--line-soft); }

.qa__item p {
  padding: 1.1rem 1.4rem 1.2rem;
  color: var(--bone-dim);
  font-size: 0.96rem;
}

.qa__item p::before {
  content: "答 ";
  color: var(--bone);
  font-weight: 700;
}

/* ---------- 受理处表单 ---------- */
.form {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

.form__field { display: block; margin-bottom: 1.4rem; }

.form__field > span {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--bone);
  margin-bottom: 0.5rem;
}

.form__field > span::before {
  content: "— ";
  color: var(--seal);
}

.form input[type="text"],
.form select {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.25s;
  border-radius: 0;
}

.form input:focus, .form select:focus { border-color: var(--bone-dim); }
.form input::placeholder { color: var(--bone-faint); }

.form__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; }

.form__submit {
  font-family: var(--serif);
  background: var(--seal);
  color: var(--paper);
  border: 1px solid var(--seal);
  padding: 0.85rem 2.4rem;
  font-size: 1rem;
  letter-spacing: 4px;
  cursor: pointer;
  transition: background 0.25s;
}
.form__submit:hover { background: var(--seal-dark); }

.form__hesitate {
  font-family: var(--serif);
  background: transparent;
  color: var(--bone-dim);
  border: 1px solid var(--line);
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.form__hesitate:hover { border-color: var(--bone-faint); color: var(--bone); }

.form__note {
  margin-top: 1.6rem;
  font-size: 0.82rem;
  color: var(--bone-faint);
  border-top: 1px dashed var(--line);
  padding-top: 1.1rem;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-soft);
  background: #090b10;
  padding: 3rem 1.5rem;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.footer__id { display: flex; gap: 1rem; align-items: flex-start; }
.footer__emblem { width: 52px; height: 52px; flex-shrink: 0; }
.footer__name { font-weight: 700; letter-spacing: 2px; }
.footer__code { font-family: var(--mono); font-size: 0.75rem; color: var(--bone-faint); margin-top: 0.5rem; letter-spacing: 2px; }

.footer__text { max-width: 520px; color: var(--bone-dim); font-size: 0.88rem; }
.footer__text p { margin-bottom: 0.5rem; }
.footer__small { color: var(--bone-faint); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 1px; margin-top: 1rem; }

/* ---------- 受理凭证(纸质公文) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 9, 0.82);
  padding: 1.5rem;
}

.modal[hidden] { display: none; }

.modal__paper {
  position: relative;
  max-width: 520px;
  width: 100%;
  background: var(--paper);
  color: var(--paper-ink);
  border: 1px solid #c9c2ad;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px #c9c2ad, 0 30px 80px rgba(0,0,0,0.7);
  padding: 2.4rem 2.2rem 2rem;
  animation: settle 0.5s ease;
}

@keyframes settle {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: #8a836c;
  font-size: 1.7rem;
  cursor: pointer;
  line-height: 1;
}
.modal__close:hover { color: var(--seal); }

.modal__seal {
  position: absolute;
  top: 1.4rem;
  right: 2.6rem;
  width: 74px;
  height: 74px;
  border: 3px solid var(--seal);
  border-radius: 50%;
  color: var(--seal);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 4px;
  transform: rotate(12deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
}

.modal__title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 5px;
  margin-bottom: 1.2rem;
}

.modal__body { font-size: 0.95rem; line-height: 2.1; margin-bottom: 1.4rem; }

.modal__cert {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 2.2;
  border-top: 2px solid var(--paper-ink);
  border-bottom: 1px solid #b5ad94;
  padding: 1rem 0.2rem;
  margin-bottom: 1.6rem;
}

.modal__cert b { color: var(--seal); font-weight: 700; }

.modal__ok {
  font-family: var(--serif);
  width: 100%;
  background: var(--paper-ink);
  color: var(--paper);
  border: none;
  padding: 0.85rem;
  font-size: 0.98rem;
  letter-spacing: 4px;
  cursor: pointer;
}
.modal__ok:hover { background: #3a3428; }

/* ---------- 404 ---------- */
.nf-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.nf-code {
  font-family: var(--mono);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 200;
  color: var(--bone);
  line-height: 1;
  letter-spacing: 8px;
}

.nf-page h1 { font-size: 1.25rem; margin: 2rem 0 1rem; letter-spacing: 3px; }
.nf-page p { color: var(--bone-dim); max-width: 460px; margin-bottom: 2.4rem; font-size: 0.95rem; }
