:root {
  --bg: #F5F4F3;
  --panel: #FFFFFF;
  --panel-2: #ECEAE8;
  --panel-3: #F8F7F6;
  --line: #DEDCDA;
  --line-strong: #C7C4C1;
  --accent: #FF2D55;
  --accent-dark: #CF1440;
  --peach: #FF9A76;
  --peach-soft: #FFDDCF;
  --rose-soft: #F8D0DA;
  --peach-line: rgba(255,154,118,.42);
  --ink: #17161A;
  --ink-2: #2C2A32;
  --muted: #5E5C63;
  --ok: #16935A;
  --ok-ring: rgba(22,147,90,.18);
  --warn: #B86E00;
  --err: #D42A2A;
  --on-ink: #FFFFFF;
  --on-ink-muted: rgba(255,255,255,.66);
  --ink-line: rgba(255,255,255,.14);
  --ink-chip: rgba(255,255,255,.07);
  --ink-hi: rgba(255,255,255,.16);
  --ink-gloss: rgba(255,255,255,.10);
  --ink-drop: rgba(23,22,26,.34);
  --grid-line: rgba(23,22,26,.04);
  --grid-line-warm: rgba(255,255,255,.62);
  --wash: rgba(255,45,85,.05);
  --wash-0: rgba(255,45,85,0);
  --kw: rgba(255,45,85,.14);
  --glow: rgba(255,45,85,.10);
  --glow-strong: rgba(255,45,85,.22);
  --soft: rgba(23,22,26,.05);
  --hilite: rgba(255,255,255,.96);
  --hilite-soft: rgba(255,255,255,.34);
  --focus: rgba(255,45,85,.32);
  --fill-a: #8C8992;
  --clear: transparent;
  --mask-on: #000000;
  --flag-red: #E2263B;
  --flag-white: #FFFFFF;
  --flag-navy: #22337A;
  --flag-blue: #1F3E9A;
  --flag-red-fr: #E1251B;
  --flag-black: #151417;
  --flag-gold: #F2C230;
  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-mono-cjk: 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', ui-monospace, monospace;
  --font-hand: 'Kaiti SC', 'STKaiti', 'KaiTi', 'Segoe Print', 'Bradley Hand', cursive;
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --pill: 999px;
  --circle: 50%;
  --wrap: 1280px;
  --reading: 860px;
  --gutter: 24px;
  --header-height: 60px;
  --anchor-offset: 84px;
  --toc-offset: 132px;
  --body-size: 17px;
  --display-size: 68px;
  --weight-display: 900;
  --weight-strong: 700;
  --weight-button: 800;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --lift: inset 0 1px 0 var(--hilite), 0 1px 2px var(--soft), 0 10px 22px -12px var(--glow), 0 30px 60px -20px var(--glow);
  --button-face: linear-gradient(115deg,var(--peach) -40%,var(--accent) 36%,var(--accent-dark) 140%);
  --button-shadow: inset 0 1px 0 var(--hilite-soft), 0 10px 20px -10px var(--glow-strong);
  --ease: cubic-bezier(.2,.65,.3,1);
}
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--anchor-offset);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid-line) 1px,var(--clear) 1px),linear-gradient(90deg,var(--grid-line) 1px,var(--clear) 1px);
  background-size: 56px 56px;
  background-position: center top;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html.nav-open { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: var(--focus); }
