:root {
  --brand: #ff4d6d;
  --brand-2: #8338ec;
  --brand-3: #06d6a0;
  --accent: #ffd166;
  --accent-2: #118ab2;
  --bg: #f7f7fb;
  --bg-soft: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #1c1b22;
  --text-soft: #4a4956;
  --text-mute: #7b7a8a;
  --line: rgba(28, 27, 34, 0.1);
  --shadow-sm: 0 4px 16px rgba(28, 27, 34, 0.08);
  --shadow-md: 0 12px 32px rgba(28, 27, 34, 0.12);
  --shadow-lg: 0 24px 64px rgba(28, 27, 34, 0.18);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --grad-hero: linear-gradient(135deg, #ff4d6d 0%, #8338ec 55%, #118ab2 100%);
  --grad-brand: linear-gradient(120deg, #ff4d6d, #8338ec);
  --grad-soft: linear-gradient(135deg, rgba(255, 77, 109, 0.12), rgba(131, 56, 236, 0.12));
  --blur: saturate(180%) blur(18px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0d14;
    --bg-soft: #17161f;
    --bg-elev: rgba(30, 29, 40, 0.66);
    --text: #f2f1f7;
    --text-soft: #c3c1d0;
    --text-mute: #8e8c9e;
    --line: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    --grad-soft: linear-gradient(135deg, rgba(255, 77, 109, 0.18), rgba(131, 56, 236, 0.18));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 8% -10%, rgba(255, 77, 109, 0.14), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(131, 56, 236, 0.14), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(6, 214, 160, 0.1), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 1rem + 1.8vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 0.95rem + 0.9vw, 1.5rem); }
h4 { font-size: clamp(1.02rem, 0.92rem + 0.5vw, 1.2rem); }

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

strong {
  color: var(--text);
  font-weight: 700;
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.4em;
}

li::marker {
  color: var(--brand);
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2rem 0;
}

::selection {
  background: rgba(255, 77, 109, 0.28);
  color: var(--text);
}

/* ============ 顶部导航 ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elev);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav > a[aria-label] {
  font-weight: 900;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

header nav > a[aria-label]:hover {
  text-decoration: none;
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.1);
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  flex: 1;
  justify-content: flex-end;
}

header nav ul li {
  margin: 0;
}

header nav ul a {
  display: inline-block;
  padding: 0.42rem 0.72rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav ul a:hover {
  color: #fff;
  background: var(--grad-brand);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ============ 主内容容器 ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

main > section {
  margin-bottom: 2.25rem;
  padding: clamp(1.25rem, 1rem + 1.6vw, 2.4rem);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  animation: rise-in 0.85s var(--ease) forwards;
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

main > section > * {
  position: relative;
  z-index: 1;
}

main > section:nth-of-type(1) { animation-delay: 0.02s; }
main > section:nth-of-type(2) { animation-delay: 0.06s; }
main > section:nth-of-type(3) { animation-delay: 0.1s; }
main > section:nth-of-type(4) { animation-delay: 0.14s; }
main > section:nth-of-type(5) { animation-delay: 0.18s; }
main > section:nth-of-type(6) { animation-delay: 0.22s; }
main > section:nth-of-type(7) { animation-delay: 0.26s; }
main > section:nth-of-type(8) { animation-delay: 0.3s; }
main > section:nth-of-type(9) { animation-delay: 0.34s; }
main > section:nth-of-type(10) { animation-delay: 0.38s; }
main > section:nth-of-type(11) { animation-delay: 0.42s; }
main > section:nth-of-type(12) { animation-delay: 0.46s; }
main > section:nth-of-type(13) { animation-delay: 0.5s; }
main > section:nth-of-type(14) { animation-delay: 0.54s; }
main > section:nth-of-type(15) { animation-delay: 0.58s; }
main > section:nth-of-type(16) { animation-delay: 0.62s; }
main > section:nth-of-type(17) { animation-delay: 0.66s; }
main > section:nth-of-type(18) { animation-delay: 0.7s; }
main > section:nth-of-type(19) { animation-delay: 0.74s; }
main > section:nth-of-type(20) { animation-delay: 0.78s; }
main > section:nth-of-type(21) { animation-delay: 0.82s; }
main > section:nth-of-type(22) { animation-delay: 0.86s; }

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(255, 77, 109, 0); }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============ Hero 区 ============ */
#hero {
  background: var(--grad-hero);
  color: #fff;
  text-align: center;
  padding: clamp(2rem, 1.4rem + 3vw, 4rem) clamp(1.25rem, 1rem + 2vw, 3rem);
  border: none;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(255, 209, 102, 0.35), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(6, 214, 160, 0.3), transparent 45%);
  opacity: 0.9;
  z-index: 0;
  animation: float-slow 9s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.12));
  pointer-events: none;
  z-index: 0;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
  margin-bottom: 0.9rem;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.08rem);
}

