:root {
  --brand: #FF6B35;
  --brand-2: #FF9F1C;
  --brand-3: #FF3D71;
  --accent: #6C5CE7;
  --accent-2: #00C2A8;
  --bg: #FFF8F3;
  --bg-2: #FFF1E8;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --border: rgba(255, 107, 53, 0.16);
  --text: #2B1E16;
  --text-soft: #6B5A4E;
  --text-mute: #9A8B80;
  --shadow-sm: 0 4px 14px rgba(255, 107, 53, 0.10);
  --shadow-md: 0 12px 34px rgba(255, 107, 53, 0.14);
  --shadow-lg: 0 24px 60px rgba(120, 60, 20, 0.18);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --blur: 18px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 8% -8%, rgba(255, 107, 53, 0.18), transparent 60%),
    radial-gradient(1000px 520px at 100% 0%, rgba(108, 92, 231, 0.14), transparent 62%),
    radial-gradient(900px 700px at 50% 110%, rgba(0, 194, 168, 0.12), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--brand-3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(255, 107, 53, 0.5);
  outline-offset: 3px;
  border-radius: 8px;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  margin: 0 0 0.6em;
  letter-spacing: 0.2px;
  font-weight: 800;
  color: var(--text);
}

h1 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 2.8vw, 2rem); }
h3 { font-size: clamp(1.08rem, 1.8vw, 1.3rem); }

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

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

li { margin-bottom: 0.4em; }

blockquote {
  margin: 0 0 1.2em;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
}

blockquote p {
  margin: 0;
  color: var(--text);
  font-style: italic;
}

time {
  color: var(--text-mute);
  font-size: 0.85rem;
}

/* ============ 通用容器 ============ */
main > section {
  width: min(100% - 2.5rem, var(--maxw));
  margin: 0 auto 2.5rem;
  padding: 2.2rem clamp(1.1rem, 3vw, 2.6rem);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    border-color 0.4s var(--ease);
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent-2));
  opacity: 0.85;
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 53, 0.3);
}

/* ============ 顶部导航 ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.4rem;
  padding: 0.7rem clamp(1rem, 3vw, 2.2rem);
  background: rgba(255, 248, 243, 0.78);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 26px rgba(255, 107, 53, 0.09);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.4);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.brand a:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(255, 107, 53, 0.55);
}

.brand-name {
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--brand), var(--brand-3) 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

#site-header nav {
  flex: 1 1 auto;
  min-width: 0;
}

#site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#site-header nav li { margin: 0; }

#site-header nav a {
  display: inline-block;
  padding: 0.42rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color 0.28s var(--ease), background 0.28s var(--ease),
    transform 0.28s var(--ease);
}

#site-header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  transform: translateX(-50%);
  transition: width 0.32s var(--ease);
}

#site-header nav a:hover {
  color: var(--brand);
  background: rgba(255, 107, 53, 0.09);
  transform: translateY(-2px);
}

#site-header nav a:hover::after { width: 55%; }

/* 搜索表单 */
#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  flex-shrink: 0;
}

#site-header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#site-header input[type="search"] {
  width: clamp(140px, 22vw, 230px);
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), width 0.4s var(--ease);
}

#site-header input[type="search"]::placeholder { color: var(--text-mute); }

#site-header input[type="search"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.16);
  width: clamp(160px, 26vw, 280px);
}

#site-header button[type="submit"] {
  padding: 0.5rem 1.05rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 61, 113, 0.3);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
    filter 0.28s var(--ease);
}

#site-header button[type="submit"]:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 26px rgba(255, 61, 113, 0.42);
  filter: brightness(1.05);
}

#site-header button[type="submit"]:active { transform: translateY(0) scale(0.98); }

/* ============ Hero ============ */
#hero {
  margin-top: 1.6rem;
  padding: clamp(1.8rem, 4vw, 3.4rem) clamp(1.2rem, 4vw, 3rem);
  background:
    radial-gradient(700px 380px at 85% -10%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(125deg, #FF6B35 0%, #FF8A3D 28%, #FF3D71 62%, #6C5CE7 100%);
  background-size: 200% 200%;
  border: none;
  border-radius: var(--radius-xl);
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: heroShift 16s ease infinite;
}

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

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.18) 0 2px, transparent 3px);
  background-size: 120px 120px, 160px 160px;
  opacity: 0.7;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  bottom: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
  pointer-events: none;
}

#hero h1 {
  position: relative;
  color: #fff;
  text-shadow: 0 4px 24px rgba(120, 30, 0, 0.28);
  max-width: 20ch;
}

