:root {
  --bg: #FFFFFF;
  --bg-clear: rgba(255,255,255,0);
  --bg-panel: #F6F6F9;
  --bg-panel-2: #EEEEF3;
  --border: #E4E4EA;
  --border-strong: #CDCDD7;
  --chrome-dot: #D3D3DC;
  --accent: #4E4BD8;
  --accent-dark: #3A36B8;
  --accent-tint: rgba(78,75,216,0.06);
  --accent-tint-2: rgba(78,75,216,0.10);
  --on-accent: #FFFFFF;
  --text: #0E0E14;
  --text-muted: #5F6070;
  --success: #0E9F96;
  --success-tint: rgba(14,159,150,0.10);
  --success-ink: #08776F;
  --warn: #C98A0B;
  --error: #D6404A;
  --veil: rgba(14,14,20,0.28);
  --shadow-lift: 0 1px 2px rgba(14,14,20,0.06);
  --shadow-fab: 0 1px 2px rgba(14,14,20,0.06), 0 6px 18px rgba(14,14,20,0.06);
  --radius-tag: 4px;
  --radius-ctl: 6px;
  --radius-card: 8px;
  --radius-tray: 12px;
  --radius-pill: 999px;
  --radius-round: 50%;
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --size-body: 16px;
  --size-display: clamp(34px, 3.4vw, 48px);
  --size-section: clamp(26px, 4vw, 42px);
  --size-subhead: clamp(19px, 2vw, 23px);
  --weight-display: 900;
  --tracking-display: -0.02em;
  --shell: 1200px;
  --reading: 800px;
  --masthead-width: 1280px;
  --masthead-h: 72px;
  --gutter: 40px;
  --section-space: clamp(48px, 7vw, 96px);
  --quick: 150ms ease;
  --entrance: 360ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--size-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
main, section, article, aside, .shell, .wrap, .reading, .prose,
:where(.layout-grid, .card-grid, .hero-grid, .feature-tabs, .footer-grid, .form-grid) > * {
  min-width: 0;
}
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
.ico {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button, input, select, textarea { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 {
  display: block;
  margin: 0 0 0.55em;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
h1 { font-size: var(--size-display); line-height: 1.14; }
h2 { font-size: var(--size-section); }
h3 { font-size: var(--size-subhead); }
p { margin: 0 0 1em; }
.keep { display: inline-block; white-space: nowrap; }
.muted { color: var(--text-muted); }
.shell, .wrap, .reading {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell, .wrap { max-width: calc(var(--shell) + var(--gutter) * 2); }
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.section-band { padding-block: var(--section-space); }
.section-intro { max-width: 48rem; color: var(--text-muted); font-size: 1.0625rem; }
.layout-grid, .card-grid { display: grid; gap: 20px; }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.prose { line-height: 1.8; overflow-wrap: break-word; }
.prose h2:not(:first-child) { margin-top: 2em; }
.prose h3:not(:first-child) { margin-top: 1.5em; }
.prose :where(ul, ol) { padding-inline-start: 1.5em; }
[id] { scroll-margin-top: 1rem; }
code {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}
:not(pre) > code {
  padding: 0.1em 0.25em;
  border-radius: var(--radius-tag);
  background: var(--bg-panel);
  color: var(--text);
}
pre {
  min-width: 0;
  max-width: 100%;
  margin: 1em 0;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
  font: 0.875rem/1.65 var(--font-mono);
}
pre code { white-space: pre; }
.decor-region { overflow-x: clip; }
.decor-fill { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.badge-dot, .status-on i, .win-dots i, .dl-fab-ico { flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  max-width: 100%;
  padding: 8px 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-ctl);
  background: var(--bg);
  color: var(--text);
  font: 600 1rem/1.25 var(--font-body);
  text-align: center;
  text-decoration: none;
  transition: background-color var(--quick), border-color var(--quick), color var(--quick);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:is(:hover, .sample-hover) { background: var(--accent-dark); color: var(--on-accent); border-color: var(--accent-dark); }
.btn-primary:is(:active, .sample-active) { background: var(--accent-dark); color: var(--on-accent); border-color: var(--text); }
.btn-ghost:is(:hover, .sample-hover) { color: var(--text); border-color: var(--text); }
.btn-ghost:is(:active, .sample-active) { background: var(--bg-panel-2); color: var(--text); border-color: var(--text); }
.btn.sample-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { background: var(--bg-panel); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }

.masthead {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.masthead-row {
  max-width: min(100%, calc(var(--masthead-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--masthead-h);
  display: flex;
  align-items: center;
}
.preview-masthead .masthead-row { max-width: calc(var(--shell) + var(--gutter) * 2); }
.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.tabnav { min-width: 0; margin-left: clamp(24px, 5vw, 72px); }
.tabnav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: clamp(18px, 2.5vw, 36px);
}
.tabnav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--masthead-h);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--quick);
}
.tabnav a:hover { color: var(--text); }
.tabnav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.tabnav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  border-radius: var(--radius-tag) var(--radius-tag) 0 0;
  background: var(--accent);
}
.mast-tools { display: flex; align-items: center; flex-shrink: 0; gap: 8px; margin-left: auto; }
.lang-box { position: relative; }
.lang, .mast-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-ctl);
  background: var(--bg);
  color: var(--text);
  font: 500 0.875rem/1 var(--font-body);
  white-space: nowrap;
}
.lang { min-height: 38px; }
.lang svg { width: 16px; height: 16px; }
.lang:hover, .mast-toggle:hover { border-color: var(--border-strong); }
.lang-short, .mast-toggle, .mast-drawer, .mast-veil { display: none; }
.lang-list {
  position: absolute;
  inset: calc(100% + 8px) 0 auto auto;
  min-width: 10rem;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
}
.lang-list ul, .mast-drawer ul { list-style: none; margin: 0; padding: 0; }
.lang-list a, .mast-drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-ctl);
  color: var(--text);
  text-decoration: none;
}
:is(.lang-list, .mast-drawer) a:is(:hover, [aria-current="true"], [aria-current="page"]) {
  background: var(--bg-panel);
  color: var(--accent-dark);
}

