:root {
  --bg: #fbf6f0;
  --card: #ffffff;
  --text: #2b2b2b;
  --muted: #7a6f66;
  --accent: #c8642f;
  --line: #eadfd3;
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1916;
    --card: #26231f;
    --text: #f2ede7;
    --muted: #a99e93;
    --accent: #f0955a;
    --line: #3a352f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 内容不足一屏时页脚贴底 */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
footer.site { margin-top: auto; }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
header.site .brand { font-weight: 600; color: var(--text); }
.lang-select {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--line);
  background-color: var(--card);
  /* 自绘箭头，和右边框留出距离 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a6f66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: var(--text);
  border-radius: 999px;
  padding: 5px 36px 5px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
/* 阿拉伯语从右到左：箭头放到左边 */
html[dir="rtl"] .lang-select { background-position: left 14px center; padding: 5px 14px 5px 36px; }

.hero { text-align: center; padding: 48px 0 24px; }
.hero img.icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 12px 30px rgba(120, 60, 20, 0.25);
}
.hero h1 { font-size: 34px; margin: 20px 0 4px; line-height: 1.3; }
.hero p.tagline { color: var(--muted); font-size: 19px; margin: 0 0 24px; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
}
.button:hover { text-decoration: none; opacity: 0.9; }
.button.disabled { opacity: 0.55; pointer-events: none; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 32px 0;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 28px 24px;
  margin: 16px 0 32px;
}

article h1 { font-size: 28px; line-height: 1.3; margin: 24px 0 4px; }
article .meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
article h3 + p + .meta { margin-top: 32px; }
article h2 { font-size: 20px; margin: 28px 0 8px; }
article h3 { font-size: 17px; margin: 22px 0 6px; }
article ul { padding-inline-start: 1.3em; }
article li { margin: 4px 0; }

.links { text-align: center; margin: 8px 0 32px; }
.links a { margin: 0 10px; }

.apps { margin: 24px 0 40px; }
.app-row {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
}
.app-row:hover { text-decoration: none; border-color: var(--accent); }
.app-row img { width: 72px; height: 72px; border-radius: 16px; }
.app-row h3 { margin: 0; font-size: 18px; }
.app-row p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 20px 0 32px;
}

/* 语言切换：只显示当前语言；没有 JS 时显示默认的简体中文 */
html[data-ui="zh-Hans"] [data-lang]:not([data-lang="zh-Hans"]),
html[data-ui="zh-Hant"] [data-lang]:not([data-lang="zh-Hant"]),
html[data-ui="en"] [data-lang]:not([data-lang="en"]),
html[data-ui="ja"] [data-lang]:not([data-lang="ja"]),
html[data-ui="ko"] [data-lang]:not([data-lang="ko"]),
html[data-ui="fr"] [data-lang]:not([data-lang="fr"]),
html[data-ui="es"] [data-lang]:not([data-lang="es"]),
html[data-ui="es-MX"] [data-lang]:not([data-lang="es-MX"]),
html[data-ui="de"] [data-lang]:not([data-lang="de"]),
html[data-ui="pt-BR"] [data-lang]:not([data-lang="pt-BR"]),
html[data-ui="it"] [data-lang]:not([data-lang="it"]),
html[data-ui="ru"] [data-lang]:not([data-lang="ru"]),
html[data-ui="ar"] [data-lang]:not([data-lang="ar"]),
html[data-ui="th"] [data-lang]:not([data-lang="th"]),
html[data-ui="nl"] [data-lang]:not([data-lang="nl"]) { display: none !important; }

html[lang="zh-Hant"] body { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif; }
html[lang="ja"] body { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; }
html[lang="ko"] body { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }

footer.site { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer.site a { color: inherit; }
