:root {
  --ink: #1c2421;
  --muted: #5b665f;
  --paper: #fbf7ed;
  --surface: #fffdf6;
  --line: #ded2bd;
  --carrot: #e07b39;
  --leaf: #5f8a55;
  --bone: #efe5ce;
  --wolf: #6f5147;
  --water: #6aa6b5;
  --gold: #c99b43;
  --shadow: 0 18px 50px rgba(63, 47, 30, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 247, 237, 0.92);
  border-bottom: 1px solid rgba(115, 92, 62, 0.16);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(76, 56, 32, 0.12);
  overflow: hidden;
}

.brand-mark-island {
  background-color: #fff8e6;
  background-image: url("../assets/images/icons/wealth-island-icon.png");
  background-image: image-set(
    url("../assets/images/icons/wealth-island-icon.webp") type("image/webp"),
    url("../assets/images/icons/wealth-island-icon.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.nav-links {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  padding: 8px 10px;
}

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 42px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 46px;
}

.hero-art {
  min-height: 440px;
  border: 1px solid rgba(87, 70, 42, 0.18);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-art svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 440px;
}

.hero-art picture,
.market-picture picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  object-position: center;
}

.image-hero {
  background: #f7eedc;
}

.hero-content {
  max-width: 500px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--carrot);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 82px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-title {
  font-size: clamp(42px, 6.6vw, 62px);
}

.hero-title span {
  display: inline-block;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.25;
}

.lead {
  margin: 22px 0 28px;
  color: #3f4b45;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid transparent;
}

.button.primary {
  color: #fffaf0;
  background: var(--wolf);
}

.button.secondary {
  color: #523c2c;
  background: #fff8e6;
  border-color: #d7bd8f;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-head p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.world-band,
.invest-band,
.system-band {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1120px) / 2));
  padding-right: max(16px, calc((100% - 1120px) / 2));
}

.world-band {
  background: #eef5df;
}

.invest-band {
  background: #eef6f7;
}

.system-band {
  background: #f4ead8;
}

.faction-grid,
.matrix,
.chapter-grid,
.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.matrix,
.rules {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chapter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chapter-link {
  display: block;
}

.chapter-link article {
  height: 100%;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.chapter-link:hover article {
  transform: translateY(-2px);
  border-color: #c99b43;
  box-shadow: 0 14px 32px rgba(76, 56, 32, 0.13);
}

.map-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 18px;
  padding: 14px 16px;
  border-radius: 8px;
  color: #435048;
  background: #eef5df;
  border: 1px solid #c8d8a5;
}

.map-note strong {
  color: #4d6f43;
  white-space: nowrap;
}

.map-note span {
  flex: 1;
}

.reset-progress-button {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #d7bd8f;
  color: #523c2c;
  background: #fff8e6;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.reset-progress-button:hover {
  background: #f7ead0;
}

.chapter-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.chapter-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(76, 56, 32, 0.08);
}