.site-foot {
  padding-block: 48px max(96px, calc(76px + env(safe-area-inset-bottom)));
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.45fr 0.8fr 1.2fr 0.75fr; gap: 32px; }
.footer-brand p { margin-top: 12px; }
.footer-label { margin: 0 0 12px; font-weight: 800; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li + li { margin-top: 7px; }
.site-foot a:not(.brand) { color: var(--text-muted); text-decoration: none; overflow-wrap: anywhere; }
.site-foot a:hover:not(.brand) { color: var(--accent-dark); text-decoration: underline; }
.footer-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.card, .panel {
  min-width: 0;
  padding: clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  overflow-wrap: break-word;
}
.panel { background: var(--bg-panel); color: var(--text); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.rule-link {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  margin-top: 40px;
  text-align: center;
}
.rule-link::before, .rule-link::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border-strong);
}
.rule-link a { padding-block: 10px; font-weight: 600; text-decoration: none; }
.rule-link a:hover { text-decoration: underline; }

.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(8px); }
.reveal-ready .reveal { transition: opacity var(--entrance), transform var(--entrance); }
.reveal-ready .reveal:focus-within { opacity: 1; transform: none; }

@media (max-width: 1180px) {
  .masthead:not(.preview-masthead) .tabnav { display: none; }
  .mast-tools { margin-left: auto; }
  .mast-toggle { display: inline-flex; min-width: 44px; min-height: 44px; }
  .mast-veil:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--veil);
    color: var(--text);
  }
  .masthead-row { position: relative; background: var(--bg); color: var(--text); }
  .mast-drawer:not([hidden]) {
    display: block;
    position: absolute;
    z-index: 2;
    inset: 100% 0 auto;
    max-height: calc(100vh - var(--masthead-h));
    max-height: calc(100dvh - var(--masthead-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px var(--gutter) 20px;
    border-block: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
  }
  .mast-drawer .footer-label { padding-inline: 12px; margin: 12px 0 4px; }
  .lang-list { z-index: 3; }
}
@media (max-width: 768px) {
  :root { --gutter: 20px; --masthead-h: 60px; --size-display: clamp(24px, 6vw, 30px); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .preview-masthead .masthead-row { flex-wrap: wrap; padding-top: 12px; }
  .preview-masthead .tabnav { order: 3; width: 100%; margin-left: 0; }
  .preview-masthead .tabnav ul { gap: clamp(12px, 4vw, 24px); }
  .preview-masthead .tabnav a { min-height: 48px; }
}
@media (max-width: 640px) {
  .brand { gap: 6px; font-size: 1rem; }
  .masthead:not(.preview-masthead) .lang-full { display: none; }
  .masthead:not(.preview-masthead) .lang-short { display: inline; }
  .masthead:not(.preview-masthead) .lang { min-height: 44px; padding-inline: 9px; gap: 5px; }
  .tilt, [class*="tilt-"], [class*="-tilt"] { transform: none !important; rotate: none !important; }
  .footer-brand { grid-column: 1 / -1; }
  .btn { min-height: 48px; padding-inline: 20px; font-size: 0.9375rem; }
}
@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; }
}