#hero strong {
  color: #ffe9a8;
  background: rgba(0, 0, 0, 0.16);
  padding: 0.05em 0.35em;
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

#hero figure {
  margin: 1.6rem auto 1.4rem;
  max-width: 960px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

#hero figure svg {
  width: 100%;
  display: block;
}

#hero figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

#hero > p:last-of-type {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  font-size: 0;
}

#hero > p:last-of-type a {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.62rem 1.3rem;
  border-radius: var(--radius-pill);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#hero > p:last-of-type a:hover {
  text-decoration: none;
  background: #fff;
  color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

#hero > p:last-of-type a:first-child {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
  animation: pulse-glow 3s ease-in-out infinite;
}

#hero > p:last-of-type a:first-child:hover {
  background: var(--accent);
  color: #3a1a00;
}

/* ============ 页面导航（锚点） ============ */
main > nav[aria-label="页面锚点导航"] {
  margin-bottom: 2.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-elev);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="页面锚点导航"] h2 {
  font-size: 1rem;
  margin-bottom: 0.7rem;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main > nav[aria-label="页面锚点导航"] ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

main > nav[aria-label="页面锚点导航"] li {
  margin: 0;
}

main > nav[aria-label="页面锚点导航"] a {
  display: inline-block;
  padding: 0.34rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease);
}

main > nav[aria-label="页面锚点导航"] a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============ 通用区块标题装饰 ============ */
main > section > h2 {
  position: relative;
  padding-bottom: 0.55rem;
  margin-bottom: 1.1rem;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  transition: width 0.5s var(--ease);
}

main > section:hover > h2::after {
  width: 120px;
}

main > section > h3 {
  margin-top: 1.6rem;
  color: var(--text);
  position: relative;
  padding-left: 0.85rem;
}

main > section > h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
}

main > section > h4 {
  margin-top: 1.2rem;
  color: var(--brand-2);
}

/* ============ 卡片化列表 ============ */
#history ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

#history ul li,
#sitemap ul li,
#links ul li {
  margin: 0;
  padding: 0.7rem 0.95rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  color: var(--text-soft);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease), background 0.28s var(--ease);
}

#history ul li:hover,
#sitemap ul li:hover,
#links ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 77, 109, 0.4);
  background: var(--bg-soft);
}

#sitemap ul a,
#links ul a {
  display: block;
  color: var(--text-soft);
  font-weight: 600;
}

#sitemap ul a:hover,
#links ul a:hover {
  color: var(--brand);
  text-decoration: none;
}

/* ============ 文章卡片 ============ */
#articles article {
  position: relative;
  margin: 0 0 1.1rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), border-color 0.32s var(--ease);
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(131, 56, 236, 0.35);
}

#articles article:hover::before {
  opacity: 1;
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.1rem;
  padding-left: 0;
  color: var(--text);
}

#articles article h3::before {
  display: none;
}

#articles article > p:first-of-type {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-mute);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.7rem;
  margin-bottom: 0.6rem;
}

#articles article p {
  font-size: 0.94rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--grad-soft);
  border: 1px solid rgba(255, 77, 109, 0.28);
  transition: all 0.28s var(--ease);
}

#articles article a::after {
  content: "→";
  transition: transform 0.28s var(--ease);
}

#articles article a:hover {
  text-decoration: none;
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

#articles article a:hover::after {
  transform: translateX(4px);
}

