:root {
  --brand: #ff6b35;
  --brand-2: #ff9a3c;
  --brand-dark: #e05520;
  --accent: #2d6cdf;
  --accent-2: #22a06b;
  --bg: #f7f8fc;
  --bg-soft: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-glass-strong: rgba(255, 255, 255, 0.82);
  --text: #1d2129;
  --text-soft: #4e5969;
  --text-mute: #86909c;
  --border: rgba(29, 33, 41, 0.08);
  --border-strong: rgba(29, 33, 41, 0.14);
  --shadow-sm: 0 2px 8px rgba(29, 33, 41, 0.06);
  --shadow-md: 0 8px 28px rgba(29, 33, 41, 0.09);
  --shadow-lg: 0 18px 48px rgba(29, 33, 41, 0.14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad-brand: linear-gradient(135deg, #ff6b35 0%, #ff9a3c 55%, #ffb347 100%);
  --grad-hero: linear-gradient(135deg, rgba(255, 107, 53, 0.92) 0%, rgba(255, 154, 60, 0.88) 45%, rgba(45, 108, 223, 0.82) 100%);
  --grad-mesh: radial-gradient(circle at 15% 20%, rgba(255, 107, 53, 0.28), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(45, 108, 223, 0.24), transparent 42%),
    radial-gradient(circle at 70% 85%, rgba(34, 160, 107, 0.22), transparent 45%);
}

html[data-theme="dark"] {
  --bg: #0f1218;
  --bg-soft: #171b23;
  --bg-glass: rgba(23, 27, 35, 0.6);
  --bg-glass-strong: rgba(23, 27, 35, 0.85);
  --text: #e8ebf1;
  --text-soft: #b4bcc9;
  --text-mute: #7d8797;
  --border: rgba(232, 235, 241, 0.09);
  --border-strong: rgba(232, 235, 241, 0.16);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --grad-hero: linear-gradient(135deg, rgba(224, 85, 32, 0.9) 0%, rgba(255, 154, 60, 0.72) 45%, rgba(45, 108, 223, 0.68) 100%);
  --grad-mesh: radial-gradient(circle at 15% 20%, rgba(255, 107, 53, 0.2), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(45, 108, 223, 0.2), transparent 42%),
    radial-gradient(circle at 70% 85%, rgba(34, 160, 107, 0.16), transparent 45%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--grad-mesh);
  background-attachment: fixed;
  background-repeat: no-repeat;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

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

html[data-theme="dark"] a {
  color: var(--brand-2);
}

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

:focus-visible {
  outline: 3px solid rgba(255, 107, 53, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

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

h1 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: clamp(1.08rem, 1.8vw, 1.3rem); }

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

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

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

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

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

time { color: var(--text-mute); font-size: 0.88em; }

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.4s var(--ease), box-shadow 0.3s var(--ease);
}

.header-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.logo:hover {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.35));
  text-decoration: none;
}

.logo svg text[fill="#222"] {
  fill: var(--text);
}

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

#site-header nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

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

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

#site-header nav ul a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-header nav ul a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

#site-header nav ul a:hover,
#site-header nav ul a:focus-visible {
  color: var(--brand-dark);
  background: rgba(255, 107, 53, 0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

#site-header nav ul a:hover::after { transform: scaleX(1); }

#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

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

#site-header input[type="search"] {
  width: 190px;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-glass);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: width 0.35s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

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

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

#site-header form[role="search"] button,
#theme-toggle,
#menu-toggle {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#site-header form[role="search"] button:hover,
#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 107, 53, 0.42);
  filter: brightness(1.05);
}

#site-header form[role="search"] button:active,
#theme-toggle:active,
#menu-toggle:active { transform: translateY(0) scale(0.97); }

#theme-toggle {
  background: var(--bg-glass);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

#theme-toggle:hover { box-shadow: var(--shadow-md); }

#menu-toggle { display: none; }

/* ---------- Main layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 20px;
  padding: 10px 16px;
  font-size: 0.84rem;
  color: var(--text-mute);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="面包屑导航"] ol li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

main > nav[aria-label="面包屑导航"] ol li + li::before {
  content: "/";
  color: var(--text-mute);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] ol a { color: var(--text-soft); }
main > nav[aria-label="面包屑导航"] ol a:hover { color: var(--brand-dark); text-decoration: none; }

/* ---------- Sections ---------- */
main > section {
  position: relative;
  margin-bottom: 28px;
  padding: 32px clamp(18px, 3.4vw, 40px);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
  animation: rise-in 0.7s var(--ease) both;
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

main > section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 1em;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--grad-brand);
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.45);
}

main > section h3 {
  margin-top: 1.4em;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}

main > section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18);
}

/* ---------- Banner ---------- */
#banner {
  overflow: hidden;
  background: var(--grad-hero);
  border: none;
  color: #fff;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 52px);
  box-shadow: 0 24px 60px rgba(255, 107, 53, 0.28);
  isolation: isolate;
}

#banner::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35), transparent 38%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.22), transparent 40%);
  animation: float-slow 16s ease-in-out infinite alternate;
}

#banner h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  margin-bottom: 0.5em;
}

#banner > p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 78ch;
  font-size: clamp(0.94rem, 1.4vw, 1.06rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.14);
}

#banner > p strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  padding: 0 6px;
  border-radius: 6px;
}

/* Carousel */
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 18px;
  margin: 28px 0;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
}

.slide {
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.slide:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
}

.slide svg {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease);
}

