:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --fg: #1f2328;
  --muted: #59636e;
  --border: #d1d9e0;
  --accent: #0969da;
  --accent-fg: #ffffff;
  --violet: #8250df;
  --shadow: 0 8px 30px rgba(31, 35, 40, 0.12);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --fg: #e6edf3;
    --muted: #9198a1;
    --border: #3d444d;
    --accent: #4493f8;
    --accent-fg: #ffffff;
    --violet: #ab7df8;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* Han characters are drawn differently in each locale, so each page asks for its own region's fonts first. */
:lang(zh-Hans) { font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }

:lang(ja) { font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif; }

a { color: var(--accent); }

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}

.brand img { width: 28px; height: 28px; }

.site-header nav { display: flex; gap: 16px; align-items: center; }

.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }

.site-header nav a:hover { color: var(--fg); }

/* Language menu: a disclosure, so it works without script. */
.lang { position: relative; font-size: 0.95rem; }

.lang summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
}

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

.lang summary::after { content: " ▾"; font-size: 0.8em; }

.lang summary:hover, .lang[open] summary { color: var(--fg); }

.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  min-width: 140px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-header .lang ul a { display: block; padding: 6px 14px; color: var(--fg); }

.site-header .lang ul a:hover { background: var(--bg-alt); }

.site-header .lang ul a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* Hero */
.hero { text-align: center; padding-top: 64px; padding-bottom: 32px; }

.hero .icon { width: 96px; height: 96px; margin: 0 auto 16px; }

.hero h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }

.hero .lead { font-size: clamp(1.05rem, 2.5vw, 1.25rem); color: var(--muted); max-width: 680px; margin: 0 auto 28px; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--fg);
  background: var(--bg-alt);
}

.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

.button svg { width: 18px; height: 18px; fill: currentColor; }

.platforms { color: var(--muted); font-size: 0.9rem; margin-top: 16px; }

.shot {
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}

.hero .shot { margin: 40px auto 0; }

/* Features */
section { padding: 56px 0; scroll-margin-top: 56px; }

section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

section h2 { font-size: clamp(1.6rem, 4vw, 2rem); margin: 0 0 8px; letter-spacing: -0.01em; }

.section-lead { color: var(--muted); margin: 0 0 24px; max-width: 680px; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: center;
}

.feature.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.feature.reverse .text { order: 2; }

.feature ul { padding-left: 1.2em; margin: 0; }

.feature li { margin: 0 0 10px; }

.violet { color: var(--violet); font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

section:not(.alt) .card { background: var(--bg-alt); }

.card h3 { margin: 0 0 6px; font-size: 1.05rem; }

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

.more-link { margin-top: 24px; }

.download { display: flex; flex-direction: column; gap: 10px; }

.download .button { justify-content: center; }

.download p { font-size: 0.92rem; }

.download.yours { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Download */

.star {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.star p { font-size: 1.1rem; margin: 0 0 20px; }

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px 0 40px;
}

footer p { margin: 0 0 6px; }

@media (max-width: 760px) {
  .hero { padding-top: 40px; }
  .site-header nav > a { display: none; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 24px; }
  .feature.reverse .text { order: 0; }
  section { padding: 40px 0; }
}

.more-shot { margin: 32px auto 0; width: 100%; max-width: 840px; }
