:root {
  --green: #5c8a5e;
  --earth: #6b4c2a;
  --white: #faf8f4;
  --cream: #f5f0e8;
  --olive: #8b9556;
  --clay: #c4895a;
  --gold-deep: #b8960c;
  --gold: #c8a84b;
  --ink: #28241d;
  --muted: #756957;
  --dark: #1f241b;
  --line: rgba(107, 76, 42, 0.2);
  --line-strong: rgba(107, 76, 42, 0.34);
  --glow: 0 0 34px rgba(200, 168, 75, 0.28);
  --shadow: 0 26px 80px rgba(67, 48, 26, 0.18);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(107, 76, 42, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(107, 76, 42, 0.035) 1px, transparent 1px),
    var(--white);
  background-size: 36px 36px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

img {
  display: block;
  max-width: 100%;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  background: transparent;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--clay));
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(250, 248, 244, 0.16);
  background: rgba(31, 36, 27, 0.52);
  color: var(--white);
  backdrop-filter: blur(16px);
}

.site-header.light-header {
  color: var(--ink);
  border-bottom-color: rgba(107, 76, 42, 0.14);
  background: rgba(250, 248, 244, 0.9);
}

.nav {
  width: min(var(--max), calc(100% - 40px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
}

.brand-seal {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
}

.brand-name {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.brand-name span {
  opacity: 0.58;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 14px;
  opacity: 0.82;
  font-size: 14px;
  font-weight: 800;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  opacity: 1;
  border-color: rgba(200, 168, 75, 0.35);
  background: rgba(200, 168, 75, 0.2);
  outline: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: currentColor;
  background: transparent;
  align-items: center;
  justify-content: center;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.menu-lines::before {
  transform: translateY(-6px);
}

.menu-lines::after {
  transform: translateY(4px);
}

.game-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: var(--dark);
  isolation: isolate;
}

.impression-image {
  position: absolute;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, var(--parallax, 0), 0) scale(1.04);
}

.impression-wash {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(31, 36, 27, 0.6) 0%, rgba(31, 36, 27, 0.22) 50%, rgba(107, 76, 42, 0.05) 100%),
    linear-gradient(180deg, rgba(31, 36, 27, 0.35) 0%, rgba(31, 36, 27, 0.05) 45%, rgba(107, 76, 42, 0.15) 100%),
    radial-gradient(ellipse at 70% 25%, rgba(200, 168, 75, 0.34), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(139, 149, 86, 0.18), transparent 50%);
}

.path-lights {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.path-light {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.8);
  box-shadow: 0 0 18px rgba(200, 168, 75, 0.9);
  animation: drift var(--duration) ease-in-out infinite alternate;
  opacity: var(--alpha);
}

.scene-hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.scene-hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  min-width: 66px;
  min-height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(250, 248, 244, 0.56);
  border-radius: 50%;
  color: rgba(250, 248, 244, 0.9);
  background: rgba(31, 36, 27, 0.32);
  box-shadow: 0 0 0 10px rgba(200, 168, 75, 0.08), var(--glow);
  font-size: 13px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.scene-hotspot::before {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(200, 168, 75, 0.22);
  border-radius: inherit;
  animation: pulse-ring 2.4s ease-in-out infinite;
  content: "";
}

.scene-hotspot:hover,
.scene-hotspot:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(92, 138, 94, 0.72);
  box-shadow: 0 0 0 13px rgba(200, 168, 75, 0.12), var(--glow);
  outline: none;
}

.game-hud {
  position: absolute;
  top: 92px;
  left: 50%;
  z-index: 2;
  width: min(var(--max), calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-hud span,
.panel-label,
.product-meta,
.mini-label,
.eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.game-hud span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(250, 248, 244, 0.18);
  border-radius: 999px;
  padding: 0 11px;
  color: rgba(250, 248, 244, 0.82);
  background: rgba(31, 36, 27, 0.45);
}

.game-hero-inner {
  width: min(var(--max), calc(100% - 40px));
  min-height: calc(100svh - 220px);
  margin: 0 auto;
  padding-top: 170px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.35fr);
  gap: 34px;
  align-items: center;
}

.title-stack {
  display: grid;
  gap: 18px;
}

.eyebrow,
.section-kicker,
.mini-label {
  margin: 0;
}

.home-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(70px, 12vw, 148px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.home-lead {
  max-width: 650px;
  margin: 0;
  color: rgba(250, 248, 244, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hint-panel,
.side-panel,
.lore-panel,
.gate-preview {
  border: 1px solid rgba(107, 76, 42, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(250, 248, 244, 0.92), rgba(245, 240, 232, 0.86));
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hint-panel {
  padding: 22px;
  align-self: center;
  max-width: 330px;
}

.hint-panel p,
.gate-preview p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.gate-console {
  width: min(var(--max), calc(100% - 40px));
  margin: -36px auto 62px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(280px, 0.8fr);
  border: 1px solid rgba(250, 248, 244, 0.18);
  background: rgba(250, 248, 244, 0.18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
}

.gate-link {
  min-height: 154px;
  padding: 22px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  color: var(--white);
  background: rgba(31, 36, 27, 0.58);
  backdrop-filter: blur(12px);
  transition: background 0.22s ease, transform 0.22s ease;
}

.gate-link:hover,
.gate-link:focus-visible,
.gate-link.active {
  background: rgba(92, 138, 94, 0.72);
  transform: translateY(-2px);
  outline: none;
}

.gate-link span {
  color: var(--gold);
  font-weight: 900;
}

.gate-link strong {
  font-size: 21px;
  line-height: 1.15;
}

.gate-link em {
  color: rgba(250, 248, 244, 0.72);
  font-size: 14px;
  font-style: normal;
  line-height: 1.45;
}

.gate-preview {
  min-height: 154px;
  padding: 22px;
  border-radius: 0;
  box-shadow: none;
}

.page-shell {
  padding-top: 70px;
  background: var(--white);
}

.page-hero,
.page-section {
  position: relative;
  padding: 82px 0;
}

.compact-hero {
  padding-bottom: 42px;
}

.split-hero {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(300px, 0.55fr);
  gap: 44px;
  align-items: center;
}

.page-hero-copy,
.section-heading {
  display: grid;
  gap: 14px;
}

.compact-hero .page-hero-copy {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
}

.page-hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.page-hero h1 {
  font-size: clamp(34px, 4vw, 54px);
}

.section-heading h2 {
  font-size: clamp(28px, 3.25vw, 44px);
}

.page-hero p:not(.eyebrow),
.section-copy {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.82;
}

.page-hero-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.section-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.quest-section,
.warm-section {
  background: var(--cream);
}

.quest-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.quest-card,
.story-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.quest-card:hover,
.quest-card:focus-visible,
.story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 138, 94, 0.45);
  box-shadow: var(--shadow);
  outline: none;
}

.quest-card span,
.story-card span {
  color: var(--gold-deep);
  font-weight: 900;
}

.quest-card h3,
.story-card h3,
.character-row h3,
.inventory-item h3,
.post-card h3,
.side-panel h2,
.lore-panel h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.quest-card p,
.story-card p,
.character-row p,
.inventory-item p,
.post-card p,
.side-panel p,
.lore-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.map-section {
  background: linear-gradient(180deg, var(--white), var(--cream));
}

.lore-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: stretch;
}

.lore-map {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(92, 138, 94, 0.22), rgba(107, 76, 42, 0.16)),
    url("./hero-rulinjian.png") center / cover;
  box-shadow: var(--shadow);
}

.lore-map::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 58%, rgba(200, 168, 75, 0.28), transparent 10rem),
    linear-gradient(0deg, rgba(31, 36, 27, 0.55), rgba(31, 36, 27, 0.12));
  content: "";
}

