/* ============================================================
 * 苹果原相机 · 子域名站点共享样式
 * 零依赖、自动明暗（跟随系统）、移动端自适应
 * ============================================================ */

:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --fg: #1f2328;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --chip: #f3f4f6;
  --chip-hover: #e8eaee;
  --primary: #3b82f6;
  --shadow: 0 6px 18px rgba(17, 24, 39, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --card: #1f2937;
    --border: #374151;
    --chip: #374151;
    --chip-hover: #4b5563;
    --shadow: 0 6px 18px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0 auto;
  max-width: 780px;
  padding: 20px 18px 56px;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  transition: background-color .25s ease, color .25s ease;
}

a { color: var(--primary); }
a.plain { color: var(--fg); text-decoration: none; }

/* ---------- 页头 ---------- */
.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 14px 18px;
  margin-bottom: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.brand { font-weight: 800; font-size: 17px; }
.brand a { text-decoration: none; color: var(--fg); }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.site-nav a {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
}
.site-nav a:hover { background: var(--chip); }

/* ---------- 头部横幅（header-banner.js 配置） ---------- */
.header-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 26px;
}
@media (max-width: 640px) {
  .header-banner { grid-template-columns: repeat(2, 1fr); }
}
.header-banner a {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.header-banner a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.header-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.header-banner .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 8px;
  font-size: 12px;
  color: #ffffff;
  text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}

/* ---------- 面包屑 ---------- */
.breadcrumbs { font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- 首页 hero ---------- */
.hero { text-align: center; padding: 18px 0 10px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(26px, 5.5vw, 38px); line-height: 1.3; }
.tagline { margin: 0 auto 18px; max-width: 34em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips span {
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--chip);
  border: 1px solid var(--border);
  color: var(--fg);
}

/* ---------- 版块 ---------- */
section { margin: 38px 0; }
h2 {
  font-size: 21px;
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
  line-height: 1.4;
}
h3 { font-size: 17px; margin: 22px 0 8px; }
p { margin: 0 0 12px; }

/* ---------- 卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--fg);
  transition: transform .15s ease, box-shadow .15s ease, background-color .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card b { display: block; margin-bottom: 4px; font-size: 15px; }
.card small { color: var(--muted); }
.card .more { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--primary); }

/* ---------- 文章 ---------- */
.article h1 { margin: 0 0 10px; font-size: clamp(24px, 5vw, 32px); line-height: 1.35; }
.article .meta { font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 12px; }
.article li { margin-bottom: 8px; }
.article li b { color: var(--fg); }
.article .tip {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin: 16px 0;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- 关键词行 / 页脚 ---------- */
.kw { text-align: center; font-size: 12px; color: var(--muted); margin-top: 40px; }
.kw span { margin: 0 6px; }
.kw span + span::before { content: "·"; margin-right: 12px; opacity: .6; }

.site-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--primary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
