/* Shared by every page build.py writes: the language picker (/), the landing pages (/vi … /ko) and /privacy, /support.
   Dark only, like the app. Each language uses the app's own display font for that language. */
:root {
  --bg: #0d1014;
  --surface: #161a20;
  --line: #30363d;
  --ink: #f6f7f1;
  --muted: #9aa2ab;
  --lime: #d8fa55;
  --violet: #c9a8ff;
  color-scheme: dark;
}
:root, :lang(vi), :lang(en) { --display: 'Handjet', ui-monospace, monospace; --body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
:lang(ja) { --display: 'DotGothic16', 'Hiragino Sans', sans-serif; --body: 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', system-ui, sans-serif; }
:lang(zh) { --display: 'ZCOOL KuaiLe', 'PingFang SC', sans-serif; --body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; }
/* After :lang(zh), which also matches Traditional Chinese; ZCOOL KuaiLe lacks most Traditional characters. */
:lang(zh-Hant) { --display: 'Huninn', 'PingFang TC', sans-serif; --body: 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', system-ui, sans-serif; }
:lang(ko) { --display: 'Do Hyeon', 'Apple SD Gothic Neo', sans-serif; --body: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif; }
[lang] { font-family: var(--body); }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }

html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1040px; margin: 0 auto; }
.wrap.narrow { max-width: 720px; }
a { color: var(--lime); }
a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; display: block; flex: none; }

/* Top bar: mascot + name on the left, language pills on the right (they wrap under it on phones). */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; }
.langs { display: flex; flex-wrap: wrap; gap: 6px; }
.langs a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 14px; }
.langs a:hover { border-color: var(--lime); }
.langs a[aria-current] { border-color: var(--lime); color: var(--lime); }

/* Landing hero: copy beside the first App Store screenshot, stacked on phones. */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; padding-block: 28px 56px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(42px, 7vw, 72px); line-height: 1; margin: 0; text-wrap: balance; }
/* CJK titles are "name tagline": break only at that space, never mid-word. */
.hero h1:is(:lang(ja), :lang(zh), :lang(ko)) { font-size: clamp(32px, 5vw, 54px); line-height: 1.15; word-break: keep-all; overflow-wrap: anywhere; }
.sub { color: var(--violet); font-size: 18px; font-weight: 600; margin: 12px 0 0; }
.hook { color: var(--lime); font-size: 22px; font-weight: 800; line-height: 1.35; margin: 28px 0 8px; text-wrap: balance; }
.intro { margin: 0; max-width: 34em; }
.badge { display: inline-block; margin-top: 28px; line-height: 0; border-radius: 9px; }
.badge img { height: 54px; width: auto; }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 14px; }
.facts li::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--lime); margin-right: 8px; vertical-align: middle; }
.hero-shot { display: block; width: 300px; border-radius: 28px; border: 1px solid var(--line); }

.band { padding-block: 48px; border-top: 1px solid var(--line); }
.title { font-family: var(--display); font-weight: 700; font-size: 38px; line-height: 1.1; margin: 0 0 22px; }
.gallery { list-style: none; margin: 0; padding: 0 0 10px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
.gallery li { scroll-snap-align: start; }
.gallery img { display: block; width: 100%; border-radius: 16px; border: 1px solid var(--line); }
@media (min-width: 761px) { .gallery { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; } }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.features article { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.features h3 { font-family: var(--display); font-weight: 700; font-size: 25px; line-height: 1.15; color: var(--lime); margin: 0 0 8px; }
.features p { margin: 0; }
.cta { text-align: center; }
.promo { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4.5vw, 42px); line-height: 1.15; max-width: 22em; margin: 0 auto; text-wrap: balance; }
.cta .badge { margin-top: 24px; }
.cta .note { color: var(--muted); font-size: 14px; max-width: 40em; margin: 18px auto 0; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 12px; }
  .hero-shot { width: min(280px, 78vw); justify-self: center; }
  .gallery { grid-auto-columns: 46%; }
  .title { font-size: 32px; }
}

/* Language picker at / (most visitors are sent on to their language before it renders). */
.picker-head { text-align: center; padding-block: 48px 24px; }
.picker-head .pixel { margin: 0 auto 16px; }
.picker-head h1 { font-family: var(--display); font-weight: 700; font-size: 56px; line-height: 1; margin: 0; }
.picker { list-style: none; margin: 0; padding: 0 0 32px; display: grid; gap: 10px; }
.picker a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; }
.picker a:hover { border-color: var(--lime); }
.picker .name { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.1; }
.picker .lang-name { color: var(--muted); font-size: 14px; grid-row: span 2; }
.picker .tag { color: var(--violet); font-size: 14px; }

/* Privacy and support pages: one reading column, a band per language. */
.legal-head { padding-block: 40px 20px; display: flex; gap: 18px; align-items: center; }
.brand { font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1; margin: 0; }
.brand:is(:lang(ja), :lang(zh), :lang(ko)) { font-size: 40px; }
.legal-head .sub { color: var(--muted); font-size: 15px; font-weight: 400; margin: 6px 0 0; }
.legal-nav { padding-block: 8px 24px; border-bottom: 1px solid var(--line); }
section.lang { padding-block: 36px 20px; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.code { font-family: 'Handjet', ui-monospace, monospace; font-size: 20px; color: var(--violet); letter-spacing: .08em; margin: 0; }
section.lang h2 { font-size: 26px; line-height: 1.25; font-weight: 800; margin: 6px 0 4px; text-wrap: balance; scroll-margin-top: 16px; }
.date { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
section.lang ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
dl { margin: 12px 0 0; display: grid; gap: 14px; }
dt { font-weight: 700; }
dd { margin: 2px 0 0; opacity: .9; }
.contact { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.contact b { font-weight: 600; color: var(--muted); }
.contact span { user-select: all; font-weight: 800; color: var(--lime); }
.more { margin: 14px 0 0; font-size: 14px; }

footer { border-top: 1px solid var(--line); padding-block: 28px 48px; color: var(--muted); font-size: 13px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; font-size: 14px; }
footer p { margin: 0 0 8px; max-width: 46em; }