.map-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  min-width: 72px;
  min-height: 72px;
  border: 1px solid rgba(250, 248, 244, 0.72);
  border-radius: 50%;
  color: var(--white);
  background: rgba(31, 36, 27, 0.58);
  box-shadow: 0 0 0 8px rgba(200, 168, 75, 0.12);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.map-node:hover,
.map-node:focus-visible,
.map-node.active {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(92, 138, 94, 0.82);
  box-shadow: 0 0 0 12px rgba(200, 168, 75, 0.18), var(--glow);
  outline: none;
}

.map-node span {
  font-weight: 900;
}

.lore-panel {
  padding: 26px;
}

.lore-panel ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.character-list {
  display: grid;
  gap: 16px;
}

.character-row {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.character-row:last-child {
  border-bottom: 1px solid var(--line);
}

.character-sigil {
  width: 108px;
  height: 108px;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--green);
  transform: rotate(-4deg);
}

.character-sigil::after {
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(250, 248, 244, 0.66);
  border-radius: 50%;
  content: "";
}

.character-sigil.earth {
  background: var(--earth);
}

.character-sigil.gold {
  background: var(--gold);
}

.chapter-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.chapter-strip a {
  min-height: 120px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  color: var(--earth);
  font-weight: 900;
  transition: background 0.22s ease, color 0.22s ease;
}

.chapter-strip a span {
  color: var(--gold-deep);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.chapter-strip a:hover,
.chapter-strip a:focus-visible {
  background: var(--green);
  color: var(--white);
  outline: none;
}

.shop-layout,
.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

.catalog-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

.shop-catalog {
  min-width: 0;
}

.inventory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.inventory-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--earth);
  background: var(--cream);
  font-weight: 800;
}

.inventory-tabs button:hover,
.inventory-tabs button:focus-visible,
.inventory-tabs button.active {
  border-color: var(--green);
  color: var(--white);
  background: var(--green);
  outline: none;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.inventory-item {
  min-height: 520px;
  display: grid;
  grid-template-rows: 300px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(67, 48, 26, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.shop-product-card {
  color: inherit;
}

.inventory-item:hover,
.inventory-item:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(92, 138, 94, 0.42);
  box-shadow: var(--shadow);
  outline: none;
}

.item-art {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(31, 36, 27, 0.16), rgba(31, 36, 27, 0)),
    radial-gradient(circle at 72% 30%, rgba(200, 168, 75, 0.8) 0 28px, transparent 29px),
    linear-gradient(135deg, rgba(92, 138, 94, 0.9), rgba(107, 76, 42, 0.96));
}

.item-art::before {
  position: absolute;
  left: 12%;
  bottom: 12%;
  width: 34%;
  max-width: 150px;
  aspect-ratio: 0.72;
  border: 1px solid rgba(250, 248, 244, 0.56);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(250, 248, 244, 0.24), rgba(250, 248, 244, 0.08));
  box-shadow: inset 0 0 0 1px rgba(250, 248, 244, 0.12), 0 26px 60px rgba(31, 36, 27, 0.2);
  transform: rotate(-9deg);
  transition: transform 0.22s ease;
  content: "";
}

.item-art::after {
  position: absolute;
  right: 12%;
  top: 16%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(200, 168, 75, 0.82);
  box-shadow: var(--glow);
  content: "";
}

.shop-product-card:hover .item-art::before,
.shop-product-card:focus-visible .item-art::before {
  transform: rotate(-4deg) translateY(-8px) scale(1.03);
}

.item-art-code {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(250, 248, 244, 0.32);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--white);
  background: rgba(31, 36, 27, 0.42);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.inventory-item[data-category="charm"] .item-art {
  background:
    linear-gradient(0deg, rgba(31, 36, 27, 0.12), rgba(31, 36, 27, 0)),
    radial-gradient(circle at 72% 30%, rgba(245, 240, 232, 0.78) 0 26px, transparent 27px),
    linear-gradient(135deg, var(--earth), var(--clay));
}

.inventory-item[data-category="daily"] .item-art {
  background:
    linear-gradient(0deg, rgba(31, 36, 27, 0.12), rgba(31, 36, 27, 0)),
    radial-gradient(circle at 72% 30%, rgba(200, 168, 75, 0.78) 0 26px, transparent 27px),
    linear-gradient(135deg, var(--olive), var(--green));
}

.item-body {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rarity {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price {
  color: var(--earth);
  font-weight: 900;
}

.product-open {
  margin-top: auto;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.backpack-panel,
.shop-preview-panel {
  background:
    linear-gradient(180deg, rgba(245, 240, 232, 0.96), rgba(250, 248, 244, 0.92));
}

.shop-preview-panel {
  display: grid;
  gap: 18px;
}

.shop-preview-panel::before {
  display: block;
  min-height: 180px;
  border: 1px solid rgba(107, 76, 42, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 66% 30%, rgba(200, 168, 75, 0.72) 0 30px, transparent 31px),
    linear-gradient(135deg, rgba(92, 138, 94, 0.9), rgba(107, 76, 42, 0.9));
  content: "";
}

.shop-preview-panel[data-category="charm"]::before {
  background:
    radial-gradient(circle at 66% 30%, rgba(245, 240, 232, 0.72) 0 30px, transparent 31px),
    linear-gradient(135deg, rgba(107, 76, 42, 0.96), rgba(196, 137, 90, 0.9));
}

.shop-preview-panel[data-category="daily"]::before {
  background:
    radial-gradient(circle at 66% 30%, rgba(200, 168, 75, 0.74) 0 30px, transparent 31px),
    linear-gradient(135deg, rgba(139, 149, 86, 0.92), rgba(92, 138, 94, 0.9));
}

.shop-preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
  color: var(--earth);
}

.shop-preview-meta span {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop-link,
.quiet-link {
  width: 100%;
}

.quiet-link {
  border-color: rgba(107, 76, 42, 0.22);
  color: var(--earth);
  background: rgba(250, 248, 244, 0.68);
}

.side-panel form {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--earth);
  font-size: 13px;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(107, 76, 42, 0.22);
  border-radius: var(--radius);
  background: rgba(250, 248, 244, 0.78);
  color: var(--ink);
  outline: none;
  padding: 12px 13px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(92, 138, 94, 0.13);
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--earth);
  background: rgba(250, 248, 244, 0.72);
  font-size: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  border-color: var(--green);
  color: var(--white);
  background: var(--green);
}

.button.ghost {
  border-color: rgba(250, 248, 244, 0.3);
  color: var(--white);
  background: rgba(250, 248, 244, 0.08);
}

.cart-list {
  min-height: 48px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.cart-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.notice-board {
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(107, 76, 42, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(107, 76, 42, 0.07) 1px, transparent 1px),
    var(--cream);
  background-size: 28px 28px;
  box-shadow: var(--shadow);
}

.board-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--earth);
  font-weight: 900;
}