/* ============ FAQ 卡片 ============ */
#faq h3 {
  margin-top: 1.1rem;
  padding: 0.95rem 1.1rem 0.95rem 2.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text);
  font-size: 1rem;
  position: relative;
  cursor: default;
  transition: background 0.28s var(--ease), border-color 0.28s var(--ease);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

#faq h3:hover {
  background: var(--bg-soft);
  border-color: rgba(255, 77, 109, 0.35);
}

#faq h3 + p {
  margin: -1px 0 0;
  padding: 0.95rem 1.1rem 1.05rem 2.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.94rem;
  position: relative;
  transition: box-shadow 0.28s var(--ease);
}

#faq h3 + p::before {
  content: "A";
  position: absolute;
  left: 0.85rem;
  top: 1.05rem;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--brand-2);
  background: var(--grad-soft);
  border: 1px solid rgba(131, 56, 236, 0.3);
  border-radius: 8px;
}

#faq h3 + p:hover {
  box-shadow: var(--shadow-sm);
}

/* ============ HowTo 步骤 ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 0.95rem 1.1rem 0.95rem 3.4rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.95rem;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(6, 214, 160, 0.45);
}

/* ============ 联系我们信息块 ============ */
#contact p {
  font-size: 0.95rem;
}

#contact h3 + p {
  padding: 0.55rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease);
}

#contact h3 + p:hover {
  border-color: rgba(255, 77, 109, 0.4);
  transform: translateX(3px);
}

/* ============ 页脚 ============ */
footer {
  position: relative;
  margin-top: 2rem;
  padding: 2.5rem 1.25rem 2rem;
  background: linear-gradient(180deg, rgba(28, 27, 34, 0.96), rgba(14, 13, 20, 0.99));
  color: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: -50% -10% auto -10%;
  height: 200%;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 77, 109, 0.28), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(131, 56, 236, 0.28), transparent 45%);
  pointer-events: none;
  opacity: 0.7;
}

footer > * {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

footer p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

footer p:first-of-type {
  font-weight: 700;
  color: #fff;
  font-size: 0.98rem;
  margin-bottom: 0.8rem;
}

footer nav ul {
  list-style: none;
  margin: 1.2rem auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

footer nav ul li {
  margin: 0;
}

footer nav ul a {
  display: inline-block;
  padding: 0.36rem 0.85rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: all 0.28s var(--ease);
}

footer nav ul a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 77, 109, 0.35);
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  header nav {
    padding: 0.6rem 1rem;
  }

  header nav ul a {
    padding: 0.38rem 0.6rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1.2rem 1rem 2.5rem;
  }
}

@media (max-width: 820px) {
  header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  header nav ul {
    justify-content: flex-start;
    width: 100%;
    gap: 0.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav ul a {
    white-space: nowrap;
  }

  html {
    scroll-padding-top: 132px;
  }

  main > section {
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
  }

  #hero figure {
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  main {
    padding: 1rem 0.75rem 2rem;
  }

  main > section {
    padding: 1.1rem 1rem;
    margin-bottom: 1.2rem;
  }

  #hero {
    padding: 1.8rem 1rem;
  }

  #hero > p:last-of-type {
    flex-direction: column;
    align-items: stretch;
  }

  #hero > p:last-of-type a {
    text-align: center;
  }

  #faq h3,
  #faq h3 + p {
    padding-left: 2.4rem;
  }

  #faq h3::before,
  #faq h3 + p::before {
    left: 0.7rem;
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

  #howto ol li {
    padding: 0.85rem 0.9rem 0.85rem 3rem;
  }

  #howto ol li::before {
    left: 0.7rem;
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }

  #history ul,
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }

  main > section > h2::after {
    width: 48px;
  }

  footer {
    padding: 2rem 1rem 1.6rem;
  }
}

@media (max-width: 380px) {
  header nav > a[aria-label] {
    font-size: 1.05rem;
  }

  main > section {
    padding: 1rem 0.85rem;
  }
}

/* ============ 无障碍与动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  main > section {
    opacity: 1;
    transform: none;
  }
}

/* ============ 打印 ============ */
@media print {
  header,
  footer,
  main > nav[aria-label="页面锚点导航"] {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    opacity: 1;
    transform: none;
    animation: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}