:root {
  color-scheme: dark;
  --ink: #070908;
  --charcoal: #101514;
  --panel: #141b19;
  --panel-soft: #1a2220;
  --line: #39413d;
  --line-bright: #7f8c85;
  --text: #f2f0e8;
  --muted: #b9c0b8;
  --dim: #87918a;
  --jade: #6fbf93;
  --teal: #5ca6b1;
  --gold: #d7b35a;
  --cinnabar: #bd5d55;
  --shadow: rgba(0, 0, 0, 0.58);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family:
    "ChironGoRoundTC",
    "Noto Sans TC",
    "Noto Sans SC",
    "Microsoft JhengHei",
    "PingFang TC",
    system-ui,
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 40;
  padding: 8px 12px;
  transform: translateY(-140%);
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--charcoal);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(127, 140, 133, 0.28);
  background: rgba(7, 9, 8, 0.91);
  backdrop-filter: blur(14px);
}

.brand-link,
.main-nav,
.language-switch,
.footer-links,
.hero-actions,
.support-actions {
  display: flex;
  align-items: center;
}

.brand-link {
  min-width: 0;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand-link img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.brand-link span {
  overflow-wrap: anywhere;
}

.main-nav,
.language-switch {
  gap: 6px;
}

.main-nav a,
.language-switch a {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover,
.language-switch a:hover,
.main-nav a[aria-current="page"],
.language-switch a[aria-current="true"] {
  border-color: rgba(215, 179, 90, 0.55);
  color: var(--text);
  background: rgba(215, 179, 90, 0.09);
}

.hero {
  position: relative;
  min-height: 76svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 86px 28px 64px;
  border-bottom: 1px solid rgba(127, 140, 133, 0.3);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.company-hero::before {
  background:
    linear-gradient(90deg, rgba(7, 9, 8, 0.96), rgba(7, 9, 8, 0.78), rgba(7, 9, 8, 0.9)),
    url("/assets/xiadao/screenshots/dungeon_entrance.webp") center / cover;
}

.xia-hero::before {
  background:
    linear-gradient(90deg, rgba(7, 9, 8, 0.96), rgba(7, 9, 8, 0.76), rgba(7, 9, 8, 0.88)),
    url("/assets/xiadao/screenshots/map.webp") center / cover;
}

.hero::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 9, 8, 0.12), rgba(7, 9, 8, 0.86)),
    repeating-linear-gradient(
      90deg,
      rgba(215, 179, 90, 0.08) 0,
      rgba(215, 179, 90, 0.08) 1px,
      transparent 1px,
      transparent 86px
    );
}

.hero-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.xia-hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  font-size: 3.75rem;
}

h2 {
  font-size: 2.05rem;
}

h3 {
  font-size: 1.18rem;
}

.hero-lead,
.page-hero p,
.feature-band p,
.narrow-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-lead {
  margin: 24px 0 0;
}

.xia-stamp {
  width: 132px;
  height: 132px;
  margin: 0 0 22px;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.7));
}

.hero-actions,
.support-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.button.primary {
  border-color: rgba(215, 179, 90, 0.76);
  background: rgba(88, 62, 22, 0.82);
  color: #fff5ce;
}

.button.secondary {
  background: rgba(20, 27, 25, 0.78);
  color: var(--text);
}

.button:hover,
.text-link:hover {
  border-color: var(--gold);
  color: #fff7d6;
}

.effective-date {
  color: var(--dim);
  font-size: 0.95rem;
}

.store-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 24px;
}

.google-play-link {
  display: inline-flex;
  padding: 0;
  border-radius: 8px;
  line-height: 0;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.google-play-link:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.google-play-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.google-play-link img {
  width: 206px;
  height: auto;
}

.ios-release-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.content-band,
.feature-band,
.legal-document,
.site-footer {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.content-band {
  padding: 76px 0;
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 34px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid rgba(127, 140, 133, 0.26);
  border-bottom: 1px solid rgba(127, 140, 133, 0.26);
}

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

.service-grid,
.feature-grid,
.screenshot-grid {
  display: grid;
  gap: 16px;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.text-card,
.screenshot-card {
  border: 1px solid rgba(127, 140, 133, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(26, 34, 32, 0.92), rgba(13, 17, 16, 0.96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.text-card {
  min-height: 190px;
  padding: 22px;
}

.text-card h3 {
  color: #edf3ee;
}

.text-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.text-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-bottom: 18px;
  background: var(--jade);
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.stamp-figure {
  justify-self: center;
  margin: 0;
}

.stamp-figure img {
  width: 320px;
  height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.48));
}

.contact-band {
  padding-bottom: 96px;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}

.contact-line span {
  color: var(--dim);
}

.contact-line a,
.footer-links a,
.legal-document a {
  color: var(--gold);
}

.screenshots-band {
  width: min(calc(100% - 48px), 1240px);
}

.screenshot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screenshot-card {
  margin: 0;
  overflow: hidden;
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  background: #050606;
}

.screenshot-card figcaption {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid rgba(127, 140, 133, 0.26);
  color: var(--muted);
  font-weight: 700;
}

.support-band {
  margin-bottom: 24px;
}

.page-hero {
  padding: 84px 28px 52px;
  border-bottom: 1px solid rgba(127, 140, 133, 0.26);
  background:
    linear-gradient(90deg, rgba(7, 9, 8, 0.96), rgba(16, 21, 20, 0.94)),
    url("/assets/xiadao/screenshots/equipment.webp") center / cover;
}

.page-hero-inner {
  width: min(100%, 920px);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 2.8rem;
}

.legal-document {
  padding: 56px 0 88px;
}

.legal-document section {
  padding: 26px 0;
  border-bottom: 1px solid rgba(127, 140, 133, 0.24);
}

.legal-document h2 {
  color: #f5edd0;
  font-size: 1.42rem;
}

.legal-document p {
  max-width: 850px;
  margin: 14px 0 0;
  color: var(--muted);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.site-footer {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(127, 140, 133, 0.26);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  color: var(--text);
}

.site-footer span {
  color: var(--dim);
}

.footer-links {
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 18px;
  }

  .main-nav,
  .language-switch {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 72svh;
    padding: 68px 22px 52px;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .service-grid,
  .feature-grid,
  .screenshot-grid,
  .feature-band {
    grid-template-columns: 1fr;
  }

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

  .content-band,
  .legal-document,
  .site-footer {
    width: min(calc(100% - 36px), var(--max));
  }

  .screenshots-band {
    width: min(calc(100% - 36px), 760px);
  }

  .text-card {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .brand-link img {
    width: 34px;
    height: 34px;
  }

  .main-nav a,
  .language-switch a {
    min-height: 36px;
    padding: 5px 10px;
  }

  .hero {
    min-height: 68svh;
  }

  h1 {
    font-size: 2.32rem;
  }

  .page-hero h1 {
    font-size: 2.12rem;
  }

  .hero-lead,
  .page-hero p,
  .feature-band p,
  .narrow-copy {
    font-size: 1rem;
  }

  .hero-actions,
  .support-actions,
  .legal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .xia-stamp {
    width: 104px;
    height: 104px;
  }

  .stamp-figure img {
    width: 220px;
    height: 220px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
