:root {
  --bg: #f5f6fa;
  --bg-alt: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #1a1a2e;
  --text-soft: #4a4a5e;
  --text-mute: #7a7a92;
  --primary: #e94560;
  --primary-dark: #c72f4a;
  --secondary: #533483;
  --accent: #0f3460;
  --deep: #1a1a2e;
  --border: rgba(26, 26, 46, 0.1);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.16);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #533483 75%, #e94560 130%);
  --grad-accent: linear-gradient(120deg, #e94560 0%, #533483 100%);
  --grad-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.08), rgba(83, 52, 131, 0.08));
  --maxw: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d18;
    --bg-alt: #16162a;
    --bg-elev: rgba(26, 26, 46, 0.6);
    --text: #ececf5;
    --text-soft: #b8b8cc;
    --text-mute: #8888a4;
    --border: rgba(236, 236, 245, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --grad-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.14), rgba(83, 52, 131, 0.18));
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(233, 69, 96, 0.08), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(83, 52, 131, 0.1), transparent 46%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

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

h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin: 0 0 0.6em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin: 0 0 0.8em;
  position: relative;
  padding-left: 0.7em;
}

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

h3 {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  margin: 1.6em 0 0.6em;
  color: var(--secondary);
}

@media (prefers-color-scheme: dark) {
  h3 { color: #b9a5e8; }
}

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.5em;
}

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

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

blockquote {
  margin: 1.4em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

figure {
  margin: 1.8em 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

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

figcaption {
  padding: 0.9em 1.2em;
  font-size: 0.9rem;
  color: var(--text-mute);
  background: var(--bg-elev);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

time {
  font-size: 0.82rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

address {
  font-style: normal;
}

/* ============ HEADER ============ */
body > header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elev);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease), background-color 0.4s var(--ease);
}

body > header:hover {
  box-shadow: var(--shadow-sm);
}

body > header > a:first-child {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6em 1em;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
  font-size: 0.9rem;
}

body > header > a:first-child:focus {
  left: 0;
}

body > header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7em 1.2em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8em 1.4em;
}

body > header > div > a[aria-label] {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  order: 1;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

body > header > div > a[aria-label] svg {
  width: 42px;
  height: 42px;
  transition: transform 0.5s var(--ease);
  filter: drop-shadow(0 4px 12px rgba(233, 69, 96, 0.4));
}

body > header > div > a[aria-label]:hover svg {
  transform: rotate(72deg) scale(1.05);
}

body > header > div > a[aria-label] span {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav[aria-label="主导航"] {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
}

nav[aria-label="主导航"] ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0.3em;
}

nav[aria-label="主导航"] li {
  margin: 0;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 0.42em 0.7em;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

nav[aria-label="主导航"] a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.18em;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-accent);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

nav[aria-label="主导航"] a:hover {
  color: var(--primary);
  background: var(--grad-soft);
  transform: translateY(-1px);
}

nav[aria-label="主导航"] a:hover::after {
  width: 60%;
}

form[role="search"] {
  order: 3;
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex: 1 1 240px;
  max-width: 340px;
  position: relative;
}

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

form[role="search"] input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55em 1em;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

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

form[role="search"] input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.18);
  outline: none;
}

form[role="search"] button[type="submit"] {
  flex-shrink: 0;
  padding: 0.55em 1.1em;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

form[role="search"] button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.4);
  filter: brightness(1.06);
}

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

body > header button[aria-label="切换暗黑模式"] {
  order: 4;
  flex-shrink: 0;
  padding: 0.55em 1em;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

body > header button[aria-label="切换暗黑模式"]:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--grad-soft);
  transform: translateY(-1px);
}

/* ============ BREADCRUMB ============ */
body > nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9em 1.2em 0;
}

body > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  color: var(--text-mute);
}

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

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

body > nav[aria-label="面包屑导航"] a {
  color: var(--text-mute);
}

body > nav[aria-label="面包屑导航"] a:hover {
  color: var(--primary);
}

body > nav[aria-label="面包屑导航"] [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ============ MAIN ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.2em 1.2em 3em;
  display: flex;
  flex-direction: column;
  gap: 1.6em;
}

main > section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4em, 3.5vw, 2.6em);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

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

main > section:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 69, 96, 0.25);
}

main > section:hover::before {
  opacity: 1;
}

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

/* HERO */
main > section[aria-labelledby="hero-title"] {
  background: var(--grad-hero);
  border: none;
  color: #fff;
  padding: clamp(1.8em, 5vw, 3.4em);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

main > section[aria-labelledby="hero-title"]::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.45), transparent 68%);
  filter: blur(20px);
  animation: heroGlow 9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  from { transform: translate(0, 0) scale(1); opacity: 0.7; }
  to { transform: translate(-40px, 30px) scale(1.15); opacity: 1; }
}

main > section[aria-labelledby="hero-title"] h1 {
  background: linear-gradient(120deg, #ffffff 10%, #ffd6de 50%, #e94560 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 30px rgba(233, 69, 96, 0.25);
}

main > section[aria-labelledby="hero-title"] p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 62ch;
}

main > section[aria-labelledby="hero-title"] figure {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

main > section[aria-labelledby="hero-title"] figcaption {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border-top-color: rgba(255, 255, 255, 0.12);
}

main > section[aria-labelledby="hero-title"] p a {
  display: inline-block;
  margin: 0.2em 0.3em 0.2em 0;
  padding: 0.5em 1.15em;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease);
}

main > section[aria-labelledby="hero-title"] p a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.45);
}

