:root {
  color-scheme: light;
  --ink: #203a31;
  --muted: #4f6356;
  --forest: #123a34;
  --night: #0d302b;
  --paper: #fbf6e9;
  --sand: #eee7d5;
  --line: #dcd7c4;
  --tap: #32e2d0;
  --hero-text: #f8f4e8;
  --hero-muted: #d0e0d4;
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", SimSun, serif;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #0a79a2;
  outline-offset: 5px;
}

section[id] { scroll-margin-top: 94px; }
:target { scroll-margin-top: 94px; }
.shell { width: min(1216px, calc(100% - 72px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  background: white;
  color: var(--ink);
  padding: .5rem 1rem;
  border-radius: .5rem;
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--night);
  color: var(--hero-text);
  border-bottom: 1px solid #ffffff1a;
}
.header-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .68rem;
  width: fit-content;
  font-size: 1rem;
  line-height: 1.33;
  font-weight: 750;
  text-decoration: none;
}
.brand img { border-radius: .62rem; }
.brand small {
  display: block;
  font-size: .75rem;
  color: var(--hero-muted);
  font-weight: 500;
}
.main-nav { display: flex; gap: clamp(1.1rem, 3vw, 2.25rem); }
.main-nav a {
  text-decoration: none;
  white-space: nowrap;
  color: var(--hero-muted);
  font-size: .94rem;
}
.main-nav a:is(:hover, [aria-current]) { color: white; text-decoration: underline; text-underline-offset: .42rem; }
.header-download { justify-self: end; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.38rem;
  min-height: 49px;
  border: 1px solid transparent;
  border-radius: 999px;
  line-height: 1.3;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease;
}
.header-download { min-height: 42px; padding: .51rem 1.09rem; font-size: .91rem; }
.button-tap { background: var(--tap); color: #073732; }
.button-tap:hover { background: #75efe2; }
.button-outline { color: var(--hero-text); border-color: #dce8d786; }
.button-outline:hover { background: #ffffff12; border-color: var(--hero-text); }
.button-ink { background: var(--ink); color: white; }
.button-ink:hover { background: #365949; }
.site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible, .lightbox :focus-visible { outline-color: #85f8e7; }

.hero {
  background: radial-gradient(ellipse at 80% 15%, #3b675c 0%, transparent 58%), var(--forest);
  color: var(--hero-text);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.25fr);
  gap: clamp(1.75rem, 4.6vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.25rem, 4.3vw, 4.25rem);
}
.hero-copy { min-width: 0; }
.hero-genre { font-size: .875rem; font-weight: 650; letter-spacing: .105em; color: #d5e6c7; }
.hero-genre span, .hero-platform span { margin-inline: .25rem; }
.hero-title { width: min(100%, 333px); margin: .4rem 0 .92rem; }
.hero-title img { width: 100%; filter: drop-shadow(0 8px 18px #0c241f88); }
.hero-lead { font-size: clamp(1.25rem, 2.05vw, 1.72rem); font-weight: 750; line-height: 1.48; }
.hero-description { max-width: 24rem; margin-top: .55rem; color: var(--hero-muted); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.33rem; }
.hero-platform { margin-top: .72rem; color: var(--hero-muted); font-size: .875rem; }
.hero-art {
  overflow: hidden;
  border-radius: 1.4rem;
  border: 1px solid #d9f9de6b;
  background: #88c6bd;
  box-shadow: 0 24px 54px #082b26a6;
}
.hero-art img { width: 100%; aspect-ratio: 1.47; object-fit: cover; object-position: 61% center; }

.section { padding-block: clamp(3.25rem, 7.2vw, 6.35rem); }
.section h2, .guide-article h2 {
  font: 800 clamp(1.85rem, 4.3vw, 3.1rem)/1.2 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section-heading { margin-bottom: 1.8rem; }
.section-heading p, .section-lead { margin-top: .72rem; color: var(--muted); }
.game-layout { display: grid; grid-template-columns: 1fr 1.22fr; gap: clamp(2rem, 6.2vw, 6rem); align-items: center; }
.game-copy .section-lead { max-width: 25rem; }
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.35rem 0 0;
}
.feature-list li {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  align-items: baseline;
  gap: .8rem;
  padding-block: .68rem;
  border-top: 1px solid var(--line);
}
.feature-list span { color: var(--muted); }
.trailer { overflow: hidden; border-radius: 1.15rem; background: var(--night); color: var(--hero-text); }
.trailer video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--night); }
.trailer figcaption { padding: .48rem .9rem; font-size: .875rem; color: var(--hero-muted); }
.routes { margin-top: clamp(2.6rem, 5.5vw, 4.4rem); border-top: 1px solid var(--line); padding-top: 1.45rem; }
.routes h3 { font-size: 1.14rem; }
.route-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}
.route-list li {
  min-width: 0;
  display: grid;
  gap: .1rem .68rem;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  padding: .7rem;
  background: #fffdf5;
  border: 1px solid #e6deca;
  border-radius: .8rem;
  line-height: 1.42;
}
.route-list img { grid-row: span 2; }
.route-list span { font-size: .875rem; color: var(--muted); }

.section-gallery { background: var(--sand); }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.9vw, 1.5rem); }
.gallery-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: block;
  background: var(--forest);
  color: white;
  border-radius: 1.1rem;
  text-decoration: none;
  box-shadow: 0 5px 18px #4d47302b;
}
.gallery-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .22s ease; }
.gallery-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  z-index: 0;
  background: linear-gradient(transparent, #071e19df);
  pointer-events: none;
}
.gallery-card span { position: absolute; inset: auto .95rem .85rem; z-index: 1; font-weight: 720; line-height: 1.45; }
.gallery-card:is(:hover, :focus-visible) img { transform: scale(1.035); }
.gallery-card:is(:hover, :focus-visible) span { text-decoration: underline; text-underline-offset: .25rem; }

.section-guide { background: #fffaf0; }
.starter-list {
  margin: 0 0 1.6rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1.5rem);
  list-style-position: inside;
}
.starter-list li {
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid #7f9a68;
  border-radius: .8rem;
}
.starter-list li::marker { color: #42614c; font-weight: 750; }
.starter-list h3 { display: inline; font-size: 1.13rem; }
.starter-list p { margin-top: .55rem; color: var(--muted); }

.section-updates { border-top: 1px solid #e5deca; }
.updates-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.62fr); gap: clamp(1.2rem, 6vw, 5rem); }
.text-link { display: inline-block; margin-top: .85rem; font-weight: 720; text-decoration-thickness: 1px; text-underline-offset: .24rem; }
.text-link:hover, .update-list a:hover { color: #146154; }
.update-list article { border-top: 1px solid var(--line); padding-block: 1rem; }
.update-list article:last-child { border-bottom: 1px solid var(--line); }
.update-list h3 { font-size: 1.12rem; }
.update-list h3 a { text-decoration-thickness: 1px; text-underline-offset: .25rem; }
.update-list p { margin-top: .2rem; color: var(--muted); }

.site-footer { background: var(--night); color: var(--hero-text); }
.footer-inner { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; padding-block: 1.7rem; }
.footer-copy { display: flex; align-items: center; gap: .85rem; }
.footer-copy img { flex: none; border-radius: .85rem; }
.footer-copy p { color: var(--hero-muted); font-size: .875rem; }

.lightbox {
  color: var(--hero-text);
  background: var(--night);
  border: 1px solid #dce8d75c;
  border-radius: 1rem;
  padding: .75rem;
  max-width: min(92vw, 54rem);
  max-height: 96vh;
  max-height: 96dvh;
}
.lightbox::backdrop { background: #071c18df; }
.lightbox-inner { display: grid; justify-items: center; gap: .65rem; }
.lightbox-image {
  width: min(63vw, 460px);
  height: min(70vh, 690px);
  height: min(70dvh, 690px);
  object-fit: contain;
}
.lightbox-controls { display: flex; align-items: center; justify-content: space-between; gap: .7rem; width: 100%; }
.lightbox button {
  border: 1px solid #dce8d75c;
  border-radius: .68rem;
  padding: .38rem .65rem;
  min-height: 42px;
  line-height: 1.3;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  background: #28554a;
  color: white;
  cursor: pointer;
  white-space: nowrap;
}
.lightbox button:hover { background: #39695b; }
.lightbox-close { justify-self: end; }
#gallery-caption { text-align: center; line-height: 1.4; }

.guide-banner {
  color: var(--hero-text);
  padding-block: clamp(2.6rem, 6vw, 5.15rem);
  background: linear-gradient(90deg, #123a34 33%, #123a34ed 54%, #123a3480), url("assets/star-conch-bay.webp") center right / cover var(--forest);
}
.guide-banner h1 { font: 750 clamp(2rem, 5.7vw, 4.3rem)/1.22 var(--serif); margin: .52rem 0 .92rem; }
.guide-banner p:last-child { max-width: 38rem; color: var(--hero-muted); font-size: 1.08rem; }
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr);
  gap: clamp(1.4rem, 5vw, 5.2rem);
  align-items: start;
  max-width: 1040px;
  margin-block: 2.5rem 4.5rem;
}
.guide-sidebar { position: sticky; top: 96px; min-width: 0; }
.guide-sidebar nav {
  padding: .85rem;
  display: grid;
  border: 1px solid var(--line);
  background: #fffaf0;
  border-radius: .85rem;
}
.guide-sidebar h2 { margin: .18rem .38rem .25rem; font-size: 1.05rem; }
.guide-sidebar a { display: block; padding: .35rem .38rem; border-radius: .3rem; text-decoration: none; font-size: .94rem; }
.guide-sidebar a:hover { background: var(--sand); text-decoration: underline; text-underline-offset: .24rem; }
.guide-sidebar img { margin-top: 1rem; width: 100%; max-height: 36vh; object-fit: cover; object-position: center 56%; border-radius: .85rem; }
.guide-article { line-height: 1.82; }
.guide-article section + section { margin-top: 2.35rem; border-top: 1px solid var(--line); padding-top: 1.9rem; }
.guide-article h2 { font-size: clamp(1.55rem, 3vw, 2.24rem); }
.guide-article h2 + p, .guide-article p + p { margin-top: .8rem; }
.guide-article .stage { color: #476954; font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.guide-list { padding-inline-start: 1.35rem; margin-bottom: 0; }
.guide-list li + li { margin-top: .55rem; }
.project-table { border-collapse: collapse; margin: 1.05rem 0; width: 100%; text-align: left; }
.project-table th, .project-table td { border-bottom: 1px solid var(--line); padding: .62rem .7rem; vertical-align: top; }
.project-table thead { background: var(--sand); }
.faq details { border-bottom: 1px solid var(--line); padding-block: .8rem; }
.faq h2 { margin-bottom: .4rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: .42rem; }

@media (max-width: 1050px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); }
  .hero-title { width: min(100%, 289px); }
  .route-list li { grid-template-columns: 33px minmax(0, 1fr); padding: .55rem; }
}
@media (max-width: 840px) {
  .shell { width: calc(100% - 40px); }
  .route-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-list li { grid-template-columns: 40px minmax(0, 1fr); padding: .7rem; }
  .gallery-card span { inset: auto .65rem .65rem; }
}
@media (max-width: 700px) {
  section[id], :target { scroll-margin-top: 16px; }
  .site-header { position: relative; }
  .header-inner { grid-template-columns: 1fr auto; gap: .6rem .8rem; padding-block: .7rem .55rem; }
  .main-nav {
    grid-area: 2 / 1 / 3 / -1;
    justify-content: space-between;
    gap: .55rem;
    border-top: 1px solid #ffffff1a;
    padding-top: .48rem;
  }
  .main-nav a { padding-block: .22rem; font-size: .875rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; }
  .hero-title { width: min(100%, clamp(216px, 60vw, 300px)); }
  .hero-description { max-width: 25rem; }
  .hero-art img { aspect-ratio: 1.64; }
  .hero-art { border-radius: 1rem; }
  .game-layout, .updates-layout, .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .updates-layout { gap: 0; }
  .route-list, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .starter-list { grid-template-columns: minmax(0, 1fr); }
  .guide-banner { background: linear-gradient(90deg, #123a34f0, #123a34dc), url("assets/star-conch-bay.webp") center / cover var(--forest); }
  .guide-sidebar { position: static; }
  .guide-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .4rem; }
  .guide-sidebar h2 { grid-column: 1 / -1; }
  .guide-sidebar img { display: none; }
}
@media (max-width: 390px) {
  .shell { width: calc(100% - 32px); }
  .button { padding-inline: .94rem; }
  .route-list li { grid-template-columns: 30px minmax(0, 1fr); gap: .15rem .5rem; padding: .6rem; }
  .footer-inner { flex-wrap: wrap; }
  .project-table th, .project-table td { padding: .55rem .28rem; font-size: .9rem; }
}
@media (max-height: 492px) {
  .lightbox-image { height: 59dvh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