button { cursor: pointer; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { margin: 0 0 var(--space-3); font-size: clamp(52px,5vw,68px); line-height: 1.12; letter-spacing: -.02em; }
h2 { margin: 0 0 var(--space-2); font-size: clamp(28px,3vw,40px); line-height: 1.2; letter-spacing: -.02em; }
h3 { margin: 0 0 var(--space-1); font-size: 24px; line-height: 1.3; }
p { margin: 0 0 var(--space-2); }
strong { font-weight: var(--weight-strong); }
code { font-family: var(--font-mono-cjk); font-size: .88em; overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  overflow-x: auto;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-2);
  font-family: var(--font-mono-cjk);
}
pre code { white-space: pre; overflow-wrap: normal; }
table { border-collapse: collapse; }
th, td { word-break: keep-all; }
hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--space-4); }
.no-break { white-space: nowrap; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 40;
  padding: 8px 14px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;
  text-decoration: none;
}
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.reading-wrap { width: 100%; max-width: calc(var(--reading) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.grid { display: grid; gap: var(--space-3); }
.grid > *, .wrap > *, .reading-wrap > * { min-width: 0; }
.grid-three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-five { grid-template-columns: repeat(5,minmax(0,1fr)); }
.stack { display: grid; gap: var(--space-3); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono-cjk); font-variant-numeric: tabular-nums; }
.panel { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--lift); }
.section-head { margin-bottom: var(--space-4); }
.section-head p { max-width: 760px; color: var(--muted); }
.prose { overflow-wrap: anywhere; }
.prose h2 { margin-top: var(--space-6); }
.prose h3 { margin-top: var(--space-4); }
.prose p, .prose li { line-height: 1.85; }
.prose li + li { margin-top: var(--space-1); }
.prose img { border-radius: var(--r); }
.screen, .decor-zone { position: relative; overflow-x: clip; max-width: 100%; }
.screen { background-image: linear-gradient(to bottom,var(--wash) 0%,var(--wash-0) 80%); }
.btn, .btn-hot, .btn-primary, .btn-secondary, .btn-line, .btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--weight-button);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.btn-hot, .btn-primary {
  border: 0;
  background-image: var(--button-face);
  color: var(--on-ink);
  box-shadow: var(--button-shadow);
  transition: transform .15s,box-shadow .15s;
}
.btn-hot:hover, .btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--hilite-soft),0 14px 26px -10px var(--glow-strong); }
.btn-hot:active, .btn-primary:active { transform: translateY(0); }
.btn-secondary, .btn-line, .btn-login { background: var(--panel); color: var(--ink); border-color: var(--ink); transition: background-color .15s; }
.btn-secondary:hover, .btn-line:hover, .btn-login:hover { background: var(--panel-2); }
.btn-hot.sm { min-height: 36px; height: 36px; padding: 0 14px 0 16px; font-size: 14px; }
.btn-hot.lg { min-height: 44px; height: 44px; padding: 0 20px 0 24px; font-size: 18px; }
.btn-hot svg, .btn-primary svg, .btn-secondary svg { width: 18px; height: 18px; }
.btn-hot.sm svg { width: 15px; height: 15px; }
.btn-login { min-height: 36px; height: 36px; padding: 0 16px; border-width: 1.5px; font-size: 14px; font-weight: var(--weight-strong); }
.btn-line { min-height: 30px; height: 30px; padding: 0 14px; font-size: 13.5px; font-weight: var(--weight-strong); }
.btn-line svg { width: 14px; height: 14px; }
button:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.topbar {
  width: min(var(--wrap),calc(100% - 48px));
  margin: 0 auto;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 25;
}
#site-header { position: relative; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); justify-self: start; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-en { font-family: var(--font-display); font-weight: var(--weight-display); font-size: 19px; letter-spacing: -.03em; line-height: 1; }
.brand-zh { font-size: 13px; font-weight: 500; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); white-space: nowrap; }
.desktop-nav { min-width: 0; }
.trail {
  display: flex;
  align-items: center;
  height: 40px;
  margin: 0;
  padding: 0 18px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  box-shadow: inset 0 1px 0 var(--hilite),0 10px 24px -16px var(--glow-strong);
}
.trail li { display: flex; align-items: center; }
.trail li + li::before { content: "·"; color: var(--line-strong); padding: 0 8px; font-weight: var(--weight-strong); }
.trail a { position: relative; display: inline-flex; align-items: center; min-height: 28px; padding: 4px 0; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.trail a:hover { color: var(--ink); }
.trail a[aria-current="page"] { color: var(--ink); font-weight: var(--weight-strong); }
.trail a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: var(--r-xs); background: var(--accent); }
.acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.language-box { position: relative; }
.lang { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; width: auto; height: 36px; padding: 0 8px; border: 0; border-radius: var(--pill); background: var(--clear); font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.lang svg { width: 16px; height: 16px; }
.lang .chev { width: 12px; height: 12px; }
.language-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 192px; margin: 0; padding: 8px; list-style: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--lift); z-index: 32; }
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--ink); text-decoration: none; border-radius: var(--r-xs); }
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--panel-2); }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink); }
.menu-toggle svg { display: block; width: 22px; height: 22px; }
.mobile-drawer { display: none; }
.nav-veil { position: fixed; inset: var(--header-height) 0 0; background: var(--soft); z-index: 20; border: 0; width: 100%; }
.footer { margin-top: var(--space-6); border-top: 1px solid var(--line); background: var(--panel); box-shadow: inset 0 1px 0 var(--hilite),0 -24px 64px -48px var(--glow); }
.footer-main { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--space-6); padding-top: var(--space-6); padding-bottom: var(--space-4); }
.footer-main > * { min-width: 0; }
.footer-title { font-size: 14px; font-family: var(--font-mono-cjk); font-weight: var(--weight-strong); margin-bottom: 16px; }
.footer-brand p { margin-top: 16px; max-width: 360px; font-size: 14px; color: var(--muted); }
.footer-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 16px; list-style: none; margin: 0; padding: 0; }
.footer-links a, .footer-languages a, .footer-legal a { display: inline-flex; align-items: center; min-height: 28px; padding-block: 2px; color: var(--muted); font-size: 14px; text-decoration: none; }
.footer-links a:hover, .footer-languages a:hover, .footer-legal a:hover { color: var(--accent-dark); }
.footer-languages { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-block: 16px; border-top: 1px solid var(--line); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.reveal { transition: opacity .5s var(--ease),transform .5s var(--ease); }
.reveal.pending { opacity: 0; transform: translateY(16px); }
.reveal.shown { opacity: 1; transform: none; }
#server-status { position: static; display: flow-root; width: 100%; max-width: 100%; overflow: hidden; margin-block: var(--space-3); min-height: 1px; }
#server-status > * { min-width: 0; max-width: 100%; }
#server-status + * { margin-top: var(--space-3); }
@media (max-width: 1240px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 12px; }
  .trail { justify-content: center; padding-inline: 12px; }
  .trail a { font-size: 12px; }
  .trail li + li::before { padding-inline: 5px; }
  .acts > .btn-hot { display: none; }
}
@media (max-width: 1050px) {
  .topbar { display: flex; }
  .desktop-nav { display: none; }
  .acts { margin-left: auto; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-drawer { position: absolute; top: var(--header-height); left: 0; right: 0; display: block; z-index: 31; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--lift); }
  .mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 14px; color: var(--ink); text-decoration: none; border-radius: var(--r-xs); }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current="page"] { background: var(--panel-2); }
  .drawer-languages { border-top: 1px solid var(--line); padding-top: 8px !important; margin-top: 8px !important; }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(28px,6vw,40px); }
  h2 { font-size: 28px; }
  .grid-three { grid-template-columns: 1fr; }
  .grid-five { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .sec { padding-top: 40px; padding-bottom: 40px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .no-break { white-space: normal; }
  .topbar { width: calc(100% - 32px); gap: 8px; }
  .brand { gap: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-en { font-size: 17px; }
  .acts { gap: 4px; margin-left: auto; }
  .acts .lang { height: 44px; padding: 0 6px; }
  .acts .lang-label { display: none; }
  .btn-login { padding-inline: 12px; }
  .panel { padding: 24px 16px; }
  .tilt, [data-tilt] { transform: none; }
  .decor-zone, .screen { max-width: 100%; overflow-x: clip; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.pending, .reveal.shown { opacity: 1; transform: none; transition: none; }
  .btn-hot, .btn-primary { transition: none; }
  .btn-hot:hover, .btn-primary:hover { transform: none; }
}