:root {
  --ink: #20332b;
  --muted: #4f6459;
  --paper: #f9faf5;
  --white: #fff;
  --line: #d5e1d8;
  --green: #185c47;
  --forest: #102e2b;
  --forest-dark: #0c2522;
  --mint: #c8f4a2;
  --focus: #187b5e;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-height: 4.25rem;
  --section-padding: clamp(3.125rem, 6vw, 5.5rem);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-height) + .75rem);
  scroll-behavior: smooth;
  line-break: strict;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.75 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

h1, h2, h3, p, ol, figure {
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.875rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}

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

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.container {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid #345a4c;
  background: var(--forest-dark);
  color: #f5fcf6;
  --focus: var(--mint);
}

.header-inner {
  display: grid;
  min-height: var(--header-height);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
}

.brand, .site-nav, .footer-nav, .download-title {
  display: flex;
  align-items: center;
}

.brand {
  justify-self: start;
  gap: .6rem;
  font-size: 1.125rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand img {
  width: 2.125rem;
  border-radius: .55rem;
}

.site-nav, .footer-nav {
  gap: clamp(1rem, 2.75vw, 2.25rem);
  font-size: .9375rem;
}

.site-nav {
  color: #d6e7dc;
}

.site-nav a, .footer-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  white-space: nowrap;
}

.site-nav a:hover, .brand:hover {
  color: var(--mint);
}

.button {
  display: inline-flex;
  min-height: 3.375rem;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  transition: background-color .15s ease, color .15s ease;
}

.header-button {
  position: relative;
  min-height: 36px;
  justify-self: end;
  padding: 0 .95rem;
  border-color: #759e86;
  color: #f0fde9;
  font-size: .875rem;
  white-space: nowrap;
}

.header-button:hover {
  background: var(--mint);
  color: #162f28;
}

.header-button::before {
  position: absolute;
  inset: -4px 0;
  content: "";
}

.button-primary {
  width: min(100%, 19rem);
  background: var(--mint);
  color: #162f28;
}

.button-primary:hover {
  background: #e0fac7;
}

.download-icon {
  position: relative;
  width: .95rem;
  height: 1.05rem;
  border-bottom: 2px solid currentColor;
}

.download-icon::before, .download-icon::after {
  position: absolute;
  left: 50%;
  content: "";
}

.download-icon::before {
  top: 0;
  width: 2px;
  height: .73rem;
  background: currentColor;
  transform: translateX(-50%);
}

.download-icon::after {
  top: .235rem;
  width: .46rem;
  height: .46rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.hero {
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
  background: radial-gradient(ellipse at 75% 20%, #2b5a47 0%, transparent 63%), var(--forest);
  color: #f6fcf4;
  --focus: var(--mint);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.75rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(3.125rem, 6.25vw, 5.625rem);
  font-weight: 850;
  line-height: 1.08;
}

.hero-subtitle {
  margin-top: .9rem;
  color: var(--mint);
  font-size: clamp(1.425rem, 3vw, 2.275rem);
  font-weight: 750;
  line-height: 1.32;
}

.hero-description {
  max-width: 28rem;
  margin: 1rem 0 1.65rem;
  color: #d7eadc;
  text-wrap: pretty;
}

.hero-media {
  overflow: hidden;
  border: 1px solid #739d87;
  border-radius: .9rem;
  background: var(--forest-dark);
  box-shadow: 0 1rem 2.5rem #071f1a4a;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 1.53;
  object-fit: cover;
  object-position: center top;
}

.hero-media figcaption {
  padding: .5rem .8rem;
  color: #e0f0e5;
  font-size: .875rem;
}

.section {
  padding-block: var(--section-padding);
}

.screenshots-section {
  padding-top: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: #eef5ec;
}

.screenshots-track {
  --gap: clamp(.75rem, 2vw, 1.125rem);
  display: grid;
  align-items: start;
  grid-auto-flow: column;
  grid-auto-columns: max(11rem, (100% - 3 * var(--gap)) / 4);
  gap: var(--gap);
  overflow-x: auto;
  margin-top: 1.1rem;
  padding: .35rem .25rem .65rem;
  scrollbar-color: #7b9b88 #dfebe2;
  scroll-snap-type: x proximity;
}

.screenshots-track a {
  display: block;
  overflow: hidden;
  border: 1px solid #b3cabd;
  border-radius: .625rem;
  background: var(--white);
  scroll-snap-align: start;
}

.screenshots-track a:focus-visible {
  outline-offset: 2px;
}

.screenshots-track img {
  width: 100%;
}

.text-center {
  text-align: center;
}

.feature-grid, .genre-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.9rem, 2.8vw, 1.65rem);
  margin-top: 1.75rem;
}