.slide:hover svg { transform: scale(1.04); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.stats > div {
  padding: 18px 14px;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.stats > div:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.26);
}

.stats span {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.stats p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Cards: article / news ---------- */
#news article,
#article article {
  position: relative;
  padding: 20px 22px;
  margin: 0 0 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

#news article::before,
#article article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

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

#news article:hover::before,
#article article:hover::before { transform: scaleY(1); }

#news article h3,
#article article h3 {
  margin-top: 0;
  padding-left: 0;
}

#news article h3::before,
#article article h3::before { display: none; }

#article article h3 a {
  color: var(--text);
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease), color 0.3s var(--ease);
}

#article article h3 a:hover {
  color: var(--brand-dark);
  background-size: 100% 2px;
  text-decoration: none;
}

#article article p a {
  display: inline-block;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.1);
  color: var(--brand-dark);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

#article article p a:hover {
  background: rgba(255, 107, 53, 0.2);
  transform: translateX(3px);
  text-decoration: none;
}

/* ---------- FAQ ---------- */
#faq details {
  margin: 0 0 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

#faq details:hover {
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: rgba(255, 107, 53, 0.42);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.14);
}

#faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#faq summary::-webkit-details-marker { display: none; }

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 24px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
  box-shadow: 0 3px 10px rgba(255, 107, 53, 0.35);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover { color: var(--brand-dark); background: rgba(255, 107, 53, 0.05); }

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-soft);
  animation: fade-slide 0.4s var(--ease) both;
}

/* ---------- Contact ---------- */
#contact address {
  font-style: normal;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 20px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  margin-bottom: 1.2em;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact address:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

#contact address p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

#contact address a { font-weight: 600; }

/* ---------- Sitemap / links ---------- */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

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

#sitemap a,
#links a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

/* ---------- HowTo / lists ---------- */
#howto ol,
#howto ul,
#notice ul,
#intro ul {
  padding-left: 1.3em;
}

#howto ol li::marker {
  color: var(--brand);
  font-weight: 700;
}

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

/* ---------- Footer ---------- */
footer {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--border);
  padding: 40px 20px 28px;
}

footer section {
  max-width: var(--maxw);
  margin: 0 auto 22px;
  padding: 20px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

footer section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

footer h2 {
  font-size: 1rem;
  margin-bottom: 0.5em;
  padding-left: 14px;
  position: relative;
}

footer h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 4px;
  background: var(--grad-brand);
}

footer p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-mute);
  line-height: 1.7;
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}

footer > p a {
  display: inline-block;
  padding: 8px 22px;
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.32);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

footer > p a:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(255, 107, 53, 0.45);
  text-decoration: none;
}

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 107, 53, 0.42);
  opacity: 0.92;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.35s var(--ease);
}

#back-to-top:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 36px rgba(255, 107, 53, 0.55);
  opacity: 1;
}

#back-to-top:active { transform: translateY(-1px) scale(0.97); }

/* ---------- Animations ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-slide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float-slow {
  from { transform: translate3d(-2%, -2%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 107, 53, 0); }
}

/* Scroll-driven reveal */
@supports (animation-timeline: view()) {
  main > section,
  footer section {
    animation: rise-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .header-inner { gap: 12px; }
  #site-header nav ul a { padding: 8px 9px; font-size: 0.86rem; }
  #site-header input[type="search"] { width: 150px; }
  #site-header input[type="search"]:focus { width: 180px; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }

  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  #site-header { height: auto; }

  #site-header nav {
    order: 4;
    flex: 1 1 100%;
    display: none;
  }

  #site-header nav ul {
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 4px;
  }

  #site-header nav ul a {
    padding: 6px 10px;
    font-size: 0.84rem;
    background: rgba(255, 107, 53, 0.06);
  }

  #site-header.menu-open nav { display: block; animation: fade-slide 0.3s var(--ease) both; }

  #menu-toggle { display: inline-block; margin-left: auto; }

  #site-header form[role="search"] { order: 3; flex: 1 1 100%; }
  #site-header input[type="search"],
  #site-header input[type="search"]:focus { width: 100%; }

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

  main { padding: 18px 14px 48px; }
  main > section { padding: 24px 18px; border-radius: var(--radius); }
  main > section:hover { transform: none; }
}

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

  .carousel { grid-auto-columns: 86%; }

  #banner { padding: 24px 18px; border-radius: var(--radius); }
  #banner > p { font-size: 0.92rem; }

  .stats { gap: 10px; }
  .stats > div { padding: 14px 10px; }

  main > nav[aria-label="面包屑导航"] ol {
    border-radius: var(--radius);
    width: 100%;
  }

  #news article,
  #article article { padding: 16px 16px; }

  #faq summary { padding: 14px 48px 14px 16px; font-size: 0.94rem; }
  #faq details p { padding: 0 16px 16px; }

  #contact address { grid-template-columns: 1fr; padding: 16px; }

  #sitemap ul,
  #links ul { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  #sitemap a,
  #links a { padding: 9px 12px; font-size: 0.84rem; }

  footer { padding: 28px 14px 22px; }
  footer section { padding: 16px 18px; }

  #back-to-top { right: 14px; bottom: 16px; width: 44px; height: 44px; }
}

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

/* ---------- Accessibility & motion ---------- */
@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;
    scroll-behavior: auto !important;
  }
}

@media print {
  #site-header,
  #back-to-top,
  .carousel,
  footer > p { display: none !important; }
  body { background: #fff; color: #000; }
  main > section { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}