:root {
  --paper: #f2f0e3;
  --surface: #fbfaf3;
  --ink: #3e3236;
  --muted: #84797a;
  --line: #d8d4c2;
  --frame: #4a3b40;
  --accent: #b1d3c5;
  --butter: #eadb80;
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Yuanti TC", "PingFang TC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #23283a;
    --surface: #2d3347;
    --ink: #ede6da;
    --muted: #a7a3ae;
    --line: #444b61;
    --frame: #e9e1d2;
    --accent: #8db6a6;
    --butter: #cdbe63;
  }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 0 24px 64px; }
a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; }

/* Language: only the block matching <html data-lang> shows. */
[data-lang="zh-Hant"] [lang]:not([lang="zh-Hant"]):not(html),
[data-lang="ja"] [lang]:not([lang="ja"]):not(html),
[data-lang="en"] [lang]:not([lang="en"]):not(html) { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 920px; width: 100%; margin: 0 auto; padding: 20px 24px; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: 0.02em; }
.langs { display: flex; gap: 4px; }
.langs button {
  font: inherit; font-size: 0.85rem; color: var(--ink); background: transparent; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 12px;
}
.langs button[aria-pressed="true"] { background: var(--accent); border-color: var(--frame); color: #3e3236; }

.card {
  background: var(--surface); border: 2px solid var(--frame); border-radius: 22px;
  box-shadow: 4px 4px 0 var(--frame); padding: 24px;
}

/* Apps index */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 24px; }
.app-card { display: flex; gap: 16px; align-items: center; text-decoration: none; transition: transform 0.15s; }
.app-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--frame); }
.app-card img { width: 72px; height: 72px; border-radius: 22%; }
.app-card h2 { margin: 0; font-size: 1.15rem; }
.app-card p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }

/* App page */
.hero { display: flex; gap: 28px; align-items: center; margin: 24px 0 40px; }
.hero img { width: 120px; height: 120px; border-radius: 22%; border: 2px solid var(--frame); box-shadow: 4px 4px 0 var(--frame); flex: none; }
.hero h1 { margin: 0; font-size: 2rem; }
.hero p { margin: 6px 0 0; color: var(--muted); }
.badge {
  display: inline-block; margin-top: 14px; padding: 8px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: var(--frame); color: var(--paper);
}
.badge.soon { background: transparent; color: var(--ink); border: 2px dashed var(--line); font-weight: 500; }

.shots { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 16px; scroll-snap-type: x mandatory; }
.shots img { width: 220px; flex: none; border-radius: 18px; border: 2px solid var(--frame); scroll-snap-align: start; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 40px 0; }
.features h3 { margin: 0 0 6px; font-size: 1.05rem; }
.features p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 32px; }

.doc h1 { font-size: 1.7rem; margin: 24px 0 4px; }
.doc .date { color: var(--muted); margin: 0 0 24px; }
.doc h2 { font-size: 1.15rem; margin-top: 28px; }
.doc ul { padding-left: 1.3em; }

footer { color: var(--muted); font-size: 0.85rem; text-align: center; padding: 24px; }

@media (max-width: 560px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero h1 { font-size: 1.6rem; }
  .shots img { width: 180px; }
}