.post-list {
  display: grid;
  gap: 16px;
}

.post-card {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(107, 76, 42, 0.18);
  border-radius: var(--radius);
  background: rgba(250, 248, 244, 0.88);
  box-shadow: 0 12px 32px rgba(67, 48, 26, 0.08);
}

.post-card::before {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 2px 8px rgba(107, 76, 42, 0.28);
  content: "";
}

.post-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--white);
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.post-meta,
.post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.post-stats {
  margin-top: 14px;
  font-weight: 900;
}

.post-panel {
  background:
    linear-gradient(180deg, rgba(245, 240, 232, 0.96), rgba(250, 248, 244, 0.94));
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(250, 248, 244, 0.5);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--earth);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-footer {
  padding: 34px 0;
  color: var(--white);
  background: var(--earth);
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

body.motion-ready .reveal {
  opacity: 1;
  transform: translateY(18px);
  transition: transform 0.72s ease;
}

body.motion-ready .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(0.8);
  }
  to {
    transform: translate3d(18px, -24px, 0) scale(1.2);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.88;
  }
}

/* ── 开场动画 Intro Overlay ────────────────────────────── */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--dark);
  transition: opacity 1s ease, visibility 1s ease;
}

.intro-overlay.dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  opacity: 0.5;
}

.intro-inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
  padding: 52px 44px;
  text-align: center;
  display: grid;
  gap: 30px;
  color: var(--white);
}

.intro-chapter {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.intro-text {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 2.1;
  color: rgba(250, 248, 244, 0.9);
  min-height: 4.2em;
  white-space: pre-wrap;
}

.intro-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--gold);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.75s step-end infinite;
}

.intro-enter {
  justify-self: center;
  border: 1px solid rgba(200, 168, 75, 0.45);
  border-radius: 999px;
  padding: 13px 36px;
  color: var(--gold);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  opacity: 0;
  pointer-events: none;
  transition: background 0.22s ease, color 0.22s ease, opacity 0.45s ease;
}

.intro-enter.visible {
  opacity: 1;
  pointer-events: auto;
}

.intro-enter:hover {
  background: rgba(200, 168, 75, 0.18);
  color: var(--white);
  border-color: rgba(200, 168, 75, 0.7);
}

/* ── 导航动作区 ─────────────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── 环境音效开关 ────────────────────────────────────────── */
.sound-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(250, 248, 244, 0.32);
  border-radius: 50%;
  color: rgba(250, 248, 244, 0.65);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.sound-toggle:hover,
.sound-toggle.active {
  background: rgba(200, 168, 75, 0.18);
  color: var(--gold);
  border-color: rgba(200, 168, 75, 0.5);
}

.site-header.light-header .sound-toggle {
  border-color: rgba(107, 76, 42, 0.28);
  color: var(--muted);
}

/* ── 光标轨迹 Cursor Trail ───────────────────────────────── */
.cursor-trail-dot {
  position: fixed;
  pointer-events: none;
  z-index: 9990;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
  will-change: left, top;
}

/* ── Hero 增强 ───────────────────────────────────────────── */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(31, 36, 27, 0.7) 0%, transparent 70%);
  pointer-events: none;
}

.game-hero::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.018) 3px,
    rgba(0, 0, 0, 0.018) 4px
  );
  pointer-events: none;
  content: "";
}

/* ── 标题墨迹划入 ─────────────────────────────────────────── */
.home-title {
  will-change: clip-path;
  animation: inkReveal 1.5s cubic-bezier(0.77, 0, 0.175, 1) 0.15s both;
}

/* ── 打字机光标 ──────────────────────────────────────────── */
.home-lead.typing-active::after {
  content: "▌";
  animation: cursorBlink 0.75s step-end infinite;
  color: var(--gold);
  font-size: 0.72em;
  margin-left: 2px;
  vertical-align: baseline;
}

/* ── 热点发现状态 ──────────────────────────────────────────── */
.scene-hotspot.found {
  border-color: rgba(200, 168, 75, 0.8);
  background: rgba(200, 168, 75, 0.18);
}

.scene-hotspot.found::after {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  font-size: 9px;
  font-weight: 900;
  display: grid;
  place-items: center;
  content: "✓";
  border: 2px solid var(--dark);
}

.scene-hotspots.all-found .scene-hotspot {
  animation: pulseGold 2s ease-in-out infinite;
}

/* ── 今日线索过渡 ──────────────────────────────────────────── */
#dailyHint {
  transition: opacity 0.28s ease, transform 0.28s ease;
}

#dailyHint.fading {
  opacity: 0;
  transform: translateY(4px);
}

/* ── Gate 控制台终端感 ────────────────────────────────────── */
.gate-link {
  position: relative;
}

.gate-link::before {
  content: ">";
  position: absolute;
  left: 14px;
  bottom: 22px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateX(-4px);
}

.gate-link:hover::before,
.gate-link:focus-visible::before,
.gate-link.active::before {
  opacity: 1;
  transform: translateX(0);
}

.gate-link span {
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
}

