:root {
  --paper: #f1efe8;
  --card: #fbfaf6;
  --ink: #1b1a18;
  --muted: #6d675c;
  --line: #d4cfc2;
  --accent: #b4452c;
  --accent-soft: #f3e6e0;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.75;
  background:
    repeating-linear-gradient(0deg, rgba(27, 26, 24, 0.035) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(27, 26, 24, 0.03) 0 1px, transparent 1px 32px),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 246, 0.94);
  border-bottom: 1px solid var(--ink);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 26px;
}

nav a {
  position: relative;
  padding: 20px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

nav a:hover { color: var(--ink); }
nav a.active { color: var(--ink); }

nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.stamp {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* ---------- 通用元素 ---------- */
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

.num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.box {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 2px 2px 0 rgba(27, 26, 24, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn:hover { background: var(--accent); border-color: var(--accent); }

.meta-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.breadcrumb {
  margin: 22px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { padding: 0 7px; color: var(--line); }

/* ---------- 首页 ---------- */
.home-title {
  margin: 34px 0 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

.home-title h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  margin-top: 28px;
  border: 1px solid var(--ink);
  background: var(--card);
  box-shadow: 4px 4px 0 rgba(27, 26, 24, 0.05);
}

.home-hero-main { padding: 34px 36px 30px; min-width: 0; }

.home-hero-side {
  padding: 26px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portrait {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
}

.facts { margin: 0; }

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}

.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); font-size: 11px; }

.intro-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.intro-tags span {
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.intro-tags span:last-child { border-right: 0; }

.intro-quote {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
}

.layout .main-col .section-head:not(:first-child) { margin-top: 28px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--ink);
}

.home-sections-head { margin-top: 30px; }

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
}

.section-head .count {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.section-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(27, 26, 24, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.section-card:hover {
  transform: translate(-1px, -1px);
  border-color: var(--accent);
  box-shadow: 5px 5px 0 rgba(181, 69, 44, 0.12);
}

.section-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-card-top .en {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.section-card h3 {
  margin: 10px 0 4px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
}

.section-card .desc {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.section-card .enter {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 86px;
  margin: 14px 0 16px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(0deg, rgba(27, 26, 24, 0.03) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(90deg, rgba(27, 26, 24, 0.03) 0 1px, transparent 1px 16px),
    #f4f1e9;
  overflow: hidden;
}

.thumb-board {
  display: grid;
  grid-template-columns: repeat(4, 18px);
  gap: 3px;
}

.thumb-board i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  background: #e9e2d4;
  color: #a0967f;
  font-family: var(--mono);
  font-style: normal;
  font-size: 6px;
}

.thumb-board i:nth-child(1) { background: #efe7dc; }
.thumb-board i:nth-child(2) { background: #eaddcd; }
.thumb-board i:nth-child(3) { background: #e8b98b; color: #fff; }
.thumb-board i:nth-child(4) { background: #e39c6b; color: #fff; }
.thumb-board i:nth-child(5) { background: #d97d55; color: #fff; }
.thumb-board i:nth-child(6) { background: #c95f40; color: #fff; }
.thumb-board i:nth-child(7) { background: #d8b25e; color: #fff; }
.thumb-board i:nth-child(8) { background: #cfa644; color: #fff; }

.thumb-lines {
  width: 72%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.thumb-lines i {
  height: 6px;
  background: #ded7c9;
  display: block;
}

.thumb-lines i:nth-child(1) { width: 92%; }
.thumb-lines i:nth-child(2) { width: 70%; }
.thumb-lines i:nth-child(3) { width: 82%; }
.thumb-lines i:nth-child(4) { width: 48%; }

.thumb-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thumb-profile .portrait {
  width: 42px;
  height: 42px;
  font-size: 19px;
}

.thumb-profile .thumb-name {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: left;
}

.thumb-word {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.18em;
  text-align: center;
}

.home-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- 子页布局 ---------- */
.page-intro {
  margin-top: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.page-intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.page-intro .lead { max-width: 720px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
  margin-top: 22px;
}

.side {
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side .box { padding: 18px 20px; }

.side-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

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

.index-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.index-list li:last-child a { border-bottom: 0; }
.index-list a:hover { color: var(--accent); }

.index-list span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
}

.colophon {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

/* ---------- 游戏 ---------- */
.feature {
  display: flex;
  gap: 24px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(27, 26, 24, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(27, 26, 24, 0.07);
}

.feature-copy { flex: 1 1 auto; min-width: 0; }

.feature h3 {
  margin: 7px 0 6px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.35;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
}

.feature-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.mini-board {
  flex: 0 0 auto;
  width: 148px;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  background: #eae5da;
  border: 1px solid var(--line);
}

.mini-board i {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #f7f4ec;
  color: #b9b2a4;
  font-family: var(--mono);
  font-style: normal;
  font-size: 8px;
  font-weight: 600;
}

.mini-board i[data-v="2"] { background: #efe7dc; color: #8a7b68; }
.mini-board i[data-v="4"] { background: #eaddcd; color: #8a7b68; }
.mini-board i[data-v="8"] { background: #e8b98b; color: #fff; }
.mini-board i[data-v="16"] { background: #e39c6b; color: #fff; }
.mini-board i[data-v="32"] { background: #d97d55; color: #fff; }
.mini-board i[data-v="64"] { background: #c95f40; color: #fff; }
.mini-board i[data-v="128"] { background: #d8b25e; color: #fff; }
.mini-board i[data-v="256"] { background: #cfa644; color: #fff; }
.mini-board i[data-v="512"] { background: #bf902f; color: #fff; }
.mini-board i[data-v="1024"] { background: #a97c22; color: #fff; }

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.duo .box { padding: 18px 20px; transition: border-color 0.2s ease; }
.duo .box:hover { border-color: var(--accent); }

.duo h3 {
  margin: 7px 0 5px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.duo p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.soon {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 7px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

/* ---------- 文章 ---------- */
.notes {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.notes li { border-bottom: 1px solid var(--line); }

.notes a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 6px;
  transition: background 0.2s ease;
}

.notes a:hover { background: rgba(180, 69, 44, 0.04); }

.notes .num { padding-top: 3px; font-size: 10px; }

.notes h3 {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.notes a:hover h3 { color: var(--accent); }

.notes p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.notes time {
  padding-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.info-box { padding: 22px 24px; margin-top: 24px; }

.info-box h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}

.info-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

/* ---------- 关于 ---------- */
.profile-box { padding: 24px; }

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-head .portrait { width: 62px; height: 62px; font-size: 27px; }

.profile-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.profile-role {
  margin: 2px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.profile-box p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats div {
  padding: 10px 0;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stats div:last-child { border-right: 0; }

.stats b {
  display: block;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.stats span { color: var(--muted); font-size: 10.5px; }

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

.changelog li {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.changelog li:last-child { border-bottom: 0; }

.changelog time {
  flex: 0 0 64px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
  padding-top: 2px;
}

/* ---------- 页脚 ---------- */
footer {
  margin-top: 42px;
  border-top: 1px solid var(--ink);
  padding: 18px 0 26px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .section-grid { grid-template-columns: 1fr; }
  .section-card { min-height: 0; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .side .colophon { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { height: 54px; gap: 16px; }
  nav { gap: 14px; }
  nav a { padding: 16px 0; font-size: 10.5px; }
  .stamp { display: none; }

  .home-hero { grid-template-columns: 1fr; margin-top: 20px; }
  .home-hero-main { padding: 24px 22px; }
  .home-hero-side { border-left: 0; border-top: 1px solid var(--line); padding: 20px 22px; }

  .layout { gap: 20px; margin-top: 16px; }
  .feature { flex-direction: column; gap: 18px; padding: 18px; }
  .mini-board { width: 100%; max-width: 200px; align-self: flex-start; }
  .duo { grid-template-columns: 1fr; }
  .notes a { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .notes time { grid-column: 2; padding-top: 0; }
  .side { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .brand span:last-child { display: none; }
  nav { gap: 10px; }
  nav a { font-size: 10px; letter-spacing: 0.04em; }
}