/* NEWS & ARTICLES CARDS */
#news article,
#articles article {
  padding: 1.2em 1.4em;
  margin-bottom: 1em;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 69, 96, 0.3);
}

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

#news article h3,
#articles article h3 {
  margin: 0 0 0.4em;
  font-size: 1.1rem;
  color: var(--text);
  transition: color 0.25s var(--ease);
}

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

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

#articles article a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  transition: all 0.28s var(--ease);
}

#articles article a:hover {
  background: var(--grad-accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(233, 69, 96, 0.35);
}

/* FAQ */
#faq details {
  margin-bottom: 0.8em;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

#faq details[open] {
  background: var(--bg-alt);
  border-color: rgba(233, 69, 96, 0.35);
  box-shadow: var(--shadow-sm);
}

#faq details:hover {
  border-color: rgba(233, 69, 96, 0.3);
}

#faq summary {
  cursor: pointer;
  padding: 1em 2.6em 1em 1.2em;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  position: relative;
  list-style: none;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "";
  position: absolute;
  right: 1.2em;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}

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

#faq summary:hover {
  color: var(--primary);
  background: var(--grad-soft);
}

#faq details p {
  margin: 0;
  padding: 0 1.2em 1.2em;
  font-size: 0.94rem;
  animation: faqReveal 0.4s var(--ease);
}

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

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

#howto ol > li {
  counter-increment: step;
  position: relative;
  padding: 0.7em 1em 0.7em 3.2em;
  margin-bottom: 0.7em;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  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.85em;
  top: 50%;
  transform: translateY(-50%);
  width: 1.9em;
  height: 1.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-accent);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.35);
}

#howto ol > li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(233, 69, 96, 0.3);
}

#howto ul li {
  padding-left: 0.2em;
}

/* CONTACT */
#contact address ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8em;
  margin: 1em 0 1.6em;
}

#contact address li {
  margin: 0;
  padding: 0.85em 1.1em;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact address li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(233, 69, 96, 0.3);
}

/* SITEMAP & LINKS */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 0.45em 1.05em;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.35);
}

/* ============ FOOTER ============ */
body > footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 2em;
  padding: clamp(2em, 5vw, 3.4em) 1.2em 2em;
  position: relative;
  overflow: hidden;
}

body > footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(233, 69, 96, 0.22), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(83, 52, 131, 0.28), transparent 50%);
  pointer-events: none;
}

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

body > footer section {
  margin-bottom: 1.8em;
  padding-bottom: 1.4em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body > footer h2 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.6em;
  padding-left: 0.7em;
}

body > footer h2::before {
  background: linear-gradient(180deg, #e94560, #533483);
}

body > footer p {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.9rem;
  line-height: 1.85;
}

body > footer a {
  color: #ff8a9e;
}

body > footer a:hover {
  color: #fff;
}

body > footer > p:last-child {
  text-align: center;
  margin-bottom: 0;
}

body > footer > p:last-child a {
  display: inline-block;
  padding: 0.5em 1.3em;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease);
}

body > footer > p:last-child a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.45);
}

/* ============ SCROLL REVEAL ANIMATION ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

main > section {
  animation: fadeUp 0.7s var(--ease) both;
}

main > section:nth-child(1) { animation-delay: 0.05s; }
main > section:nth-child(2) { animation-delay: 0.1s; }
main > section:nth-child(3) { animation-delay: 0.15s; }
main > section:nth-child(4) { animation-delay: 0.2s; }
main > section:nth-child(5) { animation-delay: 0.25s; }
main > section:nth-child(6) { animation-delay: 0.3s; }

@supports (animation-timeline: view()) {
  main > section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

@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;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  body > header > div {
    padding: 0.6em 1em;
    gap: 0.6em 0.9em;
  }

  nav[aria-label="主导航"] {
    order: 5;
    flex-basis: 100%;
  }

  nav[aria-label="主导航"] ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.3em;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav[aria-label="主导航"] ul::-webkit-scrollbar {
    display: none;
  }

  nav[aria-label="主导航"] a {
    white-space: nowrap;
  }

  form[role="search"] {
    order: 3;
    max-width: none;
    flex: 1 1 160px;
  }
}

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

  body > header > div > a[aria-label] svg {
    width: 34px;
    height: 34px;
  }

  body > header > div > a[aria-label] span {
    font-size: 1.08rem;
  }

  form[role="search"] {
    flex-basis: 100%;
    order: 4;
  }

  body > header button[aria-label="切换暗黑模式"] {
    font-size: 0.8rem;
    padding: 0.5em 0.85em;
  }

  main {
    padding: 0.9em 0.8em 2em;
    gap: 1.1em;
  }

  main > section {
    border-radius: var(--radius);
    padding: 1.2em 1.1em;
  }

  main > section[aria-labelledby="hero-title"] {
    padding: 1.5em 1.2em;
  }

  main > section[aria-labelledby="hero-title"] p a {
    display: block;
    text-align: center;
    margin: 0.4em 0;
  }

  h2 {
    padding-left: 0.6em;
  }

  h2::before {
    width: 4px;
  }

  blockquote {
    padding: 0.8em 1em;
  }

  #contact address ul {
    grid-template-columns: 1fr;
  }

  #howto ol > li {
    padding-left: 2.9em;
  }

  body > footer {
    padding: 2em 1em 1.6em;
  }
}

@media (min-width: 1200px) {
  main {
    padding-top: 1.6em;
  }
}

/* ============ PRINT ============ */
@media print {
  body > header,
  body > footer,
  body > nav[aria-label="面包屑导航"],
  form[role="search"],
  body > header button {
    display: none !important;
  }

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

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