/* ── 任务卡 XP 风格 ──────────────────────────────────────── */
.quest-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quest-type {
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quest-xp {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  border: 1px solid rgba(92, 138, 94, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
}

.quest-progress-bar {
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.quest-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.quest-card::before {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  content: "";
}

.quest-card:hover::before,
.quest-card:focus-visible::before {
  transform: scaleX(1);
}

/* 覆盖原有 span 颜色，quest-xp 用绿色 */
.quest-card .quest-xp {
  color: var(--green);
  font-weight: 900;
}

/* ── 新关键帧 ────────────────────────────────────────────── */
@keyframes inkReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 6px rgba(200, 168, 75, 0.1), 0 0 18px rgba(200, 168, 75, 0.25); }
  50%       { box-shadow: 0 0 0 14px rgba(200, 168, 75, 0.16), 0 0 36px rgba(200, 168, 75, 0.4); }
}

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

/* ── Hint panel 伪标签 ───────────────────────────────────── */
.hint-panel {
  position: relative;
}

.hint-panel .panel-label {
  display: block;
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════
   插画风重构 — V2
   ═══════════════════════════════════════════════════════════ */

/* ── Hero 飘落叶层 ─────────────────────────────────────── */
.hero-leaves {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-leaf {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  color: var(--leaf-color, rgba(200, 168, 75, 0.55));
  opacity: var(--leaf-opacity, 0.3);
  transform: rotate(var(--rotate)) translate3d(0, 0, 0);
  animation: leafDrift var(--duration) ease-in-out infinite alternate;
  animation-delay: var(--delay);
  will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(31, 36, 27, 0.18));
}

@keyframes leafDrift {
  from {
    transform: rotate(var(--rotate)) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(calc(var(--rotate) + 35deg)) translate3d(18px, -22px, 0);
  }
}

/* ── 便签贴纸（替代玻璃面板）────────────────────────────── */
.paper-note {
  position: relative;
  align-self: center;
  max-width: 320px;
  padding: 30px 26px 28px;
  background: #fdf7e8;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(196, 137, 90, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(92, 138, 94, 0.05) 0%, transparent 50%);
  color: var(--ink);
  transform: rotate(-1.6deg);
  box-shadow:
    0 2px 1px rgba(31, 36, 27, 0.06),
    0 16px 32px rgba(31, 36, 27, 0.32),
    inset 0 0 0 1px rgba(107, 76, 42, 0.08);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.paper-note:hover {
  transform: rotate(-0.5deg) translateY(-3px);
}

.paper-note::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(107, 76, 42, 0.22);
  pointer-events: none;
  border-radius: 1px;
}

.paper-tape {
  position: absolute;
  top: -12px;
  left: 28%;
  width: 88px;
  height: 24px;
  background: rgba(196, 137, 90, 0.5);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 5px,
    rgba(255, 255, 255, 0.2) 5px,
    rgba(255, 255, 255, 0.2) 8px
  );
  transform: rotate(-4deg);
  box-shadow: 0 1px 4px rgba(31, 36, 27, 0.18);
}

.paper-label {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.paper-note p {
  position: relative;
  margin: 0;
  color: var(--ink);
  line-height: 1.85;
  font-size: 15px;
}

.paper-leaf {
  position: absolute;
  bottom: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  color: var(--green);
  opacity: 0.65;
  transform: rotate(-22deg);
}

/* ── Hero 与下方衔接的波浪 SVG ──────────────────────────── */
.hero-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 3;
  pointer-events: none;
  display: block;
}

/* hero 区原有 gate-console 已移出，hero 自然结束 */
.game-hero {
  padding-bottom: 90px;
}

/* ── 入口卡片区（替代旧 gate-console）───────────────────── */
.gate-section {
  position: relative;
  background: var(--cream);
  padding: 100px 0 90px;
  overflow: hidden;
}

.gate-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%236b4c2a' stroke-width='1' opacity='0.08'%3E%3Cpath d='M30 80 C45 65 55 65 70 80 C55 95 45 95 30 80 Z'/%3E%3Cpath d='M50 80 L50 80'/%3E%3Cpath d='M110 40 C120 30 128 30 138 40 C128 50 120 50 110 40 Z'/%3E%3Cpath d='M120 120 C128 112 134 112 142 120 C134 128 128 128 120 120 Z'/%3E%3C/g%3E%3Cg fill='%23c8a84b' opacity='0.12'%3E%3Ccircle cx='25' cy='28' r='1.2'/%3E%3Ccircle cx='148' cy='75' r='1'/%3E%3Ccircle cx='85' cy='135' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 320px 320px;
}

.gate-section-inner {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.gate-heading {
  text-align: center;
  margin: 0 auto 50px;
  max-width: 680px;
}

.gate-heading .section-kicker {
  display: inline-block;
}

.gate-heading h2 {
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
  font-weight: 700;
}

.gate-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 34px;
}

.gate-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 34px 28px 36px;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.16);
  border-radius: 18px;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.gate-card::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  width: 28px;
  height: 28px;
  border-top: 1px dashed rgba(107, 76, 42, 0.32);
  border-left: 1px dashed rgba(107, 76, 42, 0.32);
  border-radius: 1px;
  pointer-events: none;
}

.gate-card::after {
  content: "";
  position: absolute;
  bottom: 18px;
  right: 20px;
  width: 28px;
  height: 28px;
  border-bottom: 1px dashed rgba(107, 76, 42, 0.32);
  border-right: 1px dashed rgba(107, 76, 42, 0.32);
  border-radius: 1px;
  pointer-events: none;
}

.gate-card:hover,
.gate-card:focus-visible,
.gate-card.active {
  transform: translateY(-7px);
  border-color: rgba(200, 168, 75, 0.55);
  box-shadow: 0 24px 50px rgba(31, 36, 27, 0.14);
  outline: none;
}

