/* BOJI CLUB 官网与协议站 · Apple 风格极简设计
   黑白灰为主色，品牌雾霾蓝 #414D63（浅）/ #B8CCE6（深）做唯一点缀 */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elev: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --muted: #86868b;
  --line: #d2d2d7;
  --line-soft: rgba(0, 0, 0, 0.065);
  --accent: #414d63;          /* 品牌雾霾蓝 · 浅色可读前景（mistAccent） */
  --accent-strong: #2e3849;
  --accent-soft: #e3e7f0;     /* brandMist */
  --mark: #414d63;
  --mark-2: #87a3c9;
  --chip-bg: #f5f5f7;
  --shadow: none;
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 980px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei",
    "Segoe UI", "Noto Sans", "Noto Sans Thai", "Leelawadee UI", "Malgun Gothic",
    "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #161617;
  --bg-elev: #1d1d1f;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --muted: #86868b;
  --line: #424245;
  --line-soft: rgba(255, 255, 255, 0.1);
  --accent: #b8cce6;          /* 品牌雾霾蓝 · 深色 */
  --accent-strong: #d7e2f2;
  --accent-soft: #232a35;
  --mark: #b8cce6;
  --mark-2: #87a3c9;
  --chip-bg: #1d1d1f;
  --shadow: none;
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #000000;
    --bg-alt: #161617;
    --bg-elev: #1d1d1f;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --muted: #86868b;
    --line: #424245;
    --line-soft: rgba(255, 255, 255, 0.1);
    --accent: #b8cce6;
    --accent-strong: #d7e2f2;
    --accent-soft: #232a35;
    --mark: #b8cce6;
    --mark-2: #87a3c9;
    --chip-bg: #1d1d1f;
    --shadow: none;
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
  transition: background .25s ease, color .25s ease;
}

.wrap { max-width: calc(var(--maxw) + 48px); margin: 0 auto; padding: 0 22px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--bg-elev); padding: 8px 14px; border-radius: 8px; z-index: 99; }

/* ---------- brand marks: show the right variant per theme ---------- */
.mark-light { display: inline-block; }
.mark-dark { display: none; }
[data-theme="dark"] .mark-dark { display: inline-block; }
[data-theme="dark"] .mark-light { display: none; }
[data-theme="auto"] .mark-dark { display: none; }
[data-theme="auto"] .mark-light { display: inline-block; }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .mark-dark { display: inline-block; }
  [data-theme="auto"] .mark-light { display: none; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand-mark { vertical-align: middle; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }

.topnav { display: none; gap: 2px; margin-left: 8px; }
@media (min-width: 900px) { .topnav { display: flex; align-items: center; } }
.topnav-link {
  color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 400;
  padding: 6px 14px; border-radius: 999px; transition: color .15s ease;
}
.topnav-link:hover { color: var(--text); }
.topnav-link.current { color: var(--text); font-weight: 600; }

.lang-select-wrap { position: relative; display: inline-flex; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2);
  background: transparent; border: 0;
  padding: 7px 24px 7px 10px; cursor: pointer; border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.lang-select:hover { color: var(--text); background: var(--bg-alt); }
.lang-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-select-wrap::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px; border: 0;
  background: transparent; color: var(--text-2); cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.theme-btn:hover { color: var(--text); background: var(--bg-alt); }
.theme-btn .t-ico { display: none; width: 17px; height: 17px; }
[data-theme="light"] .t-light { display: block; }
[data-theme="dark"] .t-dark { display: block; }
[data-theme="auto"] .t-auto { display: block; }

.doc-icon svg, .doc-hero-icon svg { display: block; color: var(--accent); }
.doc-icon svg { width: 20px; height: 20px; }
.doc-hero-icon svg { width: 26px; height: 26px; }
.print-link { display: inline-flex; align-items: center; gap: 7px; }
.print-link svg { width: 15px; height: 15px; }

@media (max-width: 480px) {
  .lang-select { font-size: 12.5px; max-width: 112px; }
  .brand-name { font-size: 15px; }
  .header-inner { height: 54px; }
}

/* ---------- announcement bar ---------- */
.announce-bar {
  display: flex; align-items: center; justify-content: center; position: relative;
  background: var(--bg-alt); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 44px 12px 18px; margin: 20px 0 0; font-size: 14px; font-weight: 500;
}
.announce-bar button {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); font-size: 17px; line-height: 1;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.announce-bar button:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 84px 0 0; }
.hero-logo img { vertical-align: middle; }
.hero h1 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
  margin: 26px 0 10px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.hero-sub { color: var(--text-2); font-size: 18px; margin: 0 auto; max-width: 600px; }