#hero > p {
  position: relative;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.95rem, 1.6vw, 1.06rem);
  line-height: 1.85;
}

/* Hero 轮播卡片 */
.hero-carousel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.8rem 0 1.6rem;
}

.hero-carousel article {
  padding: 1.25rem 1.3rem;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(90, 20, 0, 0.18);
  transition: transform 0.5s var(--ease), background 0.4s var(--ease),
    border-color 0.4s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-carousel article:hover {
  transform: translateY(-8px) scale(1.015);
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 44px rgba(90, 20, 0, 0.26);
}

.hero-carousel h2 {
  color: #fff;
  font-size: 1.12rem;
  margin-bottom: 0.35em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-carousel h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFE3A3;
  box-shadow: 0 0 0 4px rgba(255, 227, 163, 0.28);
  flex-shrink: 0;
}

.hero-carousel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Hero 数据 */
.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-stats li {
  margin: 0;
  padding: 0.85rem 0.9rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

.hero-stats li:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

/* ============ 新闻/文章卡片 ============ */
#news article,
#articles article {
  position: relative;
  padding: 1.15rem 1.3rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease),
    border-color 0.35s var(--ease);
}

#news article:last-child,
#articles article:last-child { margin-bottom: 0; }

#news article::after,
#articles article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  height: 72%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 107, 53, 0.34);
  box-shadow: var(--shadow-md);
}

#news article:hover::after,
#articles article:hover::after {
  opacity: 1;
  transform: scaleY(1);
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.35em;
  font-size: 1.06rem;
}

#news article h3 a,
#articles article h3 a { color: inherit; }

#news article p,
#articles article p {
  margin-bottom: 0.5em;
  font-size: 0.92rem;
}

#articles article p:last-child { margin-bottom: 0; }

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.1);
  transition: background 0.3s var(--ease), gap 0.3s var(--ease),
    transform 0.3s var(--ease);
}

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

#articles article a:hover {
  background: rgba(255, 107, 53, 0.18);
  transform: translateX(2px);
}

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

/* ============ FAQ ============ */
#faq article {
  margin-bottom: 0.85rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

#faq article:last-child { margin-bottom: 0; }

#faq article:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 107, 53, 0.32);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

#faq article h3 {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1.02rem;
  margin-bottom: 0.5em;
  color: var(--text);
}

#faq article h3::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 61, 113, 0.3);
}

#faq article p {
  margin: 0;
  font-size: 0.92rem;
  padding-left: 1.75rem;
}

/* ============ HowTo 步骤 ============ */
#howto ol {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  margin-bottom: 0.7rem;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
  border-radius: 50%;
  box-shadow: 0 5px 14px rgba(255, 61, 113, 0.32);
}

#howto ol li:hover {
  transform: translateX(5px);
  border-color: rgba(255, 107, 53, 0.34);
  box-shadow: var(--shadow-sm);
}

/* ============ 联系 / 站点地图 / 友链 ============ */
#contact h3,
#sitemap h2,
#links h2 {
  position: relative;
  padding-bottom: 0.5rem;
}

#contact h3::after,
#sitemap h2::after,
#links h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

#contact p {
  font-size: 0.94rem;
  margin-bottom: 0.55em;
  word-break: break-word;
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

#sitemap li,
#links li { margin: 0; }