.gate-card.active {
  background: linear-gradient(180deg, #fffdf7 0%, var(--white) 100%);
}

.gate-card-illu {
  width: 80px;
  height: 80px;
  margin: 8px auto 12px;
  display: grid;
  place-items: center;
  color: var(--green);
  transition: color 0.35s ease, transform 0.35s ease;
}

.gate-card-illu svg {
  width: 100%;
  height: 100%;
}

.gate-card:hover .gate-card-illu,
.gate-card.active .gate-card-illu {
  color: var(--gold-deep);
  transform: scale(1.06) rotate(-3deg);
}

.gate-card-num {
  display: block;
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
}

.gate-card strong {
  display: block;
  text-align: center;
  margin-top: 2px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.gate-card em {
  display: block;
  text-align: center;
  margin-top: 4px;
  font-style: normal;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.gate-card-arrow {
  position: absolute;
  bottom: 22px;
  right: 24px;
  font-size: 16px;
  color: var(--gold-deep);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gate-card:hover .gate-card-arrow,
.gate-card.active .gate-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── 入口预览便签 ────────────────────────────────────────── */
.gate-preview-note {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 32px 28px;
  background: #fdf9ef;
  border: 1px dashed rgba(107, 76, 42, 0.3);
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  row-gap: 4px;
  align-items: start;
}

.preview-mark {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  color: var(--green);
  margin-top: 4px;
}

.preview-label {
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gate-preview-note p {
  margin: 0;
  color: var(--ink);
  line-height: 1.8;
  font-size: 15px;
}

/* ── 任务卡叶子小装饰 ────────────────────────────────────── */
.quest-section {
  position: relative;
  overflow: hidden;
}

.quest-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='%235c8a5e' opacity='0.04'%3E%3Cpath d='M40 100 C55 85 65 85 80 100 C65 115 55 115 40 100 Z'/%3E%3Cpath d='M150 60 C160 50 168 50 178 60 C168 70 160 70 150 60 Z'/%3E%3C/g%3E%3Cg fill='%23c4895a' opacity='0.06'%3E%3Ccircle cx='180' cy='180' r='1.6'/%3E%3Ccircle cx='30' cy='170' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 360px 360px;
}

.quest-card {
  position: relative;
  background: var(--white);
  border-radius: 14px;
}

.quest-decor {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  color: var(--green);
  opacity: 0.42;
  transform: rotate(12deg);
  transition: transform 0.35s ease, opacity 0.35s ease, color 0.35s ease;
  pointer-events: none;
}

.quest-card:hover .quest-decor,
.quest-card:focus-visible .quest-decor {
  opacity: 0.78;
  color: var(--gold-deep);
  transform: rotate(-6deg) scale(1.12);
}

.quest-card:nth-child(2) .quest-decor { color: var(--clay); }
.quest-card:nth-child(3) .quest-decor { color: var(--earth); }

/* ── 旧 gate-console 隐藏（保持兼容性，避免任何残留显示）── */
.gate-console { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   世界档案 ip.html
   ═══════════════════════════════════════════════════════════ */
.archive-shell {
  background: var(--cream);
  padding-bottom: 100px;
}

/* ── 档案 Hero ─────────────────────────────────────────── */
.archive-hero {
  position: relative;
  padding: 120px 20px 60px;
  background: linear-gradient(180deg, #fbf5e6 0%, var(--cream) 100%);
  overflow: hidden;
}

.archive-hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--green);
}

.archive-leaf {
  position: absolute;
  opacity: 0.7;
}

.archive-leaf-1 { top: 10%; left: 6%; width: 90px; height: 90px; transform: rotate(-18deg); color: var(--olive); animation: floatSlow 9s ease-in-out infinite alternate; }
.archive-leaf-2 { top: 22%; right: 8%; width: 70px; height: 70px; transform: rotate(22deg); color: var(--clay); animation: floatSlow 11s ease-in-out infinite alternate; animation-delay: -3s; }
.archive-leaf-3 { bottom: 14%; right: 18%; width: 110px; height: 110px; color: var(--gold-deep); animation: floatSlow 13s ease-in-out infinite alternate; animation-delay: -5s; }

@keyframes floatSlow {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(8px, -10px) rotate(8deg); }
}

.archive-hero-inner {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.archive-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  margin: 8px 0 18px;
  color: var(--ink);
  line-height: 1.05;
}

.archive-title small {
  display: block;
  margin-top: 14px;
  font-family: var(--font-sans, "Inter", system-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.archive-hero-copy {
  max-width: 580px;
  color: var(--ink);
  line-height: 1.85;
  margin-bottom: 24px;
}

.archive-hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.archive-hero-meta em {
  font-style: normal;
  color: var(--gold-deep);
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-right: 6px;
  text-transform: uppercase;
  font-size: 11px;
}

/* ── 模块切换 Tabs ──────────────────────────────────────── */
.archive-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107, 76, 42, 0.12);
  flex-wrap: wrap;
}

.archive-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.archive-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.archive-tab.active {
  background: var(--white);
  border-color: rgba(200, 168, 75, 0.45);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(31, 36, 27, 0.08);
}

.archive-tab .tab-num {
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
}

.archive-tab .tab-name {
  font-size: 15px;
  font-weight: 600;
  font-family: Georgia, "Noto Serif SC", serif;
}

/* ── 模块通用容器 ──────────────────────────────────────── */
.archive-module {
  width: min(var(--max), calc(100% - 40px));
  margin: 60px auto 0;
  animation: moduleFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.archive-module[hidden] { display: none; }

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

.module-head {
  margin-bottom: 32px;
}
.module-head .section-kicker {
  margin-bottom: 8px;
}
.module-head h2 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}
.module-head p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

/* ── 模块 1：小镇住民 ────────────────────────────────────── */
.resident-stage {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 20px;
  padding: 36px;
  position: relative;
}

.resident-stage::before,
.resident-stage::after {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
}
.resident-stage::before {
  top: 14px; left: 14px;
  border-top: 1px dashed rgba(107, 76, 42, 0.3);
  border-left: 1px dashed rgba(107, 76, 42, 0.3);
}
.resident-stage::after {
  bottom: 14px; right: 14px;
  border-bottom: 1px dashed rgba(107, 76, 42, 0.3);
  border-right: 1px dashed rgba(107, 76, 42, 0.3);
}

.resident-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px dashed rgba(107, 76, 42, 0.18);
  padding-right: 24px;
}
.resident-list-title {
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin: 4px 0 10px;
}
.resident-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
  transition: all 0.3s ease;
}
.resident-list-item:hover {
  background: rgba(245, 240, 232, 0.6);
}
.resident-list-item.active {
  background: var(--cream);
  border-color: rgba(200, 168, 75, 0.5);
}
.resident-list-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
}
.resident-list-item .name {
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 15px;
  display: block;
}
.resident-list-item .sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: block;
}

.resident-info {
  display: flex;
  flex-direction: column;
}
.resident-kicker {
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.resident-name {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}
.resident-title {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.resident-intro {
  color: var(--ink);
  line-height: 1.9;
  margin: 0 0 22px;
  font-size: 15px;
}

.resident-meta {
  margin: 0 0 22px;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: var(--cream);
  border-radius: 10px;
  border: 1px dashed rgba(107, 76, 42, 0.22);
}
.resident-meta > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: baseline;
}
.resident-meta dt {
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin: 0;
}
.resident-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.resident-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.button.small {
  padding: 8px 14px;
  font-size: 13px;
}
.button.icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-size: 16px;
  background: transparent;
  border: 1px solid rgba(107, 76, 42, 0.22);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s ease;
}
.button.icon-only:hover { color: var(--clay); border-color: var(--clay); }
.button.icon-only.active { color: var(--clay); border-color: var(--clay); background: rgba(196, 137, 90, 0.08); }