.feature {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--white);
}

.feature p, .genre-grid p {
  margin-top: .7rem;
  color: var(--muted);
}

.feature-icon {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: .6rem;
  background: #e7f2e7;
  color: var(--green);
}

.feature-icon::before, .feature-icon::after {
  position: absolute;
  content: "";
}

.icon-search::before {
  top: .68rem;
  left: .7rem;
  width: .95rem;
  height: .95rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-search::after {
  top: 1.48rem;
  left: 1.55rem;
  width: .57rem;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left;
}

.icon-episodes::before {
  inset: .72rem .72rem;
  border: 2px solid currentColor;
  border-radius: .15rem;
}

.icon-episodes::after {
  inset: 1.08rem 1.03rem auto;
  height: .56rem;
  border-block: 2px solid currentColor;
}

.icon-bookmark::before {
  inset: .65rem .98rem .65rem;
  border: 2px solid currentColor;
  border-radius: .15rem .15rem 0 0;
}

.icon-bookmark::after {
  bottom: .55rem;
  left: 1.12rem;
  width: .5rem;
  height: .5rem;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  background: #e7f2e7;
  transform: rotate(45deg);
}

.genre-section {
  padding-top: 0;
}

.genre-grid article {
  padding-top: 1.15rem;
  border-top: 2px solid #b0cfb8;
}

.playback-section {
  padding-top: 0;
}

.playback-panel {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1.35rem, 4vw, 3.5rem);
  border: 1px solid #b6d6c2;
  border-radius: .8rem;
  background: #e4f0e1;
}

.playback-panel p {
  margin-top: .65rem;
  color: var(--muted);
}

.playback-steps {
  padding: 0;
  list-style: none;
}

.playback-steps li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: start;
  gap: .85rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid #b9d3c1;
}

.playback-steps li:first-child {
  border-top: 1px solid #b9d3c1;
}

.playback-steps li > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #95bea8;
  border-radius: 50%;
  color: var(--green);
  font-weight: 750;
}

.faq-section {
  padding-top: 0;
}

.faq-inner {
  max-width: 52rem;
}

.faq-list {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem .2rem;
  list-style: none;
  cursor: pointer;
  font-weight: 750;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  flex: 0 0 .53rem;
  height: .53rem;
  margin-right: .4rem;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  content: "";
  transform: translateY(-.1rem) rotate(45deg);
}

.faq-list details[open] summary::after {
  transform: translateY(.1rem) rotate(225deg);
}

.faq-list summary:hover, .faq-list details[open] summary {
  color: var(--green);
}

.faq-list p {
  padding: 0 .2rem 1.25rem;
  color: var(--muted);
}

.download-section {
  padding-block: clamp(2.2rem, 5vw, 3.5rem);
  background: var(--forest);
  color: #f6fcf4;
  --focus: var(--mint);
}

.download-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.download-title {
  gap: .9rem;
}

.download-title img {
  width: clamp(2.75rem, 5vw, 3.5rem);
  border-radius: .65rem;
}

.download-title h2 {
  font-size: clamp(1.6rem, 4vw, 2.45rem);
}

.site-footer {
  padding-block: 1rem;
  color: var(--muted);
  background: #edf4ea;
}

.footer-inner p, .footer-nav {
  font-size: .875rem;
}

.footer-nav a:hover {
  color: var(--green);
}

@media (max-width: 780px) {
  :root {
    --header-height: 5.5rem;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    align-content: center;
    gap: 0 .75rem;
    padding-top: .4rem;
  }

  .site-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: clamp(.55rem, 4.2vw, 1.4rem);
    font-size: .875rem;
  }

  .site-nav a {
    min-height: 2.625rem;
  }

  .hero-inner, .playback-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-block: 2rem;
  }

  .hero-media {
    width: min(100%, 33rem);
  }

  .hero-media img {
    aspect-ratio: 1.8;
  }

  .screenshots-track {
    grid-auto-columns: clamp(9.4rem, 40vw, 13rem);
  }

  .footer-inner {
    flex-direction: column-reverse;
    gap: .3rem;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1rem;
  }
}

@media (max-width: 580px) {
  .hero-description {
    margin-block: .65rem 1.1rem;
  }

  .button-primary, .hero-media {
    width: 100%;
  }

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

  .feature {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    align-items: start;
    gap: .25rem .8rem;
  }

  .feature-icon {
    grid-row: span 2;
    margin: 0;
  }

  .feature p {
    margin-top: .15rem;
  }

  .download-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
