/* Shared styles for about.html / privacy.html / contact.html
   Matches the dark theme used by the game shell. */
:root {
  --bg-base: #1b1530;
  --bg: linear-gradient(170deg, #1b1530 0%, #2a1f47 55%, #3a2a4d 100%);
  --fg: #f6efe2;
  --muted: #b9aed6;
  --panel: rgba(255, 255, 255, .06);
  --panel-bd: rgba(255, 255, 255, .10);
  --chip: #f3e9d4;
  --gold: #e8b04b;
  --moon: #5e87d6;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  /* Script fallbacks: Devanagari (hi), Arabic (ar), CJK (zh-Hans/zh-Hant).
     Keep these in sync with the body rule in index.html. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", Mangal, "Noto Sans Arabic", "Geeza Pro", Tahoma, "Noto Sans SC", "Noto Sans TC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-base);
  background-image: var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Naskh Arabic", sans-serif;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
}

.brand .dots { display: inline-block; width: 30px; height: 16px; position: relative; }
.brand .dots i { position: absolute; top: 2px; width: 13px; height: 13px; border-radius: 50%; }
.brand .dots i:first-child { left: 0; background: var(--gold); }
.brand .dots i:last-child { left: 12px; background: var(--moon); }

.back {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--panel-bd);
  background: var(--panel);
  border-radius: 999px;
  padding: 6px 14px;
}

.back:hover { color: var(--chip); }

h1 {
  font-size: 27px;
  line-height: 1.25;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}

.updated {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 26px;
}

h2 {
  font-size: 17px;
  margin: 30px 0 8px;
  color: var(--chip);
}

p { margin: 0 0 14px; color: var(--fg); opacity: .93; }

ul { margin: 0 0 14px; padding-inline-start: 22px; }
li { margin-bottom: 7px; opacity: .93; }

a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(232, 176, 75, .35); }
a:hover { border-bottom-color: var(--gold); }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-bd);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 16px 0 22px;
}

.mail {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 600;
}

.copybtn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--panel-bd);
  border-radius: 999px;
  padding: 5px 13px;
}

.copybtn:hover { color: var(--chip); }

.cta {
  display: inline-block;
  margin-top: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.cta:hover { background: rgba(232, 176, 75, .12); }

footer.pf {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--panel-bd);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 2;
}

footer.pf a { color: var(--muted); border-bottom-color: var(--panel-bd); }
footer.pf a:hover { color: var(--chip); }
footer.pf .sep { opacity: .5; margin: 0 7px; }

.langpick {
  margin-top: 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--panel-bd);
  border-radius: 8px;
  padding: 5px 9px;
}

[dir="rtl"] .brand .dots i:first-child { left: auto; right: 0; }
[dir="rtl"] .brand .dots i:last-child { left: auto; right: 12px; }

@media (max-width: 480px) {
  h1 { font-size: 23px; }
  .wrap { padding: 20px 16px 48px; }
}

/* Devanagari needs vertical room for matras and conjuncts.
   Scoped to lang="hi"; html[lang] is set by pages-i18n.js. */
html[lang="hi"] body,
html[lang="hi"] .topbar,
html[lang="hi"] .cta,
html[lang="hi"] .copybtn {
  line-height: 1.5;
}

/* Japanese must not fall through to the SC/TC faces in the global stack,
   or kanji render with Chinese glyph shapes. Scoped so zh-Hans/zh-Hant
   keep theirs. Mirrors the html[lang="ja"] rule in index.html. */
html[lang="ja"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Yu Gothic UI", "Noto Sans JP", Meiryo, "Segoe UI", Roboto, sans-serif;
}

/* Korean needs the Hangul faces ahead of the CJK fallbacks, or hanja and
   Hangul pick up Japanese/Chinese metrics. Mirrors the html[lang="ko"] rule
   in index.html. */
html[lang="ko"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", AppleGothic, Dotum, "Segoe UI", Roboto, sans-serif;
}