/* 立绘 */
.resident-portrait {
  margin: 0;
}
.portrait-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--green) 0%, #3f6841 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 18px 38px rgba(31, 36, 27, 0.22);
  transition: background 0.5s ease;
}
.portrait-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 70% 30%, rgba(253, 247, 232, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(31, 36, 27, 0.3) 0%, transparent 50%);
  pointer-events: none;
}
.portrait-decor {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 60px;
  height: 60px;
  color: rgba(253, 247, 232, 0.4);
  pointer-events: none;
}
.portrait-decor svg { width: 100%; height: 100%; }
.portrait-name {
  position: relative;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.portrait-sub {
  position: relative;
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.34em;
  opacity: 0.7;
}
.resident-portrait figcaption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* 角色配色 — 应用到立绘背景与列表小头像 */
.portrait-frame.color-green { background: linear-gradient(180deg, #5c8a5e 0%, #3f6841 100%); }
.portrait-frame.color-earth { background: linear-gradient(180deg, #8b6940 0%, #5a4225 100%); }
.portrait-frame.color-gold  { background: linear-gradient(180deg, #c8a84b 0%, #8f7a2d 100%); }
.portrait-frame.color-clay  { background: linear-gradient(180deg, #c4895a 0%, #8a5b34 100%); }

.bg-color-green { background: linear-gradient(135deg, #5c8a5e, #3f6841); }
.bg-color-earth { background: linear-gradient(135deg, #8b6940, #5a4225); }
.bg-color-gold  { background: linear-gradient(135deg, #c8a84b, #8f7a2d); }
.bg-color-clay  { background: linear-gradient(135deg, #c4895a, #8a5b34); }

/* 底部头像缩略图 */
.resident-thumbs {
  margin-top: 26px;
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
  overflow-x: auto;
}
.resident-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
}
.resident-thumb:hover {
  transform: translateY(-4px) scale(1.08);
}
.resident-thumb.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 168, 75, 0.22);
}
.resident-thumb-name {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-sans, system-ui);
  font-weight: 500;
  white-space: nowrap;
}

/* ── 模块 2：小镇图册 ─────────────────────────────────── */
.gallery-filter,
.wallpaper-filter,
.sticker-filter,
.story-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.gallery-filter button,
.wallpaper-filter button,
.sticker-filter button,
.story-filter button {
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.18);
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.gallery-filter button:hover,
.wallpaper-filter button:hover,
.sticker-filter button:hover,
.story-filter button:hover {
  color: var(--ink);
  border-color: rgba(200, 168, 75, 0.45);
}
.gallery-filter button.active,
.wallpaper-filter button.active,
.sticker-filter button.active,
.story-filter button.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.gallery-stage {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.gallery-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
  padding: 12px;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
}
.gallery-list-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
  transition: all 0.3s ease;
}
.gallery-list-item:hover { background: var(--cream); }
.gallery-list-item.active { background: var(--cream); border-color: var(--gold); }
.gallery-list-item .gl-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 14px;
}
.gallery-list-item .gl-cat {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.gallery-main {
  margin: 0;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
  padding: 20px;
}

.gallery-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6a8b5a 0%, #3f6841 100%);
  cursor: zoom-in;
  overflow: hidden;
  padding: 0;
  color: var(--white);
}
.gallery-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.gallery-image-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.gallery-image-sub {
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  opacity: 0.7;
}
.gallery-zoom-hint {
  position: absolute;
  bottom: 14px;
  right: 16px;
  padding: 4px 10px;
  background: rgba(31, 36, 27, 0.4);
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-image:hover .gallery-zoom-hint { opacity: 1; }

.gallery-caption { padding: 20px 4px 0; }
.gallery-num {
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  margin: 0 0 8px;
}
.gallery-caption h3 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}
.gallery-caption > p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.85;
  font-size: 14px;
}
.gallery-related {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px !important;
}
.gallery-related a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(107, 76, 42, 0.18);
}

/* ── 模块 3：壁纸福利 ─────────────────────────────────── */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.wallpaper-card {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.wallpaper-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(31, 36, 27, 0.16);
}
.wallpaper-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--cream), var(--white));
  display: grid;
  place-items: center;
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--white);
  overflow: hidden;
}
.wallpaper-preview.aspect-phone { aspect-ratio: 9 / 16; max-height: 360px; margin: 0 auto; }
.wallpaper-preview.aspect-avatar { aspect-ratio: 1; max-width: 280px; margin: 0 auto; border-radius: 0; }
.wallpaper-info {
  padding: 16px 18px 20px;
}
.wallpaper-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.wallpaper-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}
.wallpaper-actions {
  display: flex;
  gap: 8px;
}

/* ── 模块 4：表情包 ──────────────────────────────────── */
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.sticker-card {
  position: relative;
  aspect-ratio: 1;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.sticker-card:hover {
  transform: translateY(-4px) rotate(-1.5deg);
  box-shadow: 0 16px 32px rgba(31, 36, 27, 0.14);
  border-color: rgba(200, 168, 75, 0.4);
}
.sticker-emoji {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
}
.sticker-text {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 15px;
  color: var(--ink);
  text-align: center;
  padding: 0 8px;
}
.sticker-save {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 10px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sticker-card:hover .sticker-save { opacity: 1; }

/* ── 模块 5：林间故事 ─────────────────────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.story-card {
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(31, 36, 27, 0.16);
}
.story-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}
.story-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(31, 36, 27, 0.5);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.12em;
  border-radius: 4px;
}
.story-body { padding: 18px 20px 22px; }
.story-meta {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: var(--gold-deep);
  letter-spacing: 0.18em;
  margin: 0 0 8px;
}
.story-card h3 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.story-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 12px;
}
.story-cta {
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

/* ── 大图 Lightbox ─────────────────────────────────────── */
.archive-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(31, 36, 27, 0.88);
  padding: 40px 20px;
  animation: lbFade 0.25s ease;
}
.archive-lightbox[hidden] { display: none; }
@keyframes lbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(253, 247, 232, 0.4);
  border-radius: 50%;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox-close:hover { background: rgba(253, 247, 232, 0.12); }
.lightbox-content {
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #6a8b5a, #3f6841);
}

/* ═══════════════════════════════════════════════════════════
   营地告示 forum.html
   ═══════════════════════════════════════════════════════════ */
.forum-shell {
  background: var(--cream);
  padding-bottom: 100px;
}

.forum-hero {
  position: relative;
  padding: 120px 20px 50px;
  background: linear-gradient(180deg, #fbf5e6 0%, var(--cream) 100%);
  overflow: hidden;
}
.forum-hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.forum-hero-inner {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}
.forum-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 700;
  margin: 8px 0 16px;
  color: var(--ink);
  line-height: 1.05;
}
.forum-title small {
  display: block;
  margin-top: 12px;
  font-family: var(--font-sans, system-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.forum-hero-copy {
  max-width: 580px;
  color: var(--ink);
  line-height: 1.85;
  margin: 0 0 22px;
}
.forum-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.daily-topic {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: var(--white);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  max-width: 560px;
  box-shadow: 0 6px 16px rgba(31, 36, 27, 0.06);
}
.daily-topic .daily-tag {
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
  text-transform: uppercase;
  white-space: nowrap;
}
.daily-topic p {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  font-family: Georgia, "Noto Serif SC", serif;
}

/* 分类 + 排序 Tabs */
.forum-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(107, 76, 42, 0.12);
  flex-wrap: wrap;
}
.forum-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.forum-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}
.forum-tab.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.forum-sort {
  margin-left: auto;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--white);
  border-radius: 999px;
  border: 1px solid rgba(107, 76, 42, 0.14);
}
.sort-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.sort-btn.active {
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
}

/* 三栏布局 */
.forum-layout-v2 {
  width: min(var(--max), calc(100% - 40px));
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.forum-side-left,
.forum-side-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 72px;
}

.board-card {
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
  padding: 20px 22px;
  color: var(--ink);
}
.board-card.paper-card {
  background: #fdf7e8;
  border: 1px dashed rgba(107, 76, 42, 0.28);
}
.board-card-label {
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.board-card h3 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
}
.board-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.board-rules {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.9;
}
.board-rules li::marker { color: var(--gold-deep); }

.post-cta-side {
  padding: 14px 20px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}
.post-cta-side:hover { background: var(--green); }

.official-list,
.hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.official-list li,
.hot-list li {
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px dashed rgba(107, 76, 42, 0.15);
  transition: color 0.25s ease;
}
.official-list li:hover,
.hot-list li:hover { color: var(--gold-deep); }
.official-list li:last-child,
.hot-list li:last-child { border-bottom: none; }
.hot-list li .hot-num {
  display: inline-block;
  width: 18px;
  font-family: "Courier New", monospace;
  font-weight: 900;
  font-size: 11px;
  color: var(--clay);
}
.recruit-text {
  font-size: 13px;
  color: var(--ink) !important;
  line-height: 1.7;
  margin-bottom: 12px !important;
}

/* 帖子卡片 */
.post-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.post-stream .empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed rgba(107, 76, 42, 0.2);
  border-radius: 14px;
}
.post-card-v2 {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 14px;
  padding: 22px 24px 18px;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.post-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(31, 36, 27, 0.1);
  border-color: rgba(200, 168, 75, 0.4);
}
.post-card-v2.is-pinned {
  background: #fdf7e8;
  border-color: rgba(200, 168, 75, 0.5);
}
.post-card-v2.is-pinned::before {
  content: "📌 置顶";
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  font-weight: 700;
}
.post-card-v2.is-featured {
  border-left: 3px solid var(--gold);
}
.post-card-v2.is-featured .post-channel-tag::after {
  content: " · 官方精选";
  color: var(--gold-deep);
}
.post-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-channel-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--cream);
  border: 1px solid rgba(107, 76, 42, 0.18);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.post-channel-tag[data-c="官方公告"] { background: rgba(200, 168, 75, 0.16); border-color: rgba(200, 168, 75, 0.4); color: var(--gold-deep); }
.post-channel-tag[data-c="角色讨论"] { background: rgba(92, 138, 94, 0.14); border-color: rgba(92, 138, 94, 0.36); color: #3f6841; }
.post-channel-tag[data-c="共创投稿"] { background: rgba(196, 137, 90, 0.14); border-color: rgba(196, 137, 90, 0.36); color: var(--clay); }
.post-channel-tag[data-c="周边反馈"] { background: rgba(139, 149, 86, 0.14); border-color: rgba(139, 149, 86, 0.36); color: var(--olive); }
.post-channel-tag[data-c="小镇闲聊"] { background: var(--cream); border-color: rgba(107, 76, 42, 0.22); color: var(--muted); }

.post-card-v2 h3 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.4;
}
.post-card-v2 .post-body-preview {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.75;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(107, 76, 42, 0.16);
  font-size: 12.5px;
  color: var(--muted);
}
.post-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.author-avatar {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--olive));
  color: var(--white);
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 11px;
}
.post-author.is-official .author-avatar {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
}
.post-stats-mini {
  margin-left: auto;
  display: inline-flex;
  gap: 14px;
}
.post-stats-mini span { display: inline-flex; align-items: center; gap: 4px; }

