:root {
  --brand: #F5A623;
  --brand-dark: #D98A0F;
  --brand-soft: #FFF3DC;
  --accent: #E8637A;
  --accent-2: #3B4C8C;
  --bg: #FFFDF8;
  --bg-alt: #FFF7EA;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --border: rgba(245, 166, 35, 0.22);
  --text: #2A2320;
  --text-soft: #6B5F55;
  --text-mute: #9A8C80;
  --shadow-sm: 0 2px 8px rgba(120, 80, 20, 0.06);
  --shadow-md: 0 10px 30px rgba(120, 80, 20, 0.10);
  --shadow-lg: 0 20px 50px rgba(120, 80, 20, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 72px;
}

html[data-theme="dark"],
body.dark-mode,
body.dark {
  --brand: #FFB84D;
  --brand-dark: #F5A623;
  --brand-soft: rgba(255, 184, 77, 0.14);
  --accent: #FF7E94;
  --accent-2: #6A7BD4;
  --bg: #14100C;
  --bg-alt: #1B1510;
  --surface: #221A13;
  --surface-glass: rgba(34, 26, 19, 0.72);
  --border: rgba(255, 184, 77, 0.20);
  --text: #F6EEE4;
  --text-soft: #C9BBAC;
  --text-mute: #9A8C80;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --brand: #FFB84D;
    --brand-dark: #F5A623;
    --brand-soft: rgba(255, 184, 77, 0.14);
    --accent: #FF7E94;
    --accent-2: #6A7BD4;
    --bg: #14100C;
    --bg-alt: #1B1510;
    --surface: #221A13;
    --surface-glass: rgba(34, 26, 19, 0.72);
    --border: rgba(255, 184, 77, 0.20);
    --text: #F6EEE4;
    --text-soft: #C9BBAC;
    --text-mute: #9A8C80;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  }
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(232, 99, 122, 0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  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);
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

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

h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(100deg, var(--brand-dark), var(--accent) 60%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 800;
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

h3 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
}

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

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

li {
  margin-bottom: 0.45em;
}

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

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

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

/* ============ HEADER ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background 0.4s var(--ease), box-shadow 0.3s var(--ease);
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-bar a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.15rem;
  transition: transform 0.3s var(--ease);
}

.brand-bar a:hover {
  transform: translateY(-2px) scale(1.02);
}

.brand-bar svg {
  filter: drop-shadow(0 4px 10px rgba(245, 166, 35, 0.45));
  transition: transform 0.5s var(--ease);
}

.brand-bar a:hover svg {
  transform: rotate(-8deg) scale(1.08);
}

.brand-bar p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

header nav[aria-label="主导航"] {
  justify-self: center;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  background: var(--brand-soft);
  color: var(--brand-dark);
  transform: translateY(-1px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

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

header form[role="search"] input[type="search"] {
  width: clamp(120px, 18vw, 220px);
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

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

header form[role="search"] input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.18);
  width: clamp(150px, 22vw, 260px);
}

header form[role="search"] button {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 166, 35, 0.4);
  filter: brightness(1.05);
}

header form[role="search"] button:active {
  transform: translateY(0);
}

/* ============ MAIN ============ */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 40px) 60px;
}

main > section,
main > nav {
  margin-bottom: clamp(28px, 5vw, 56px);
}

/* ============ HERO ============ */
#hero {
  position: relative;
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(245, 166, 35, 0.16), rgba(232, 99, 122, 0.12) 45%, rgba(59, 76, 140, 0.12)),
    var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeUp 0.8s var(--ease) both;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.35), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  animation: floatGlow 9s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(232, 99, 122, 0.22), transparent 65%);
  filter: blur(24px);
  pointer-events: none;
  animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}

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

#hero h1 {
  margin-bottom: 0.5em;
}

#hero > p {
  max-width: 760px;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

#hero > p a {
  display: inline-block;
  margin: 6px 10px 0 0;
  padding: 10px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