#sitemap a,
#links a {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  transition: color 0.3s var(--ease), background 0.3s var(--ease),
    border-color 0.3s var(--ease), transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: var(--brand);
  background: #fff;
  border-color: rgba(255, 107, 53, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* ============ Footer ============ */
footer {
  margin-top: 1rem;
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1.1rem, 4vw, 2.6rem) 1.6rem;
  background:
    radial-gradient(600px 300px at 12% 0%, rgba(255, 107, 53, 0.16), transparent 60%),
    radial-gradient(600px 300px at 88% 100%, rgba(108, 92, 231, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(255, 248, 243, 0.9), rgba(255, 241, 232, 0.98));
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border-top: 1px solid var(--border);
}

footer section {
  width: min(100%, var(--maxw));
  margin: 0 auto;
}

footer h2 {
  font-size: 1.15rem;
  margin-bottom: 0.8em;
}

footer p {
  font-size: 0.86rem;
  color: var(--text-mute);
  margin-bottom: 0.6em;
  line-height: 1.8;
}

footer > a[href="#site-header"] {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.2rem auto 0;
  padding: 0.55rem 1.2rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(255, 61, 113, 0.32);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

footer > a[href="#site-header"]::before {
  content: "↑";
  font-weight: 900;
}

footer > a[href="#site-header"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 61, 113, 0.44);
  color: #fff;
}

/* ============ 滚动进入动画 ============ */
main > section,
#news article,
#articles article,
#faq article,
.hero-carousel article,
.hero-stats li,
#howto ol li {
  animation: riseIn 0.75s var(--ease) both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main > section,
    #news article,
    #articles article,
    #faq article,
    .hero-carousel article,
    .hero-stats li,
    #howto ol li {
      animation: revealUp 1ms linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 32%;
    }

    @keyframes revealUp {
      from {
        opacity: 0;
        transform: translateY(34px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }
  }
}

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

  #site-header nav a {
    padding: 0.38rem 0.55rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 860px) {
  #site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
  }

  .brand { justify-content: center; }

  #site-header nav ul {
    justify-content: center;
    gap: 0.1rem;
  }

  #site-header nav a {
    font-size: 0.82rem;
    padding: 0.35rem 0.55rem;
  }

  #site-header form[role="search"] {
    justify-content: center;
  }

  #site-header input[type="search"] {
    flex: 1 1 auto;
    width: auto;
    max-width: 320px;
  }

  #site-header input[type="search"]:focus {
    width: auto;
    max-width: 320px;
  }

  main > section {
    width: min(100% - 1.6rem, var(--maxw));
    padding: 1.6rem 1.15rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.6rem;
  }

  #hero {
    border-radius: var(--radius-lg);
    margin-top: 1rem;
  }

  #hero h1 { max-width: none; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }

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

  #site-header nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 0.3rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  #site-header nav a { white-space: nowrap; }

  .hero-carousel {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  #news article,
  #articles article,
  #faq article {
    padding: 0.95rem 1rem;
  }

  #faq article h3,
  #faq article p { padding-left: 0; }

  #faq article h3 { padding-left: 1.6rem; }

  #howto ol li {
    padding: 0.8rem 0.9rem 0.8rem 2.9rem;
  }

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

@media (max-width: 380px) {
  .hero-stats { grid-template-columns: 1fr; }
  #sitemap ul, #links ul { grid-template-columns: 1fr; }
}

/* ============ 暗色模式 ============ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110E;
    --bg-2: #1D1512;
    --surface: rgba(38, 28, 24, 0.66);
    --surface-solid: #241A16;
    --border: rgba(255, 140, 90, 0.2);
    --text: #F6EDE7;
    --text-soft: #C9B8AC;
    --text-mute: #94827A;
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 14px 38px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 26px 64px rgba(0, 0, 0, 0.6);
  }

  body {
    background:
      radial-gradient(1200px 600px at 8% -8%, rgba(255, 107, 53, 0.16), transparent 60%),
      radial-gradient(1000px 520px at 100% 0%, rgba(108, 92, 231, 0.16), transparent 62%),
      radial-gradient(900px 700px at 50% 110%, rgba(0, 194, 168, 0.1), transparent 65%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  }

  #site-header {
    background: rgba(23, 17, 14, 0.82);
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5);
  }

  #site-header input[type="search"] {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
  }

  #site-header input[type="search"]:focus {
    background: rgba(255, 255, 255, 0.12);
  }

  #news article,
  #articles article,
  #faq article,
  #howto ol li,
  #sitemap a,
  #links a {
    background: rgba(255, 255, 255, 0.055);
  }

  #faq article:hover {
    background: rgba(255, 255, 255, 0.09);
  }

  #sitemap a:hover,
  #links a:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  blockquote {
    background: rgba(255, 255, 255, 0.06);
  }

  footer {
    background:
      radial-gradient(600px 300px at 12% 0%, rgba(255, 107, 53, 0.18), transparent 60%),
      radial-gradient(600px 300px at 88% 100%, rgba(108, 92, 231, 0.18), transparent 60%),
      linear-gradient(180deg, rgba(26, 19, 16, 0.94), rgba(20, 14, 12, 0.98));
  }

  #hero {
    background:
      radial-gradient(700px 380px at 85% -10%, rgba(255, 255, 255, 0.16), transparent 60%),
      linear-gradient(125deg, #E85A28 0%, #E8742D 28%, #E0355F 62%, #5A4BD1 100%);
    background-size: 200% 200%;
  }
}

/* ============ 无障碍与打印 ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body { background: #fff; color: #000; }
  #site-header, footer > a[href="#site-header"], #site-header form { display: none; }
  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    break-inside: avoid;
  }
  a { color: #000; text-decoration: underline; }
}