/* 弹窗（详情 / 发帖） */
.forum-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  animation: lbFade 0.28s ease;
}
.forum-modal[hidden] { display: none; }
.forum-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 36, 27, 0.62);
  backdrop-filter: blur(4px);
}
.forum-modal-content {
  position: relative;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 18px;
  padding: 32px 36px;
  box-shadow: 0 30px 80px rgba(31, 36, 27, 0.35);
  animation: modalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.forum-modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(107, 76, 42, 0.2);
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.forum-modal-close:hover { background: var(--cream); color: var(--ink); }

/* 帖子详情 */
.detail-head { margin-bottom: 22px; }
.detail-meta-top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.detail-time { font-size: 12px; color: var(--muted); }
.post-detail h2 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink);
  line-height: 1.3;
}
.detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-author .author-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.author-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.author-role {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.detail-body {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.9;
  padding: 22px 0;
  border-top: 1px dashed rgba(107, 76, 42, 0.16);
  border-bottom: 1px dashed rgba(107, 76, 42, 0.16);
}
.detail-actions {
  display: flex;
  gap: 12px;
  padding: 16px 0 22px;
  flex-wrap: wrap;
}
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.reaction:hover {
  background: var(--white);
  border-color: rgba(107, 76, 42, 0.22);
  color: var(--ink);
}
.reaction.active {
  background: rgba(196, 137, 90, 0.14);
  border-color: var(--clay);
  color: var(--clay);
}
.reaction.active .r-icon { font-weight: 900; }
.r-icon { font-size: 15px; line-height: 1; }
.r-num { font-family: "Courier New", monospace; font-weight: 600; }

/* 评论区 */
.comments-section { padding-top: 18px; border-top: 1px solid rgba(107, 76, 42, 0.16); }
.comments-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink);
}
.comment-form {
  background: var(--cream);
  border: 1px solid rgba(107, 76, 42, 0.14);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.comment-form-row { margin-bottom: 8px; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid rgba(107, 76, 42, 0.16);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.comment-form textarea {
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
}
.comment-form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.reply-target { font-size: 12px; color: var(--muted); }
.reply-target.active { color: var(--clay); font-weight: 600; }

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}
.comment-item.is-reply {
  margin-left: 48px;
  padding-left: 14px;
  border-left: 2px dashed rgba(107, 76, 42, 0.2);
}
.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.comment-meta .author-name { display: inline; font-size: 13px; }
.comment-body {
  margin: 4px 0 6px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.75;
}
.comment-reply-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--green);
  cursor: pointer;
}
.comment-reply-btn:hover { text-decoration: underline; }