#hero > p a:first-of-type {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.38);
}

#hero > p a:last-of-type {
  color: var(--brand-dark);
  background: var(--surface);
  border: 1px solid var(--border);
}

#hero > p a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

#hero > p a:last-of-type:hover {
  background: var(--brand-soft);
}

/* ============ BANNER SLIDER ============ */
.banner-slider {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 18px;
  margin-top: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}

.banner-slider::-webkit-scrollbar {
  height: 6px;
}

.banner-slider::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 999px;
}

.banner-slider figure {
  margin: 0;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.banner-slider figure:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.banner-slider figure svg {
  width: 100%;
  display: block;
}

.banner-slider figcaption {
  padding: 12px 18px;
  font-size: 0.9rem;
  color: var(--text-soft);
  background: var(--surface);
}

.banner-slider button {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  font-size: 0;
  border: none;
  border-radius: 50%;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.banner-slider button::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--brand-dark);
  border-right: 2px solid var(--brand-dark);
}

.banner-slider button:first-of-type {
  left: 8px;
}

.banner-slider button:first-of-type::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.banner-slider button:last-of-type {
  right: 8px;
}

.banner-slider button:last-of-type::before {
  transform: translate(-70%, -50%) rotate(45deg);
}

.banner-slider button:hover {
  background: var(--brand);
  transform: translateY(-50%) scale(1.1);
}

.banner-slider button:hover::before {
  border-color: #fff;
}

/* ============ STATS ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stats > div {
  padding: 20px 16px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stats > div:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.stats strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stats span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-mute);
}

/* ============ BREADCRUMB ============ */
main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-mute);
}

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

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

/* ============ GENERIC SECTION ============ */
main > section {
  padding: clamp(20px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
}

main > section:nth-of-type(3n) {
  background:
    linear-gradient(160deg, rgba(245, 166, 35, 0.06), transparent 60%),
    var(--surface-glass);
}

main > section:nth-of-type(3n + 1) {
  background:
    linear-gradient(200deg, rgba(232, 99, 122, 0.06), transparent 60%),
    var(--surface-glass);
}

main > section:nth-of-type(3n + 2) {
  background:
    linear-gradient(140deg, rgba(59, 76, 140, 0.06), transparent 60%),
    var(--surface-glass);
}

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

/* ============ ARTICLES ============ */
#news article,
#articles article {
  position: relative;
  padding: 20px 22px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

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

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}

#news article h3,
#articles article h3 {
  margin-top: 0;
  margin-bottom: 0.35em;
  transition: color 0.25s var(--ease);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--brand-dark);
}

#news article p,
#articles article p {
  margin-bottom: 0.5em;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-dark);
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}

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

#articles article a:hover {
  gap: 10px;
  color: var(--accent);
}

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

/* ============ FAQ (details/summary) ============ */
#faq details {
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

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

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--brand-dark);
  transition: transform 0.3s var(--ease);
}

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

#faq summary:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.95rem;
  color: var(--text-soft);
  animation: fadeIn 0.4s var(--ease) both;
}

/* ============ HOWTO ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  padding: 10px 0 10px 46px;
  counter-increment: step;
  transition: transform 0.25s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(245, 166, 35, 0.35);
  transition: transform 0.25s var(--ease);
}

#howto ol li:hover {
  transform: translateX(4px);
}

#howto ol li:hover::before {
  transform: scale(1.1);
}

#howto ul li {
  position: relative;
}

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

/* ============ CONTACT ============ */
#contact ul {
  list-style: none;
  padding-left: 0;
}

#contact ul li {
  position: relative;
  padding: 10px 16px 10px 40px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.94rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

#contact ul li::before {
  content: "◆";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--brand);
}

#contact ul li:hover {
  transform: translateX(4px);
  border-color: var(--brand);
}