@media (max-width: 480px) { .hero { padding-top: 56px; } .hero h1 { font-size: 26px; } }

/* landing hero */
.hero-landing { padding-top: 72px; }
.hero-badge {
  display: block; font-size: 14px; font-weight: 600; letter-spacing: 0;
  color: var(--accent); background: none; border: 0;
  margin: 0 0 10px;
}
.hero-landing h1 { font-size: 40px; max-width: 780px; margin: 0 auto 14px; }
@media (min-width: 760px) { .hero-landing h1 { font-size: 52px; } }
.hero-landing .hero-sub { max-width: 580px; margin: 0 auto 30px; font-size: 19px; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center; height: 44px; padding: 0 22px;
  border-radius: 999px; border: 0; background: none;
  color: var(--accent); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: color .15s ease;
}
.btn-ghost::after { content: "›"; margin-left: 6px; font-size: 17px; }
.btn-ghost:hover { color: var(--accent-strong); text-decoration: underline; }
.download-note { color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* ---------- App Store badge ---------- */
.as-badge-link { display: inline-block; text-decoration: none; color: #1d1d1f; }
.as-badge { width: 132px; height: 40px; display: block; --as-logo: #f5f5f7; transition: opacity .15s ease; }
[data-theme="dark"] .as-badge-link, [data-theme="auto"] .as-badge-link { color: #f5f5f7; }
[data-theme="dark"] .as-badge, [data-theme="auto"] .as-badge { --as-logo: #1d1d1f; }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .as-badge-link { color: #f5f5f7; }
  [data-theme="auto"] .as-badge { --as-logo: #1d1d1f; }
}
@media (prefers-color-scheme: dark) { [data-theme="auto"] .as-badge-link { color: #f5f5f7; } }
.as-badge-link:hover .as-badge { opacity: .8; }

/* ---------- landing sections ---------- */
.home-section { padding-top: 90px; }
.home-section:last-of-type { padding-bottom: 20px; }
.section-title {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); margin: 0 0 8px; text-align: center;
}
@media (min-width: 760px) { .section-title { font-size: 36px; } }
.section-sub { text-align: center; color: var(--text-2); font-size: 17px; margin: 0 0 40px; }

.feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature-card {
  background: var(--bg-alt); border: 0; border-radius: var(--radius);
  padding: 30px 30px 28px; display: flex; flex-direction: column; gap: 8px;
}
.feature-title { font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.feature-desc { color: var(--text-2); font-size: 15px; line-height: 1.65; }

/* ---------- screenshots strip ---------- */
.shots-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 240px);
  gap: 22px; overflow-x: auto; padding: 6px 4px 22px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; justify-content: safe center;
}
@media (max-width: 860px) { .shots-strip { justify-content: safe start; } }
.shot { margin: 0; scroll-snap-align: center; text-align: center; }
.shot img {
  width: 100%; height: auto; border-radius: 30px;
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-lg); background: var(--bg-elev);
}
.shot figcaption { font-size: 12.5px; color: var(--muted); margin-top: 14px; font-weight: 500; }

/* ---------- CTA ---------- */
.cta-band { text-align: center; padding: 110px 0 30px; }
.cta-title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; }
@media (min-width: 760px) { .cta-title { font-size: 40px; } }
.cta-sub { color: var(--text-2); font-size: 17px; margin: 0 0 28px; }
.legal-hint { color: var(--muted); font-size: 12px; margin-top: 26px; }
.legal-hint a { color: var(--text-2); }

/* ---------- legal center cards ---------- */
.doc-list { padding-bottom: 24px; }
.doc-cards { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 44px 0 40px; }
@media (min-width: 720px) { .doc-cards { grid-template-columns: 1fr 1fr; } }
.doc-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-alt); border: 0; border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: var(--text);
  transition: transform .18s ease;
}
.doc-card:hover { transform: scale(1.015); }
.doc-card:active { transform: scale(1); }
.doc-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
}
.doc-card-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-card-title { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.doc-card-desc {
  color: var(--text-2); font-size: 13px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.doc-card-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.doc-arrow { margin-left: auto; color: var(--muted); font-size: 20px; flex-shrink: 0; }

/* ---------- doc layout ---------- */
.doc-layout { display: block; padding: 30px 0 40px; }
@media (min-width: 1024px) {
  .doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
  .doc-aside { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
}
.doc-aside { display: none; }
@media (min-width: 1024px) { .doc-aside { display: block; } }

.toc-nav { font-size: 13px; }
.toc-title {
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); margin: 6px 0 10px;
}
.toc-title-other { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.toc-nav a {
  display: block; color: var(--text-2); text-decoration: none; padding: 5px 12px;
  border-left: 1.5px solid var(--line); border-radius: 0 6px 6px 0; line-height: 1.5;
  transition: color .12s ease, border-color .12s ease;
}
.toc-nav a.toc-l3 { padding-left: 26px; font-size: 12.5px; }
.toc-nav a:hover { color: var(--text); }
.toc-nav a.current { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-other { font-weight: 400; }

.back-link { display: inline-block; color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 400; margin: 26px 0 4px; }
.back-link:hover { text-decoration: underline; }
.back-link::before { content: "‹ "; }

.print-link { color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.print-link:hover { color: var(--text); }
.doc-foot-actions { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-soft); text-align: center; }

/* ---------- article ---------- */
.doc-article { padding: 6px 0 40px; }
.doc-head { margin-bottom: 8px; }
.doc-hero-icon { display: inline-flex; margin-bottom: 18px; }
h1.doc-title {
  font-size: 32px; font-weight: 700; line-height: 1.18; letter-spacing: -0.02em;
  margin: 0 0 14px;
}
@media (min-width: 720px) { h1.doc-title { font-size: 40px; } }
.doc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 500; color: var(--text-2);
  background: none; border: 0; padding: 0;
}
.chip + .chip::before { content: "·"; margin-right: 8px; color: var(--muted); }
.doc-body { margin-top: 26px; }

/* article typography — Apple 阅读排版 */
.doc-body h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3;
  margin: 52px 0 16px; padding-top: 28px; border-top: 1px solid var(--line-soft);
  scroll-margin-top: 78px;
}
.doc-body h2:first-child { margin-top: 12px; padding-top: 0; border-top: 0; }
.doc-body h3 { font-size: 18px; font-weight: 600; margin: 32px 0 10px; scroll-margin-top: 78px; }
.doc-body h4 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.doc-body p { margin: 12px 0; color: var(--text); font-size: 16px; line-height: 1.75; }
.doc-body strong { font-weight: 600; }
.doc-body ul, .doc-body ol { margin: 12px 0 18px; padding-left: 24px; }
.doc-body li { margin: 8px 0; font-size: 16px; line-height: 1.7; }
.doc-body li::marker { color: var(--muted); font-weight: 500; }
.doc-body a { color: var(--accent); text-decoration: none; }
.doc-body a:hover { text-decoration: underline; }
.doc-body code {
  font-family: var(--mono); font-size: .85em; background: var(--bg-alt);
  border-radius: 6px; padding: 2px 6px;
}
.doc-body pre { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; }
.doc-body blockquote {
  margin: 18px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent);
  color: var(--text-2);
}
.doc-body hr { border: 0; border-top: 1px solid var(--line-soft); margin: 34px 0; }

.table-wrap { overflow-x: auto; margin: 20px 0 26px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; min-width: 460px; }
.doc-body th {
  text-align: left; font-weight: 600; font-size: 13px;
  background: var(--bg-alt); color: var(--text-2);
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap;
}
.doc-body td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.doc-body tbody tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq-article .doc-body h3 {
  font-size: 16.5px; font-weight: 600;
  padding: 0; margin: 40px 0 0;
}
.faq-article .doc-body h3::before { content: "Q　"; color: var(--accent); font-weight: 600; }
.faq-article .doc-body h3 + p { margin-top: 8px; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 90px 0; }
.nf h1 { font-size: 28px; margin-bottom: 10px; }
.nf p { color: var(--text-2); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft); margin-top: 60px; padding: 40px 0 56px;
  background: var(--bg);
}
.footer-inner { text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 15px; font-weight: 600; }
.footer-note { color: var(--muted); font-size: 13px; margin: 14px auto 8px; max-width: 560px; }
.footer-links { font-size: 13px; margin: 6px 0; line-height: 2.1; }
.footer-links a { color: var(--text-2); text-decoration: none; margin: 0 4px; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-meta { color: var(--muted); font-size: 12.5px; line-height: 1.9; margin-top: 16px; }

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .doc-aside, .back-link, .doc-foot-actions, .theme-btn, .lang-select-wrap { display: none !important; }
  body { background: #fff; color: #111; font-size: 12.5pt; }
  .doc-article { padding: 0; }
  .table-wrap { overflow: visible; }
  .doc-body table { min-width: 0; }
  a { color: #111 !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
