:root {
  --bg: #f8f6f3;
  --bg-panel: #ffffff;
  --bg-panel2: #f3eee9;
  --border: #e7e2dc;
  --border-strong: #d9d1c8;
  --accent: #2b2420;
  --accent-dark: #120f0d;
  --text: #1f1b18;
  --text-muted: #6b635c;
  --text-faint: #b2a9a1;
  --on-accent: #ffffff;
  --success: #3f8f6a;
  --success-soft: rgba(63, 143, 106, 0.14);
  --warn: #b7791f;
  --error: #c2453b;
  --chrome: #f6f3ef;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --halo: rgba(226, 212, 200, 0.62);
  --halo-side: rgba(236, 216, 208, 0.42);
  --code-hl: #f7f3ef;
  --rb-1: #9cc7f0;
  --rb-2: #c9b6ec;
  --rb-3: #f4b8c4;
  --rb-4: #f6d59a;
  --rb-5: #b9e3c6;
  --field-veil: rgba(255, 255, 255, 0.34);
  --dot-a: #e4bcb3;
  --dot-b: #ead8b1;
  --dot-c: #bed6c3;
  --pill-ink: rgba(43, 36, 32, 0.82);
  --pill-ink-far: rgba(43, 36, 32, 0.72);
  --pill-ring: rgba(255, 255, 255, 0.10);
  --veil: rgba(43, 36, 32, 0.24);
  --clear: transparent;
  --shadow-float: 0 40px 120px rgba(43, 36, 32, 0.10), 0 2px 8px rgba(43, 36, 32, 0.04);
  --shadow-btn: 0 10px 24px rgba(43, 36, 32, 0.18), 0 1px 2px rgba(43, 36, 32, 0.20);
  --shadow-near: 0 22px 44px rgba(43, 36, 32, 0.26), 0 3px 8px rgba(43, 36, 32, 0.16);
  --shadow-mid: 0 14px 30px rgba(43, 36, 32, 0.20), 0 2px 5px rgba(43, 36, 32, 0.12);
  --shadow-far: 0 8px 18px rgba(43, 36, 32, 0.14);
  --shadow-soft: 0 1px 2px rgba(43, 36, 32, 0.04);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --weight-body: 400;
  --weight-medium: 500;
  --weight-strong: 600;
  --r-panel: 36px;
  --r-window: 28px;
  --r-window-mobile: 22px;
  --r-field: 20px;
  --r-mark: 10px;
  --r-shot: 10px;
  --r-pill: 999px;
  --r-circle: 50%;
  --tracking-display: -0.02em;
  --tracking-brand: -0.01em;
  --tracking-ui: 0.01em;
  --tracking-label: 0.02em;
  --tracking-code: 0.03em;
  --gutter: 32px;
  --content-width: 1120px;
  --reading-width: 760px;
  --header-width: 1280px;
  --section-gap: 160px;
  --header-height: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --duration-ui: .2s;
  --duration-reveal: .7s;
  --focus-ring: 0 0 0 3px var(--bg-panel), 0 0 0 5px var(--accent);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--clear); }
button { border: 0; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
svg { flex-shrink: 0; }
figure { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-body);
  letter-spacing: var(--tracking-display);
  line-height: 1.25;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.15; }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: clamp(23px, 2.2vw, 30px); }
