:root {
  --bg: #F7FAF7;
  --surface: #FFFFFF;
  --ink: #18201B;
  --muted: #5F6A63;
  --primary: #2E7557;
  --secondary: #665B9A;
  --accent: #A98A3A;
  --band: #EEF5EF;
  --hero-text: #FFFFFF;
  --hero-overlay: rgba(17, 31, 24, .72);
  --header-bg: rgba(247, 250, 247, .94);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 99;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 72px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(20, 20, 20, .08);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
}

.brand-text {
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a,
.header-action {
  padding: 9px 12px;
  color: var(--muted);
  border-radius: 8px;
  font-size: .95rem;
}

.main-nav a:hover,
.header-action:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, .05);
}

.header-action {
  color: #fff;
  background: var(--ink);
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: 78svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 86px 0 54px;
  background: var(--ink);
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, var(--hero-overlay) 0%, rgba(0, 0, 0, .34) 52%, rgba(0, 0, 0, .12) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .48) 0%, rgba(0, 0, 0, 0) 42%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(300px, .84fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  color: var(--hero-text);
  max-width: 720px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .26);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--secondary);
  font-weight: 800;
  font-size: .94rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
p,
li,
summary,
.brand-text {
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 20px;
  font-size: 4.15rem;
  line-height: 1.08;
}

h2 {
  margin-bottom: 18px;
  font-size: 2.25rem;
  line-height: 1.18;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.28;
}

.hero-lead {
  max-width: 620px;
  font-size: 1.24rem;
  line-height: 1.75;
}

.hero-description {
  max-width: 680px;
  color: rgba(255, 255, 255, .82);
}

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

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

.btn-primary,
.btn-download {
  color: #fff;
  background: var(--primary);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .08);
}

.hero-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-stats div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  border-radius: 8px;
}

.hero-stats dt {
  color: var(--secondary);
  font-size: .84rem;
  font-weight: 800;
}

.hero-stats dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 800;
}

.hero-visual {
  margin: 0;
  align-self: end;
}

.hero-visual img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .36);
}

.hero-visual figcaption {
  margin-top: 12px;
  color: rgba(255, 255, 255, .76);
  font-size: .92rem;
}

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

section:not(.hero) {
  padding: 78px 0;
}

.section-band {
  background: var(--band);
}

.section-heading {
  max-width: 780px;
}

.section-heading.compact {
  margin-bottom: 28px;
}

.overview-grid,
.experience-grid,
.faq-grid {
  display: grid;
  grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr);
  gap: 48px;
  align-items: start;
}

.overview-copy p,
.experience-copy p,
.feature-card p,
.module-list p,
.faq-list p,
.site-footer p,
.download-band p {
  color: var(--muted);
}

.keyword-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.keyword-list li {
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, .09);
  background: var(--surface);
  border-radius: 8px;
  color: var(--muted);
  font-size: .9rem;
}

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

.scene-card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  overflow: hidden;
}

.scene-card img {
  width: 100%;
  aspect-ratio: 1.28 / 1;
  object-fit: cover;
  background: var(--band);
}

.scene-card div {
  padding: 18px;
}

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

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  min-height: 220px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
}

.feature-number {
  display: block;
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 28px;
}

.experience-media img {
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(20, 20, 20, .12);
}

.module-list {
  display: grid;
  gap: 14px;
}

.module-list article {
  padding: 16px 0 16px 18px;
  border-left: 4px solid var(--primary);
}

.topic-section {
  background: var(--surface);
}

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

.topic-card {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.topic-card img {
  width: 100%;
  aspect-ratio: 1.58 / 1;
  object-fit: cover;
}

.topic-card div {
  padding: 18px;
}

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

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item {
  margin: 0;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(6) {
  grid-column: span 2;
}

.gallery-item:nth-child(2),
.gallery-item:nth-child(5) {
  transform: translateY(18px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1.32 / 1;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 14px 16px 16px;
  font-weight: 800;
}

.compat-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: center;
}

.process-list {
  display: grid;
  gap: 14px;
}

.process-list article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
}

.process-list span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.process-list p {
  color: var(--muted);
}

.detail-images {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(190px, .72fr);
  gap: 16px;
  align-items: end;
}

.detail-images img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(20, 20, 20, .12);
}

.detail-images img:first-child {
  aspect-ratio: 1.48 / 1;
}

.detail-images img:last-child {
  aspect-ratio: .82 / 1;
}

.download-section {
  background: var(--ink);
}

.download-band {
  width: min(100% - 56px, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  color: #fff;
}

.download-band p {
  max-width: 760px;
  color: rgba(255, 255, 255, .74);
}

.download-note {
  color: var(--secondary) !important;
  font-weight: 800;
}

.btn-download {
  min-width: 188px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  padding: 16px 18px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 34px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer a {
  color: var(--primary);
  word-break: break-all;
}

.layout-cards .hero-inner { grid-template-columns: minmax(0, .92fr) minmax(340px, .96fr); }
.layout-cards .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-cards .feature-card:nth-child(3) { background: color-mix(in srgb, var(--surface) 80%, var(--secondary)); }

@media (max-width: 980px) {
  .brand-text {
    max-width: 260px;
  }

  .main-nav {
    display: none;
  }

  .hero-inner,
  .overview-grid,
  .experience-grid,
  .faq-grid,
  .download-band,
  .compat-grid,
  .detail-images {
    grid-template-columns: 1fr;
  }

  .layout-arena .hero-inner,
  .layout-scroll .hero-inner,
  .layout-diary .hero-inner,
  .layout-comic .hero-inner,
  .layout-lab .hero-inner,
  .layout-heritage .hero-inner,
  .layout-mobile .hero-inner,
  .layout-retro .hero-inner,
  .layout-play .hero-inner,
  .layout-cards .hero-inner,
  .layout-diary .experience-grid,
  .layout-lab .overview-grid,
  .layout-comic .gallery-grid,
  .layout-mobile .gallery-grid,
  .layout-play .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    max-width: 620px;
  }

  .feature-grid,
  .scene-grid,
  .topic-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item,
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(6) {
    grid-column: auto;
    transform: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 10px 16px;
    min-height: 64px;
  }

  .header-action {
    display: none;
  }

  .brand-text {
    max-width: 210px;
  }

  .hero {
    padding: 70px 0 42px;
    min-height: auto;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .52) 64%, rgba(0, 0, 0, .34) 100%),
      linear-gradient(0deg, rgba(0, 0, 0, .46) 0%, rgba(0, 0, 0, .10) 44%);
  }

  .hero-inner,
  .section-inner {
    padding: 0 18px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .hero-lead {
    font-size: 1.08rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-stats div {
    padding: 10px;
  }

  .hero-stats dd {
    font-size: .82rem;
    line-height: 1.32;
  }

  .hero-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 20px 0;
  }

  .hero-actions .btn {
    width: auto;
    min-height: 44px;
    padding: 10px 12px;
    font-size: .92rem;
  }

  .hero-visual {
    display: none;
  }

  .scene-grid,
  .topic-grid {
    gap: 12px;
  }

  .scene-card,
  .topic-card,
  .feature-card {
    min-height: 0;
  }

  .scene-card div,
  .topic-card div {
    padding: 14px;
  }

  .process-list article {
    grid-template-columns: 42px 1fr;
    padding: 14px;
  }

  .detail-images {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  section:not(.hero) {
    padding: 52px 0;
  }

  .download-band {
    width: min(100% - 36px, var(--max));
  }

  .btn {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 18px;
  }
}
