:root {
  --bg: #f7f3ec;
  --surface: #fffdf8;
  --ink: #1f3d36;
  --muted: #5f7169;
  --accent: #b25a38;
  --border: rgba(31, 61, 54, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

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

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 22px 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  position: relative;
  flex: none;
}
/* 与 App 图标同一套几何：圆角框=空间，内方块=物品 */
.brand .mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--ink);
  border-radius: 3px;
}

.lang-switch {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button.active {
  background: var(--ink);
  color: #fffdf8;
}

h1 {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}

h2 {
  font-size: 18px;
  margin: 34px 0 10px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 15px;
  margin: 22px 0 6px;
  color: var(--ink);
}

p, li { color: var(--ink); }
ul { padding-left: 20px; }
li { margin: 6px 0; }

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 28px 0 8px;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--ink);
}
.card:hover { text-decoration: none; border-color: var(--accent); }
.card strong { display: block; font-size: 16px; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 14px; }

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

[hidden] { display: none !important; }

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 32px; }
}
