/* 字得其樂 site. Colours are the app's frozen roles (scripts/arcade_ui.gd V_*): ground, surface, ink, primary, gold.
   System fonts only: no web fonts, no scripts, no trackers. */
:root {
  --ground: #F5F6F8;
  --surface: #FFFFFF;
  --line: #E3E6EB;
  --ink: #17212B;
  --ink-2: #505B67;
  --primary: #1E3A52;
  --gold: #E0A42A;
  --gold-soft: #FBEFD2;
  --gold-line: #8A5A00;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #12171D;
    --surface: #1B232C;
    --line: #2C3742;
    --ink: #EEF1F4;
    --ink-2: #A9B3BD;
    --primary: #9CC3E4;
    --gold: #E8B54A;
    --gold-soft: #3A2E14;
    --gold-line: #E8B54A;
  }
}
:root[data-theme="dark"] {
  --ground: #12171D; --surface: #1B232C; --line: #2C3742; --ink: #EEF1F4; --ink-2: #A9B3BD;
  --primary: #9CC3E4; --gold: #E8B54A; --gold-soft: #3A2E14; --gold-line: #E8B54A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

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

header.site { padding: 20px 0 8px; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
nav.site { display: flex; gap: 4px; flex-wrap: wrap; }
nav.site a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
nav.site a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

main { padding: 8px 0 32px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 20px;
  margin: 16px 0;
}
h1 { font-size: 28px; line-height: 1.3; margin: 16px 0 4px; font-weight: 600; }
h2 { font-size: 20px; line-height: 1.4; margin: 28px 0 8px; font-weight: 600; }
h3 { font-size: 17px; margin: 20px 0 4px; font-weight: 600; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
p, ul, ol { margin: 8px 0; }
ul, ol { padding-left: 1.3em; }
li { margin: 4px 0; }
.muted { color: var(--ink-2); font-size: 15px; }
.lang { font-size: 15px; }

.hero { text-align: center; padding: 40px 0 16px; }
.hero img { width: 120px; height: 120px; border-radius: 27px; box-shadow: 0 6px 20px rgba(23, 33, 43, .14); }
.hero h1 { font-size: 34px; margin-top: 20px; }
.hero p { color: var(--ink-2); font-size: 18px; margin: 6px 0 0; }
.store {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 24px; min-height: 50px; padding: 0 28px; border-radius: 14px;
  background: var(--primary); color: #fff; text-decoration: none; font-weight: 600;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .store { color: #12171D; } }
.store.soon { background: var(--gold-soft); color: var(--gold-line); }

.faq h3 { margin-top: 24px; }
.faq h3:first-child { margin-top: 0; }
.mail { font-weight: 600; word-break: break-all; }

table.files { width: 100%; border-collapse: collapse; font-size: 15px; }
table.files th { white-space: nowrap; }
table.files th, table.files td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.files td.num { white-space: nowrap; }
code, .hash { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; word-break: break-all; }
pre.notices { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; line-height: 1.6; margin: 0; }

footer.site { border-top: 1px solid var(--line); padding: 20px 0 40px; color: var(--ink-2); font-size: 14px; }
footer.site a { color: var(--ink-2); }
footer.site .links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