h4 { font-size: 22px; }
p { margin: 0 0 1.25em; }
strong { font-weight: var(--weight-strong); }
small { font-size: 13px; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; font-size: .88em; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-field);
  background: var(--bg-panel2);
  color: var(--text);
  line-height: 1.8;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--border); color: var(--text); }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.section { padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.section + .section { padding-top: 0; }
.section-heading { margin: 0 0 24px; }
.section-intro { max-width: 680px; color: var(--text-muted); margin-bottom: 40px; }
.surface-band {
  overflow-x: clip;
  background: linear-gradient(180deg, var(--bg), var(--bg-panel2), var(--bg));
  color: var(--text);
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid > *, .wrap > *, .panel > *, .card > *, .masthead > * { min-width: 0; }
.panel, .card {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
}
.panel { padding: clamp(24px, 4vw, 56px); box-shadow: var(--shadow-float); }
.card { padding: 32px; box-shadow: var(--shadow-soft); }
.card h3 { margin: 0 0 16px; }
.card p:last-child { margin-bottom: 0; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.keep { white-space: nowrap; }
h1 .keep, h2 .keep, h3 .keep, h4 .keep { white-space: normal; overflow-wrap: anywhere; }
.center { text-align: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.prose { min-width: 0; }
.prose h2 { margin-top: 80px; margin-bottom: 24px; }
.prose h3 { margin-top: 40px; margin-bottom: 18px; }
.prose a:not(.btn):not(.app-store) { text-decoration: underline; text-underline-offset: .22em; }
.prose li { margin-bottom: .65em; }
.prose :first-child { margin-top: 0; }
.prose img { max-width: 100%; }
.actions, .get-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 15px;
  line-height: 1.6;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-ui);
  text-align: center;
  transition: background-color var(--duration-ui) var(--ease), transform var(--duration-ui) var(--ease), box-shadow var(--duration-ui) var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-accent); transform: translateY(-1px); }
.btn-ghost { background: var(--glass); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.btn-ghost:hover { background: var(--bg-panel); color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.is-focus { box-shadow: var(--focus-ring); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--border);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
#site-header { position: relative; z-index: 80; }
.masthead {
  position: relative;
  z-index: 82;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  min-height: var(--header-height);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { position: relative; width: 34px; height: 34px; flex: none; isolation: isolate; }
.brand-mark::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: var(--r-circle);
  background:
    radial-gradient(60% 60% at 25% 30%, var(--rb-1), var(--clear) 72%),
    radial-gradient(60% 60% at 78% 28%, var(--rb-2), var(--clear) 72%),
    radial-gradient(60% 60% at 75% 78%, var(--rb-3), var(--clear) 72%),
    radial-gradient(60% 60% at 25% 80%, var(--rb-4), var(--clear) 72%);
  filter: blur(8px);
  opacity: .55;
  z-index: -1;
}
.brand-mark img {
  width: 34px;
  height: 34px;
  border-radius: var(--r-circle);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-soft);
}
.brand-placeholder {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: var(--r-mark);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-soft);
}
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: var(--weight-body); letter-spacing: var(--tracking-brand); }
.primary-nav { min-width: 0; }
.primary-nav ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; }
.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  white-space: nowrap;
  color: var(--text-muted);
  transition: color var(--duration-ui) var(--ease), background-color var(--duration-ui) var(--ease);
}
.primary-nav a:hover { background: var(--glass); color: var(--text); }
.primary-nav a[aria-current="page"] { background: var(--glass-strong); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.nav-ico { width: 16px; height: 16px; flex: none; }
.header-tools { justify-self: end; display: flex; align-items: center; gap: 10px; flex-shrink: 0; position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--glass);
  color: var(--text);
  font-size: 13.5px;
  white-space: nowrap;
}
.lang .nav-ico, .lang-caret { color: var(--text-muted); }
.lang-caret { font-size: 11px; }
.lang-short { display: none; }
.language-list {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 180px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-field);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-mid);
}
.language-list a { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 8px 14px; border-radius: var(--r-mark); }
.language-list a:hover, .language-list [aria-current="true"] { background: var(--bg-panel2); color: var(--text); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-circle);
  background: var(--bg-panel);
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-drawer {
  position: absolute;
  top: 100%;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 84;
  max-height: calc(100dvh - var(--header-height) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-field);
  box-shadow: var(--shadow-float);
}
.mobile-drawer ul { margin: 0; padding: 0; list-style: none; }
.mobile-drawer a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-mark); }
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel2); color: var(--text); }
.drawer-label { padding: 20px 16px 8px; margin: 0; font-size: 13px; color: var(--text-muted); }
.nav-veil { position: fixed; inset: 0; z-index: 81; background: var(--veil); color: var(--text); border: 0; cursor: default; }
.site-footer {
  margin-top: var(--section-gap);
  padding-top: 72px;
  padding-bottom: 100px;
  background: var(--bg-panel);
  color: var(--text);
  border-radius: var(--r-panel) var(--r-panel) 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr 1fr; gap: 48px; }
.footer-grid > * { min-width: 0; }
.footer-brand .brand { margin-bottom: 24px; }
.footer-brand .brand-mark::before { display: none; }
.footer-brand p { max-width: 320px; color: var(--text-muted); font-size: 14px; }
.footer-title { font-family: var(--font-display); font-size: 21px; margin: 0 0 18px; }
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list a { display: inline-block; padding-block: 5px; color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.footer-list a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { margin-top: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; color: var(--text-muted); font-size: 12px; }
.footer-bottom p { margin: 0; }
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
.reveal-ready .reveal { transition: opacity var(--duration-reveal) var(--ease), transform var(--duration-reveal) var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
@media (max-width: 1100px) {
  .masthead { display: flex; justify-content: space-between; }
  .masthead > .primary-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .brand { min-width: 0; }
}
@media (min-width: 1101px) {
  .mobile-drawer { display: none !important; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
}
@media (max-width: 768px) {
  h1, .hero h1 { font-size: clamp(24px, 4vw, 30px); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 24px; }
  .panel { padding: 24px; }
  .brand-name { font-size: 15px; }
  .brand { gap: 8px; }
  .header-tools { gap: 7px; margin-left: auto; }
  .lang { min-height: 44px; padding-inline: 10px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang > .nav-ico { display: none; }
  .tilt, [data-tilt] { transform: none !important; }
  .footer-grid { gap: 32px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { margin-top: 40px; padding-right: 56px; }
  pre { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}