a.chapter-card {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

a.chapter-card:hover {
  transform: translateY(-2px);
  border-color: #c99b43;
  box-shadow: 0 14px 32px rgba(76, 56, 32, 0.13);
}

.chapter-card.upcoming {
  background: #fffaf0;
}

.chapter-card.is-completed {
  border-color: #a9c486;
  background: #fbfff2;
}

.chapter-card.is-completed .chapter-meta strong {
  color: #fffaf0;
  background: var(--leaf);
}

.chapter-card.is-completed .unlock-line {
  background: #eef5df;
  border-color: #c8d8a5;
}

.chapter-thumb {
  min-height: 132px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(112, 87, 51, 0.14);
}

.thumb-market {
  background-image: url("../assets/images/chapter-1-market-barter.png");
  background-image: image-set(
    url("../assets/images/chapter-1-market-barter.webp") type("image/webp"),
    url("../assets/images/chapter-1-market-barter.png") type("image/png")
  );
  background-position: 66% 60%;
}

.thumb-coins {
  background-image: url("../assets/images/chapter-2-carrot-coins.png");
  background-image: image-set(
    url("../assets/images/chapter-2-carrot-coins.webp") type("image/webp"),
    url("../assets/images/chapter-2-carrot-coins.png") type("image/png")
  );
  background-position: 72% 42%;
}

.thumb-bone,
.thumb-price,
.thumb-shop,
.thumb-ledger,
.thumb-bank,
.thumb-marketplace,
.thumb-contract,
.thumb-cycle {
  background-image: url("../assets/images/world-style-guide.png");
  background-image: image-set(
    url("../assets/images/world-style-guide.webp") type("image/webp"),
    url("../assets/images/world-style-guide.png") type("image/png")
  );
  background-size: 300%;
}

.thumb-bone {
  background-image: url("../assets/images/chapter-3-exchange-rate.png");
  background-image: image-set(
    url("../assets/images/chapter-3-exchange-rate.webp") type("image/webp"),
    url("../assets/images/chapter-3-exchange-rate.png") type("image/png")
  );
  background-size: 100% auto;
  background-position: center 34%;
}

.thumb-price {
  background-image: url("../assets/images/chapter-4-meat-price.png");
  background-image: image-set(
    url("../assets/images/chapter-4-meat-price.webp") type("image/webp"),
    url("../assets/images/chapter-4-meat-price.png") type("image/png")
  );
  background-size: 100% auto;
  background-position: center 42%;
}

.thumb-shop {
  background-image: url("../assets/images/chapter-5-rabbit-shop.png");
  background-image: image-set(
    url("../assets/images/chapter-5-rabbit-shop.webp") type("image/webp"),
    url("../assets/images/chapter-5-rabbit-shop.png") type("image/png")
  );
  background-size: 100% auto;
  background-position: center 42%;
}

.thumb-bank {
  background-image: url("../assets/images/chapter-7-bone-carrot-bank.png");
  background-image: image-set(
    url("../assets/images/chapter-7-bone-carrot-bank.webp") type("image/webp"),
    url("../assets/images/chapter-7-bone-carrot-bank.png") type("image/png")
  );
  background-size: 100% auto;
  background-position: center 42%;
}

.thumb-ledger {
  background-image: url("../assets/images/chapter-6-ledger-cashflow.png");
  background-image: image-set(
    url("../assets/images/chapter-6-ledger-cashflow.webp") type("image/webp"),
    url("../assets/images/chapter-6-ledger-cashflow.png") type("image/png")
  );
  background-size: 100% auto;
  background-position: center 42%;
}

.thumb-marketplace {
  background-position: 84% 84%;
}

.thumb-contract {
  background-image: url("../assets/images/chapter-8-wolf-meat-shop-partners.png");
  background-image: image-set(
    url("../assets/images/chapter-8-wolf-meat-shop-partners.webp") type("image/webp"),
    url("../assets/images/chapter-8-wolf-meat-shop-partners.png") type("image/png")
  );
  background-size: 100% auto;
  background-position: center 42%;
}

.thumb-cycle {
  background-image: url("../assets/images/chapter-9-wealth-island-cycle.png");
  background-image: image-set(
    url("../assets/images/chapter-9-wealth-island-cycle.webp") type("image/webp"),
    url("../assets/images/chapter-9-wealth-island-cycle.png") type("image/png")
  );
  background-size: 100% auto;
  background-position: center 42%;
}

.chapter-card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.chapter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.chapter-meta strong {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fffaf0;
  background: var(--carrot);
  white-space: nowrap;
}

.upcoming .chapter-meta strong {
  color: #65432e;
  background: #efe5ce;
}

.unlock-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #4e5a53;
  background: #eef5df;
  border: 1px solid #c8d8a5;
}

.unlock-line span {
  color: #4d6f43;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.unlock-line strong {
  color: #382b21;
}

.upcoming .unlock-line {
  background: #fff8e6;
  border-color: #ead5aa;
}

.upcoming .unlock-line span {
  color: #765433;
}

.chapter-card h3,
.chapter-card p,
.chapter-card small {
  margin: 0;
}

.chapter-card p {
  color: var(--muted);
}

