:root {
  color-scheme: dark;
  --forest: #101b15;
  --forest-deep: #0a1410;
  --paper: #f4f2e8;
  --ink: #202c20;
  --accent: #d9ec9b;
  --light: #fbf9ed;
  --muted: #cbd7c8;
  --gutter: clamp(1.25rem, 5.2vw, 5rem);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--forest-deep);
  color: var(--light);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 1rem; line-height: 1.7; }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #92bc48; outline-offset: 5px; }

.wrap { width: min(100% - var(--gutter) * 2, 76rem); margin-inline: auto; }
.visually-hidden, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 10; left: 1rem; top: 1rem; padding: .75rem 1rem; background: var(--paper); color: var(--ink); }
.eyebrow { display: flex; align-items: center; gap: .65rem; font-size: .875rem; font-weight: 700; letter-spacing: .15em; }
.spark {
  display: inline-block;
  flex: 0 0 auto;
  width: .8rem;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .6rem 1.35rem;
  border: 1px solid transparent;
  border-radius: .3rem;
  font-weight: 700;
  transition: background-color .2s, border-color .2s, color .2s;
}
.button-primary { background: var(--accent); color: #182212; }
.button-primary:hover { background: #edfac6; }
.button-outline { border-color: #b6c6a8; background: #12221870; }
.button-outline:hover { background: var(--light); border-color: var(--light); color: var(--ink); }
.button-dark { background: var(--forest); color: var(--light); }
.button-dark:hover { background: #334932; }

.site-header { position: relative; z-index: 1; background: var(--forest-deep); border-bottom: 1px solid #ffffff24; }
.header-inner { display: flex; min-height: 4.8rem; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; min-height: 2.75rem; align-items: center; gap: .8rem; white-space: nowrap; }
.brand > span:last-child { font: 800 1.1rem/1 "Segoe UI", sans-serif; letter-spacing: .075em; }
.brand b { color: var(--accent); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 1.95rem;
  aspect-ratio: 1;
  background: var(--accent);
  clip-path: polygon(50% 0%, 94% 26%, 94% 74%, 50% 100%, 6% 74%, 6% 26%);
}
.brand-mark::before { content: ""; width: .95rem; aspect-ratio: 1; border: 2px solid var(--forest); transform: rotate(45deg); }
.site-nav { display: flex; align-items: center; gap: clamp(1.3rem, 3vw, 3rem); font-size: .9375rem; }
.site-nav a:not(.button) { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--muted); }
.site-nav a:not(.button):hover { color: var(--accent); }
.site-nav .button { min-height: 2.75rem; color: var(--accent); }
.site-nav .button:hover { color: var(--ink); }
.menu-toggle { min-height: 2.75rem; border: 1px solid #738267; border-radius: .3rem; padding: .35rem .9rem; background: transparent; }

.hero { isolation: isolate; overflow: hidden; position: relative; background: #182619; }
.hero-bg, .hero::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; object-fit: cover; object-position: 60% 52%; }
.hero::before {
  content: "";
  z-index: -1;
  background:
    linear-gradient(90deg, #09130eea 4%, #0b180ddc 33%, #18241939 71%, #14201535),
    linear-gradient(0deg, #0b1c12bd, transparent 50%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1fr);
  align-items: center;
  min-height: clamp(36rem, 48vw, 44rem);
  padding-block: 4rem 4.35rem;
}
.hero-copy { position: relative; z-index: 1; }
.hero .eyebrow, .gameplay .eyebrow { color: var(--accent); }
.hero h1 { margin-block: 1.1rem 1.5rem; font-size: clamp(3.5rem, 6.4vw, 6.4rem); line-height: 1.09; letter-spacing: -.055em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-intro { font-size: clamp(1rem, 1.4vw, 1.16rem); max-width: 24rem; color: #eef1e7; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }
.hero-actions .button { min-width: 8.5rem; }
.hero-portrait { position: relative; display: grid; justify-items: center; margin: 0 0 0 -2rem; }
.portrait-art {
  display: grid;
  place-items: center;
  position: relative;
  width: min(41vw, 35rem);
  aspect-ratio: 1;
  max-height: 31rem;
}
.portrait-art img { z-index: 1; width: 82%; height: auto; filter: drop-shadow(0 1.2rem 1rem #1221147a); }
.hero-orbit {
  position: absolute;
  width: 83%;
  aspect-ratio: 1;
  border: 1px solid #f0f6bc82;
  border-radius: 50%;
  background: radial-gradient(circle, #fffcc53d, transparent 66%);
}
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; border: 1px solid #ecf0be70; border-radius: inherit; }
.hero-orbit::before { inset: .75rem; border-style: dashed; }
.hero-orbit::after { inset: -1.4rem; border-color: #ecf0be2b; }
.portrait-spark { position: absolute; z-index: 1; width: 1.5rem; top: 16%; right: 20%; color: #f4f9cb; }
.hero figcaption { position: absolute; z-index: 2; right: 0; bottom: .5rem; padding-left: .85rem; border-left: 2px solid var(--accent); text-shadow: 0 1px 8px #09130e; }
.hero figcaption strong, .hero figcaption span { display: block; }
.hero figcaption strong { font-size: 1.25rem; line-height: 1.3; }
.hero figcaption span { font-size: .875rem; color: #e4eccf; }

.atlas { padding-block: clamp(3.75rem, 7vw, 6.4rem); background: var(--paper); color: var(--ink); color-scheme: light; }
.atlas .eyebrow, .play .eyebrow, .detail-copy .eyebrow { color: #425435; }
.atlas-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.25rem; margin-bottom: 2rem; }
section h2 { margin-top: .8rem; font-size: clamp(2rem, 3.9vw, 3.75rem); letter-spacing: -.052em; }
.section-intro { margin-top: .9rem; color: #485545; }
.filter-list, .feature-picker, .stage-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter-list button, .stage-list button {
  min-height: 2.75rem;
  min-width: 2.75rem;
  border: 1px solid #98a38c;
  border-radius: .25rem;
  padding: .4rem .75rem;
  background: transparent;
  font-size: .875rem;
  font-weight: 700;
  transition: background-color .2s, border-color .2s;
}
.filter-list button:hover, .stage-list button:hover { background: #e7ead8; }
.filter-list button[aria-pressed="true"], .stage-list button[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: var(--light); }
.creature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.65rem, 1.5vw, 1.35rem); padding: 0; margin: 0; list-style: none; }
.grass { --wash: #dfe8c7; --edge: #a4b788; }
.water { --wash: #dbe7eb; --edge: #9ab7c7; }
.rock { --wash: #ebe3d6; --edge: #c6ad93; }
.fire { --wash: #f3dfcf; --edge: #caa390; }
.creature-card { position: relative; border: 1px solid var(--edge); border-radius: .38rem; background: #fcfaf1; }
.creature-art, .detail-art { position: relative; isolation: isolate; display: grid; place-items: center; background: var(--wash, #e3e8d0); overflow: hidden; }
.creature-art { border-radius: .34rem .34rem 0 0; aspect-ratio: 1.15; }
.creature-art::before, .detail-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 66%;
  aspect-ratio: 1;
  border: 1px solid var(--edge, #b5bf97);
  border-radius: 50%;
  box-shadow: 0 0 0 .75rem #ffffff24, inset 0 0 0 .65rem #ffffff2d;
  background: radial-gradient(circle, #ffffffab, transparent 70%);
}
.creature-art img {
  width: 78%;
  height: auto;
  filter: drop-shadow(0 .45rem .4rem #28352645);
  transition: transform .22s;
}
.creature-card:has(.creature-open:hover, .creature-open:focus-visible) img { transform: scale(1.065); }
.creature-caption { display: flex; justify-content: space-between; gap: .45rem; align-items: center; padding: .9rem clamp(.65rem, 1.4vw, 1.15rem); }
.creature-caption h3 { font-size: clamp(1.1rem, 2vw, 1.45rem); }
.creature-caption p { margin-top: .28rem; color: #4e5a49; font-size: .875rem; }
.card-plus { display: grid; flex: 0 0 auto; width: 1.9rem; aspect-ratio: 1; place-items: center; border: 1px solid #9ba793; border-radius: 50%; line-height: 1; font-size: 1.05rem; }
.creature-open { position: absolute; inset: 0; width: 100%; border: 0; border-radius: inherit; background: transparent; }
.creature-card:has(.creature-open[hidden]) .card-plus { display: none; }

.gameplay { padding-block: clamp(3.75rem, 7vw, 6.4rem); background: var(--forest); }
.feature-picker { margin-block: 1.7rem 1.05rem; }
.feature-picker button {
  min-height: 2.75rem;
  padding: .4rem clamp(.7rem, 2vw, 1.35rem);
  border: 1px solid #84937b;
  border-radius: .25rem;
  background: transparent;
  font-size: .9375rem;
  transition: background-color .2s;
}
.feature-picker button:hover { background: #2e4232; }
.feature-picker button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--forest); font-weight: 700; }
.feature-panel { display: grid; grid-template-columns: 1.5fr 1fr; border: 1px solid #677760; border-radius: .45rem; overflow: hidden; background: #1d3024; }
.feature-picker[hidden] + .feature-panel { margin-top: 1.5rem; }
.feature-image { background: #233325; min-height: 18rem; }
.feature-image img { width: 100%; height: 100%; object-fit: cover; }
.feature-copy { align-self: center; padding: clamp(1.45rem, 4.2vw, 3.75rem); }
.feature-copy h3 { font-size: clamp(1.7rem, 3vw, 3rem); letter-spacing: -.035em; }
.feature-copy p { margin-top: 1rem; color: var(--muted); max-width: 25rem; }

.play { padding-block: clamp(3.75rem, 7vw, 6.4rem); background: var(--accent); color: var(--ink); color-scheme: light; }
.play-inner { display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; gap: clamp(1.8rem, 6vw, 6rem); }
.play-copy p:not(.eyebrow) { margin: 1rem 0 1.4rem; }
.faq { padding-bottom: .25rem; }
.faq h3 { margin-bottom: 1rem; font-size: 1.4rem; }
.faq details { border-top: 1px solid #788c59; }
.faq details:last-child { border-bottom: 1px solid #788c59; }
.faq summary { position: relative; padding: .75rem 2rem .75rem 0; min-height: 2.75rem; list-style: none; font-weight: 700; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { position: absolute; top: .75rem; right: .25rem; content: "+"; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 1rem 1rem 0; }
.site-footer { padding-block: 1rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1.5rem; font-size: .875rem; }
.footer-inner p { color: var(--light); font-weight: 700; }
.footer-inner p span { color: var(--muted); font-weight: 400; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-underline-offset: .25rem; }

.creature-dialog { width: min(45rem, 100% - 2rem); max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid #9ba78e; border-radius: .5rem; background: var(--paper); color: var(--ink); color-scheme: light; }
.creature-dialog::backdrop { background: #07140dd1; }
.dialog-inner { position: relative; display: grid; grid-template-columns: .9fr 1fr; }
.dialog-close { position: absolute; z-index: 1; top: .7rem; right: .7rem; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid #899780; border-radius: 50%; background: var(--paper); font-size: 1.5rem; line-height: 1; }
.dialog-close:hover { background: #e5ebd5; }
.dialog-inner form { position: absolute; inset: 0; pointer-events: none; }
.dialog-inner form button { pointer-events: auto; }
.detail-art img { width: min(90%, 25rem); height: auto; filter: drop-shadow(0 .45rem .5rem #28352651); }
.detail-copy { padding: 3.9rem clamp(1.2rem, 4.5vw, 2.25rem) 2rem; }
.detail-copy h2 { margin-block: .45rem .65rem; font-size: 2.2rem; }
.detail-talent { margin: .7rem 0 1rem; font-size: .875rem; font-weight: 700; }

@media (max-width: 900px) {
  .hero h1 { font-size: clamp(3.3rem, 8vw, 5.2rem); }
  .hero-inner { min-height: 33rem; }
  .atlas-heading { flex-wrap: wrap; }
}

@media (max-width: 660px) {
  .header-inner { flex-wrap: wrap; min-height: 4rem; gap: 0 .65rem; }
  .brand { gap: .55rem; }
  .brand > span:last-child { font-size: 1rem; }
  .site-nav { flex-basis: 100%; flex-wrap: wrap; gap: .35rem 1.1rem; padding: .25rem 0 .65rem; }
  .site-nav .button { padding-inline: .65rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1rem; padding-block: 2.85rem 2.25rem; }
  .hero h1 { margin-block: .9rem 1.15rem; font-size: clamp(2.8rem, 11vw, 4.6rem); }
  .hero-bg { object-position: 67% 50%; }
  .hero::before { background: linear-gradient(180deg, #09130ef0 4%, #0e1b11ca 39%, #1123154d 74%, #0a180fcf); }
  .hero-portrait { margin: 0; }
  .portrait-art { width: min(83%, 19rem); }
  .hero figcaption { bottom: 0; }
  .hero-actions { margin-top: 1.4rem; }
  .hero-actions .button { min-width: 7.25rem; }
  .creature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-panel, .play-inner { grid-template-columns: 1fr; }
  .feature-image { min-height: auto; aspect-ratio: 1.6; }
  .dialog-inner { grid-template-columns: 1fr; }
  .detail-art { min-height: 10rem; }
  .detail-art img { width: min(55%, 12rem); }
  .detail-copy { padding-top: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 五位伙伴采用前后两层排列，图像完整保留原有轮廓。 */
.ensemble { min-width: 0; }
.ensemble-art { position: relative; width: 100%; aspect-ratio: 1.12; isolation: isolate; }
.partner { position: absolute; height: auto; filter: drop-shadow(0 .55rem .35rem #101b1588); }
.p0 { width: 47%; left: 22%; bottom: 0; z-index: 3; }
.p1 { width: 51%; left: -6%; bottom: 10%; z-index: 2; }
.p2 { width: 52%; right: -4%; bottom: 5%; z-index: 2; }
.p3 { width: 56%; top: -2%; left: 2%; }
.p4 { width: 57%; top: -3%; right: -4%; }
.hero .ensemble figcaption { position: static; text-align: center; padding: .55rem; border: 0; color: var(--light); font-size: .875rem; background: #0a1610ba; }
.atlas-heading { display: block; }
.filter-list { margin-top: 1.3rem; }
.creature-art { --wash: #e1e8d6; --edge: #afbf9c; }
.creature-card { border-color: #bbc4af; }
.statements { padding-block: 3rem; }
.statements h3 { margin: 1.4rem 0 .45rem; }
.statements p { max-width: 55rem; color: var(--muted); }
@media (max-width: 660px) {
  .ensemble { width: min(100%, 28rem); justify-self: center; }
}
