:root {
  color-scheme: dark;
  --pine: #101d17;
  --paper: #f4f5e7;
  --quiet: #c5cfc0;
  --leaf: #d9f6a0;
  --line: #33483b;
  --layout: 1200px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--paper); background: var(--pine); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #b8eee5; outline-offset: 5px; }

.topbar {
  background: #101d17;
  border-bottom: 1px solid #e2f1ca25;
  padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
}
.topbar__inner, .footer__inner {
  max-width: var(--layout);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__inner { min-height: 64px; }
.studio, .topbar nav {
  display: flex;
  align-items: center;
  gap: 11px;
}
.studio { font-size: .875rem; font-weight: 750; white-space: nowrap; }
.studio img { border-radius: 8px; border: 1px solid #d7e5b96b; }
.topbar nav { gap: 28px; }
.topbar nav a, .footer a {
  display: inline-grid;
  align-items: center;
  min-height: 44px;
  font-size: .875rem;
  color: var(--quiet);
  white-space: nowrap;
}
.topbar nav a:hover, .footer a:hover { color: var(--leaf); }

.hero {
  min-height: min(740px, max(610px, calc(100svh - 65px)));
  position: relative;
  isolation: isolate;
  display: grid;
  overflow: hidden;
  background: #73a8ba;
}
.hero__world, .hero__world img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__world { z-index: -1; }
.hero__world img { object-fit: cover; object-position: 58% 52%; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero::before {
  background: linear-gradient(90deg, #0b1b1694 0%, #172b254d 41%, transparent 73%);
}
.hero::after { background: linear-gradient(0deg, var(--pine) 0%, #101d17b8 8%, transparent 30%); }
.hero__jiahao {
  position: absolute;
  right: max(10%, calc((100vw - 1070px) / 2));
  bottom: 10%;
  width: clamp(235px, 25vw, 375px);
  height: auto;
  filter: drop-shadow(2px 9px 8px #10160cc4);
}
.hero__inner {
  z-index: 1;
  width: min(calc(100% - 72px), var(--layout));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: 56px 76px;
  gap: 45px;
}
.hero__identity { max-width: min(600px, 57%); }
.hero h1 { margin: 0; }
.hero h1 img {
  width: min(100%, 600px);
  height: auto;
  filter: drop-shadow(0 7px 6px #050d13a8);
}
.hero__identity p {
  margin: 18px 0 0;
  font-size: clamp(1.0625rem, 2.1vw, 1.5rem);
  font-weight: 750;
  letter-spacing: .075em;
  line-height: 1.55;
  text-shadow: 0 2px 7px #061713;
}
.hero__download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.hero__download p {
  margin: 0;
  color: #eef5e4;
  font-size: .875rem;
  text-shadow: 0 1px 4px #061713;
}
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  min-height: 62px;
  padding: 12px 29px;
  border: 1px solid #eeffb8;
  border-radius: 15px;
  background: linear-gradient(180deg, #ecf9b8, #bee47d);
  box-shadow: 0 4px 0 #526d3b, 0 12px 25px #091c17b3;
  color: #192814;
  font-size: 1.235rem;
  font-weight: 850;
  transition: background-color .15s, transform .15s;
}
.download:hover { background: #e7ffad; transform: translateY(-2px); }
.download:active { transform: translateY(2px); }

.content { max-width: var(--layout); margin-inline: auto; padding: 54px 26px 72px; }
.intro { max-width: 660px; }
.section-label {
  margin: 0 0 9px;
  color: var(--leaf);
  font-size: .875rem;
  font-weight: 750;
  letter-spacing: .12em;
}
h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4.2vw, 2.65rem);
  line-height: 1.2;
  letter-spacing: .06em;
}
.intro p:not(.section-label) {
  margin: 16px 0 0;
  color: var(--quiet);
  font-size: 1rem;
  line-height: 1.9;
}
.gameplay { margin-top: 52px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}
figure { margin: 0; }
.gallery figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #182820;
}
.gallery a { display: block; }
.gallery a:focus-visible { outline-offset: -5px; }
.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.gallery figcaption { padding: 12px 14px; font-size: .9375rem; }
.footer {
  border-top: 1px solid var(--line);
  background: #0b1611;
  padding: 25px 26px calc(25px + env(safe-area-inset-bottom));
}
.footer p { margin: 0; }
.footer__name { font-size: 1rem; font-weight: 750; }
.footer .footer__credit { margin-top: 6px; color: var(--quiet); font-size: .875rem; }

.lightbox {
  position: fixed;
  width: min(1040px, 95vw);
  max-height: 94vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: var(--pine);
  color: var(--paper);
}
.lightbox::backdrop { background: #020805e6; }
.lightbox form { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.lightbox button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #223b2c;
  color: var(--paper);
  font-size: 1.5rem;
  cursor: pointer;
}
.lightbox img { width: 100%; max-height: 73vh; object-fit: contain; }
.lightbox figcaption { padding: 10px 2px 3px; }

@media (max-width: 760px) {
  .topbar__inner { min-height: 56px; }
  .topbar .desktop-nav { display: none; }
  .hero { min-height: clamp(565px, calc(100svh - 57px), 900px); }
  .hero__world img { object-position: 50% 55%; }
  .hero::before {
    background: linear-gradient(180deg, #173e4a73 0%, #173e4a20 28%, transparent 53%);
  }
  .hero::after {
    background: linear-gradient(0deg, var(--pine) 0%, #101d17d9 14%, #101d1752 31%, transparent 54%);
  }
  .hero__jiahao {
    right: 50%;
    bottom: clamp(123px, 20%, 164px);
    width: min(52%, 263px);
    transform: translateX(49%);
  }
  .hero__inner {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(43px, 8svh, 74px) 21px calc(37px + env(safe-area-inset-bottom));
    text-align: center;
  }
  .hero__identity { width: 100%; max-width: 475px; }
  .hero h1 img { margin-inline: auto; }
  .hero__identity p {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    background: #142c27eb;
    font-size: clamp(.94rem, 3.7vw, 1.125rem);
  }
  .hero__download { align-items: center; gap: 13px; width: 100%; }
  .download { width: min(100%, 296px); min-height: 60px; }
  .hero__download p { line-height: 1.5; }
  .content { padding: 36px 21px 46px; }
  .gameplay { margin-top: 35px; }
  .gallery {
    grid-template-columns: none;
    grid-auto-columns: 87%;
    grid-auto-flow: column;
    overflow-x: auto;
    gap: 12px;
    margin-inline: -21px;
    padding: 0 21px 12px;
    scroll-padding-inline: 21px;
    scroll-snap-type: x mandatory;
  }
  .gallery li { scroll-snap-align: start; }
  .footer { padding-inline: 21px; }
}
@media (max-width: 360px) {
  .hero { min-height: max(530px, calc(100svh - 57px)); }
  .hero__download p { font-size: .8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .download { transition: none; }
}