/* 发帖弹窗 */
.composer-form h2 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}
.composer-hint { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.composer-form label {
  display: block;
  margin-bottom: 14px;
}
.composer-form label > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.composer-form input,
.composer-form select,
.composer-form textarea {
  width: 100%;
  background: var(--cream);
  border: 1px solid rgba(107, 76, 42, 0.16);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.composer-form textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.7;
}
.composer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.char-count {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: var(--muted);
}

/* 移动端浮动发帖按钮 */
.forum-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  border: none;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(31, 36, 27, 0.25);
  z-index: 50;
  display: none;
  transition: transform 0.25s ease, background 0.25s ease;
}
.forum-fab:hover { transform: scale(1.08); background: #3f6841; }

/* 论坛响应式 */
@media (max-width: 1100px) {
  .forum-layout-v2 {
    grid-template-columns: 1fr;
  }
  .forum-side-left,
  .forum-side-right {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
  }
  .forum-side-left .board-card,
  .forum-side-right .board-card {
    flex: 0 0 280px;
  }
  .post-cta-side { display: none; }
}

@media (max-width: 720px) {
  .forum-hero { padding-top: 96px; }
  .forum-title { font-size: 32px; }
  .forum-tabs { gap: 4px; padding: 10px 12px; overflow-x: auto; flex-wrap: nowrap; }
  .forum-sort { margin-left: 0; }
  .forum-side-left,
  .forum-side-right { display: none; }
  .forum-modal-content { padding: 26px 22px; max-height: 94vh; border-radius: 14px; }
  .post-detail h2 { font-size: 22px; }
  .detail-body { font-size: 14px; }
  .forum-fab { display: grid; place-items: center; }
  .comment-item.is-reply { margin-left: 24px; }
}

/* ── ip.html 响应式 ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .resident-stage {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .resident-list {
    border-right: none;
    border-bottom: 1px dashed rgba(107, 76, 42, 0.18);
    padding-right: 0;
    padding-bottom: 18px;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .resident-list-item { flex: 0 0 auto; }
  .resident-portrait {
    max-width: 360px;
    margin: 0 auto;
  }
  .gallery-stage { grid-template-columns: 1fr; }
  .gallery-list {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
  }
  .gallery-list-item { flex: 0 0 180px; }
}

@media (max-width: 720px) {
  .archive-hero { padding-top: 96px; }
  .archive-title { font-size: 36px; }
  .resident-stage { padding: 22px; }
  .resident-name { font-size: 28px; }
  .resident-meta > div { grid-template-columns: 1fr; gap: 4px; }
  .wallpaper-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .sticker-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .sticker-emoji { font-size: 36px; }
  .sticker-text { font-size: 12px; }
  .story-grid { grid-template-columns: 1fr; }
  .archive-tabs { gap: 4px; padding: 10px 8px; overflow-x: auto; justify-content: flex-start; flex-wrap: nowrap; }
  .archive-tab { padding: 8px 12px; }
  .archive-tab .tab-name { font-size: 14px; }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1020px) {
  .menu-toggle {
    display: inline-flex;
    background: rgba(250, 248, 244, 0.12);
    backdrop-filter: blur(12px);
  }

  .nav-links {
    position: fixed;
    top: 76px;
    left: 20px;
    right: 20px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow);
  }

  body.menu-open .nav-links {
    display: grid;
  }

  .nav-links a {
    justify-content: center;
    min-height: 44px;
  }

  .game-hero-inner,
  .gate-console,
  .gate-cards,
  .quest-cards,
  .lore-board,
  .shop-layout,
  .forum-layout,
  .split-hero {
    grid-template-columns: 1fr;
  }

  .paper-note {
    max-width: none;
    transform: none;
  }

  .paper-note:hover {
    transform: translateY(-2px);
  }

  .gate-preview-note {
    grid-template-columns: 1fr;
  }

  .preview-mark {
    grid-row: auto;
  }

  .gate-console {
    margin-top: -18px;
  }

  .gate-preview {
    border-radius: 0;
  }

  .side-panel {
    position: static;
  }

  .inventory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body {
    padding-bottom: 72px;
  }

  .site-header {
    backdrop-filter: none;
  }

  .nav {
    width: 100%;
    padding: 0 14px;
  }

  .brand-name span {
    display: none;
  }

  .game-hud {
    display: none;
  }

  .scene-hotspots {
    display: none;
  }

  .menu-toggle {
    display: none;
  }

  .sound-toggle {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: auto;
    bottom: 12px;
    left: 14px;
    z-index: 80;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    border-color: rgba(250, 248, 244, 0.22);
    border-radius: 999px;
    background: rgba(31, 36, 27, 0.86);
    color: var(--white);
    box-shadow: 0 18px 60px rgba(31, 36, 27, 0.28);
    backdrop-filter: blur(18px);
  }

  .nav-links a {
    min-height: 40px;
    justify-content: center;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
  }

  .game-hero-inner,
  .gate-console,
  .section-inner,
  .compact-hero .page-hero-copy,
  .split-hero,
  .footer-inner {
    width: min(calc(100% - 28px), var(--max));
  }

  .page-hero-copy,
  .section-heading,
  .shop-layout > *,
  .forum-layout > *,
  .inventory-grid,
  .inventory-item,
  .item-body,
  .side-panel,
  .lore-board,
  .gate-console,
  .gate-link,
  .hint-panel,
  .gate-preview {
    min-width: 0;
    max-width: 100%;
  }

  .page-hero-copy p,
  .section-copy,
  .inventory-item p,
  .side-panel p,
  .post-card p,
  .lore-panel p {
    overflow-wrap: anywhere;
  }

  .game-hero-inner {
    min-height: auto;
    padding-top: 118px;
    grid-template-columns: 1fr;
  }

  .hint-panel {
    max-width: none;
  }

  .home-title {
    font-size: clamp(62px, 18vw, 88px);
  }

  .home-lead {
    font-size: 16px;
  }

  .hero-commands .button {
    width: 100%;
  }

  .gate-console {
    margin-bottom: 38px;
  }

  .gate-link {
    min-height: 120px;
  }

  .page-hero,
  .page-section {
    padding: 60px 0;
  }

  .page-hero h1,
  .section-heading h2 {
    font-size: 30px;
    line-height: 1.12;
  }

  .lore-map {
    min-height: 430px;
  }

  .map-node {
    min-width: 62px;
    min-height: 62px;
  }

  .character-row,
  .chapter-strip {
    grid-template-columns: 1fr;
  }

  .inventory-item {
    min-height: auto;
  }
}