.chapter-card small {
  color: #765433;
  font-weight: 800;
}

.faction,
.matrix article,
.chapter-grid article,
.rules article,
.timeline article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 26px rgba(76, 56, 32, 0.08);
}

.faction-portrait {
  height: 170px;
  margin: -8px -8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(112, 87, 51, 0.15);
  background-image: url("../assets/images/world-style-guide.png");
  background-image: image-set(
    url("../assets/images/world-style-guide.webp") type("image/webp"),
    url("../assets/images/world-style-guide.png") type("image/png")
  );
  background-repeat: no-repeat;
  background-size: 390%;
  box-shadow: inset 0 -40px 56px rgba(255, 250, 240, 0.35);
}

.portrait-wolf {
  background-position: 5% 7%;
}

.portrait-rabbit {
  background-position: 34% 8%;
}

.portrait-market {
  background-size: 230%;
  background-position: 80% 82%;
}

.faction-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  font-weight: 900;
}

.coin-icon {
  background-color: #fff8e6;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  border: 1px solid #d7bd8f;
  box-shadow: 0 8px 18px rgba(76, 56, 32, 0.1);
}

.bone-coin-icon {
  background-image: image-set(
    url("../assets/images/icons/bone-coin.webp") type("image/webp"),
    url("../assets/images/icons/bone-coin.png") type("image/png")
  );
}

.carrot-coin-icon {
  background-image: image-set(
    url("../assets/images/icons/carrot-coin.webp") type("image/webp"),
    url("../assets/images/icons/carrot-coin.png") type("image/png")
  );
}

.wolf .faction-icon {
  color: #fff8ed;
  background: var(--wolf);
}

.rabbit .faction-icon {
  color: #fff8ed;
  background: var(--carrot);
}

.wolf .coin-icon,
.rabbit .coin-icon {
  background-color: #fff8e6;
  background-position: center;
  background-size: 100%;
  background-repeat: no-repeat;
}

.wolf .bone-coin-icon {
  background-image: image-set(
    url("../assets/images/icons/bone-coin.webp") type("image/webp"),
    url("../assets/images/icons/bone-coin.png") type("image/png")
  );
}

.rabbit .carrot-coin-icon {
  background-image: image-set(
    url("../assets/images/icons/carrot-coin.webp") type("image/webp"),
    url("../assets/images/icons/carrot-coin.png") type("image/png")
  );
}

.bridge .faction-icon {
  color: #fff8ed;
  background: var(--leaf);
}

.faction p,
.matrix p,
.chapter-grid p,
.rules p,
.timeline p {
  margin: 0;
  color: var(--muted);
}

.faction ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: #435048;
}

.tag {
  display: inline-block;
  margin-bottom: 14px;
  color: #765433;
  font-size: 13px;
  font-weight: 800;
}

.business-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fffaf0;
}

.business-flow div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

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

.business-flow strong,
.business-flow span {
  display: block;
}

.business-flow span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.timeline span,
.chapter-grid span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-weight: 900;
}

.footer {
  padding: 30px 16px 44px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    max-width: none;
  }

  .faction-grid,
  .matrix,
  .chapter-grid,
  .chapter-map,
  .rules,
  .timeline,
  .business-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-flow div:nth-child(2) {
    border-right: 0;
  }

  .business-flow div {
    border-bottom: 1px solid var(--line);
  }

  .business-flow div:nth-child(n + 3) {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 128px;
  }

  .nav {
    height: auto;
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
  }

  .nav-links a {
    padding: 8px 4px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-art,
  .hero-art svg,
  .hero-art img {
    min-height: 300px;
  }

  .faction-grid,
  .matrix,
  .chapter-grid,
  .chapter-map,
  .rules,
  .timeline,
  .business-flow {
    grid-template-columns: 1fr;
  }

  .map-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .chapter-thumb {
    min-height: 170px;
  }

  .business-flow div,
  .business-flow div:nth-child(2),
  .business-flow div:nth-child(n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .business-flow div:last-child {
    border-bottom: 0;
  }
}