/* ============ SITEMAP / LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding-left: 0;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(245, 166, 35, 0.35);
}

/* ============ FOOTER ============ */
footer[role="contentinfo"] {
  position: relative;
  margin-top: 20px;
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 40px) 80px;
  background:
    linear-gradient(180deg, transparent, rgba(245, 166, 35, 0.06)),
    var(--bg-alt);
  border-top: 1px solid var(--border);
}

footer[role="contentinfo"] > section {
  max-width: var(--maxw);
  margin: 0 auto 28px;
}

footer[role="contentinfo"] h2 {
  font-size: 1.15rem;
  padding-left: 14px;
}

footer[role="contentinfo"] h2::before {
  width: 4px;
}

footer[role="contentinfo"] h3 {
  font-size: 0.98rem;
  margin-top: 1.1em;
  color: var(--brand-dark);
}

footer[role="contentinfo"] p {
  font-size: 0.9rem;
  color: var(--text-soft);
  max-width: 900px;
}

footer[role="contentinfo"] > p {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
  color: var(--text-mute);
  text-align: center;
}

/* ============ FLOATING BUTTONS ============ */
button[aria-label="返回顶部"],
button[aria-label="切换暗黑模式"] {
  position: fixed;
  right: 20px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 120;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.42);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
  line-height: 1.1;
  text-align: center;
  padding: 0;
}

button[aria-label="返回顶部"] {
  bottom: 84px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

button[aria-label="返回顶部"]:hover,
button[aria-label="切换暗黑模式"]:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 32px rgba(245, 166, 35, 0.5);
  filter: brightness(1.06);
}

button[aria-label="切换暗黑模式"] {
  bottom: 24px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 24px rgba(59, 76, 140, 0.4);
}

button[aria-label="切换暗黑模式"]:hover {
  box-shadow: 0 16px 32px rgba(59, 76, 140, 0.5);
}

body.scrolled button[aria-label="返回顶部"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-30px, 20px, 0) scale(1.12);
  }
}

/* Scroll reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ FOCUS / A11Y ============ */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  header[role="banner"] {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand search"
      "nav nav";
    row-gap: 8px;
  }
  .brand-bar {
    grid-area: brand;
  }
  header nav[aria-label="主导航"] {
    grid-area: nav;
    justify-self: stretch;
  }
  header nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  header nav ul::-webkit-scrollbar {
    display: none;
  }
  header form[role="search"] {
    grid-area: search;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  .brand-bar p {
    display: none;
  }
  header form[role="search"] input[type="search"] {
    width: 120px;
  }
  header form[role="search"] input[type="search"]:focus {
    width: 150px;
  }
  header form[role="search"] button {
    padding: 8px 12px;
  }
  .banner-slider {
    grid-auto-columns: minmax(240px, 85%);
  }
  .banner-slider button {
    display: none;
  }
  #hero {
    padding: 20px 18px;
  }
  main > section {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
  #sitemap ul,
  #links ul {
    gap: 8px;
  }
  #sitemap a,
  #links a {
    padding: 6px 14px;
    font-size: 0.82rem;
  }
  button[aria-label="返回顶部"],
  button[aria-label="切换暗黑模式"] {
    width: 42px;
    height: 42px;
    font-size: 0.62rem;
    right: 14px;
  }
  button[aria-label="返回顶部"] {
    bottom: 74px;
  }
  button[aria-label="切换暗黑模式"] {
    bottom: 20px;
  }
}

@media (max-width: 480px) {
  header[role="banner"] {
    padding: 10px 14px;
    gap: 10px;
  }
  .brand-bar a {
    font-size: 1rem;
  }
  .brand-bar svg {
    width: 32px;
    height: 32px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stats > div {
    padding: 14px 10px;
  }
  #hero > p a {
    display: block;
    text-align: center;
    margin: 8px 0 0;
  }
  #faq summary {
    padding: 14px 42px 14px 16px;
    font-size: 0.92rem;
  }
  #contact ul li {
    font-size: 0.86rem;
    word-break: break-word;
  }
}

/* ============ PRINT ============ */
@media print {
  header[role="banner"],
  button,
  .banner-slider button {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}