:root {
  --brand: #c62828;
  --brand-dark: #8e1c1c;
  --brand-light: #ef5350;
  --brand-soft: rgba(198, 40, 40, 0.08);
  --accent: #ff7043;
  --accent-soft: rgba(255, 112, 67, 0.12);
  --bg: #fdf7f5;
  --bg-alt: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.9);
  --text: #241a1a;
  --text-soft: #5b4848;
  --text-muted: #8a7373;
  --border: rgba(198, 40, 40, 0.14);
  --border-soft: rgba(36, 26, 26, 0.08);
  --shadow-sm: 0 2px 8px rgba(120, 30, 30, 0.06);
  --shadow-md: 0 10px 30px rgba(120, 30, 30, 0.1);
  --shadow-lg: 0 20px 50px rgba(120, 30, 30, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --grad-banner: linear-gradient(135deg, #c62828 0%, #e53935 42%, #ff7043 100%);
  --grad-brand: linear-gradient(135deg, #c62828, #ff7043);
  --grad-soft: linear-gradient(160deg, rgba(198, 40, 40, 0.07), rgba(255, 112, 67, 0.05));
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140f10;
    --bg-alt: #1c1517;
    --bg-glass: rgba(32, 23, 25, 0.66);
    --bg-glass-strong: rgba(32, 23, 25, 0.88);
    --text: #f4e9e8;
    --text-soft: #cbb8b7;
    --text-muted: #9c8685;
    --border: rgba(255, 130, 110, 0.18);
    --border-soft: rgba(255, 255, 255, 0.08);
    --brand-soft: rgba(255, 112, 67, 0.14);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    --grad-soft: linear-gradient(160deg, rgba(255, 112, 67, 0.1), rgba(198, 40, 40, 0.06));
  }
}

html[data-theme="dark"] {
  --bg: #140f10;
  --bg-alt: #1c1517;
  --bg-glass: rgba(32, 23, 25, 0.66);
  --bg-glass-strong: rgba(32, 23, 25, 0.88);
  --text: #f4e9e8;
  --text-soft: #cbb8b7;
  --text-muted: #9c8685;
  --border: rgba(255, 130, 110, 0.18);
  --border-soft: rgba(255, 255, 255, 0.08);
  --brand-soft: rgba(255, 112, 67, 0.14);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --grad-soft: linear-gradient(160deg, rgba(255, 112, 67, 0.1), rgba(198, 40, 40, 0.06));
}

*,
*::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: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 8% -5%, rgba(198, 40, 40, 0.1), transparent 60%),
    radial-gradient(800px 480px at 100% 0%, rgba(255, 112, 67, 0.1), transparent 55%),
    radial-gradient(700px 600px at 50% 120%, rgba(198, 40, 40, 0.06), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

h1 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
h4 { font-size: clamp(1.02rem, 2vw, 1.15rem); }

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

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

li { margin-bottom: 0.5em; }

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

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

blockquote {
  margin: 0 0 1.2em;
  padding: 1.1em 1.3em;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--brand-light);
}

blockquote p { margin: 0; }

time {
  color: var(--text-muted);
  font-size: 0.88em;
  font-variant-numeric: tabular-nums;
}

small { color: var(--text-muted); }

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  flex-shrink: 0;
}

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(198, 40, 40, 0.35);
  transition: transform 0.45s var(--ease), box-shadow 0.35s var(--ease);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 10px 24px rgba(198, 40, 40, 0.45);
}

.brand-name {
  font-size: 1.18rem;
  letter-spacing: 0.04em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

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

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
}

.nav-list li { margin: 0; }

.nav-list a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 0.92rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.menu-toggle,
.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-glass-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.menu-toggle { display: none; }

.menu-toggle:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
  color: var(--brand);
}

.menu-toggle:active,
.theme-toggle:active { transform: translateY(0) scale(0.97); }

.menu-toggle[aria-expanded="true"] {
  background: var(--grad-brand);
  color: #fff;
  border-color: transparent;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.site-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-search input[type="search"] {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  width: 210px;
  max-width: 100%;
  transition: width 0.35s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-search input[type="search"]::placeholder { color: var(--text-muted); }

.site-search input[type="search"]:focus {
  outline: none;
  width: 250px;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.site-search button {
  appearance: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(198, 40, 40, 0.35);
  filter: brightness(1.05);
}

.site-search button:active { transform: translateY(0) scale(0.97); }

/* ============ MAIN LAYOUT ============ */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
}

main > section {
  margin: 40px 0;
  padding: clamp(22px, 4vw, 40px);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

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

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

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

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

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

main > section h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  color: var(--text);
}

main > section h3:first-of-type { margin-top: 0.4em; }

main > section h4 {
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  color: var(--text);
}

/* ============ BREADCRUMB ============ */
nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 0;
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

.breadcrumb a { color: var(--text-soft); }

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

.breadcrumb [aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}

/* ============ BANNER ============ */
#banner {
  background: var(--grad-banner);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
  padding: clamp(28px, 5vw, 56px);
  margin-top: 24px;
}

#banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 320px at 85% 10%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(500px 300px at 10% 100%, rgba(0, 0, 0, 0.18), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

#banner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

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

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

#banner > p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 78ch;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

.banner-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 26px 0 22px;
  scroll-snap-type: x mandatory;
}

.banner-carousel .slide {
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  scroll-snap-align: start;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.banner-carousel .slide:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.banner-carousel .slide h2 {
  color: #fff;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  margin: 0 0 0.5em;
  padding: 0;
}

.banner-carousel .slide h2::before { display: none; }

.banner-carousel .slide p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  font-size: 0.92rem;
}

.update-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.update-time time { color: rgba(255, 255, 255, 0.95); }

/* ============ NEWS / ARTICLES CARDS ============ */
#news > article,
#articles > article {
  position: relative;
  background: var(--bg-glass-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 0 0 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

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

#news > article h3,
#articles > article h3 {
  margin: 0 0 0.35em;
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  transition: color 0.3s var(--ease);
}

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

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

#articles > article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

#articles > article a:hover {
  background: var(--grad-brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(198, 40, 40, 0.3);
}

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

#articles h3[id^="article-"] {
  margin-top: 2.2em;
  padding-top: 1.4em;
  border-top: 1px dashed var(--border);
}

/* ============ FAQ ============ */
#faq details {
  background: var(--bg-glass-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin: 0 0 12px;
  padding: 0;
  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 {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

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

#faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-md);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

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

#faq details[open] summary {
  background: var(--brand-soft);
  color: var(--brand);
  border-bottom: 1px solid var(--border-soft);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

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

#faq details p {
  padding: 16px 20px;
  margin: 0;
  animation: fadeSlideIn 0.35s var(--ease);
}

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

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

#howto ol > li {
  counter-increment: howto;
  position: relative;
  padding: 12px 16px 12px 52px;
  margin-bottom: 10px;
  background: var(--bg-glass-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol > li::before {
  content: counter(howto);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(198, 40, 40, 0.3);
}

#howto ol > li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

#howto ul > li {
  padding: 4px 0;
}

/* ============ CONTACT / SITEMAP / LINKS ============ */
#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 8px;
}

#contact ul > li,
#sitemap ul > li,
#links ul > li {
  margin: 0;
  padding: 10px 16px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#contact ul > li:hover,
#sitemap ul > li:hover,
#links ul > li:hover {
  transform: translateX(4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  background: var(--brand-soft);
}

#sitemap ul,
#links ul {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

#sitemap a,
#links a {
  display: block;
  font-weight: 500;
}

#contact address {
  font-style: normal;
}

/* ============ FOOTER ============ */
#site-footer {
  position: relative;
  margin-top: 60px;
  padding: clamp(32px, 5vw, 56px) 20px 32px;
  background: linear-gradient(180deg, rgba(198, 40, 40, 0.06), rgba(198, 40, 40, 0.02));
  border-top: 1px solid var(--border-soft);
  color: var(--text-soft);
}

#site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
}

#site-footer > section {
  max-width: var(--maxw);
  margin: 0 auto 28px;
  padding: 22px 24px;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

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

#site-footer h2 {
  font-size: 1.08rem;
  margin: 0 0 0.6em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#site-footer h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

#site-footer p {
  margin: 0 0 0.6em;
  font-size: 0.9rem;
  color: var(--text-soft);
}

#site-footer p:last-child { margin-bottom: 0; }

#site-footer address {
  font-style: normal;
}

#site-footer > p {
  max-width: var(--maxw);
  margin: 0 auto 12px;
  text-align: center;
  font-size: 0.85rem;
}

#site-footer > p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  background: var(--grad-brand);
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px rgba(198, 40, 40, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

#site-footer > p a:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(198, 40, 40, 0.4);
  filter: brightness(1.06);
  color: #fff;
}

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

main > section,
#site-footer > section,
#news > article,
#articles > article,
#faq details,
#howto ol > li {
  animation: riseIn 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 22%;
}

@supports not (animation-timeline: view()) {
  main > section,
  #site-footer > section,
  #news > article,
  #articles > article,
  #faq details,
  #howto ol > li {
    animation: none;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .site-search input[type="search"] { width: 170px; }
  .site-search input[type="search"]:focus { width: 200px; }
}

@media (max-width: 920px) {
  .header-inner { gap: 10px 14px; }
  .nav-list a { padding: 6px 9px; font-size: 0.86rem; }
  .site-search { order: 5; width: 100%; margin-left: 0; }
  .site-search input[type="search"] { flex: 1; width: auto; }
  .site-search input[type="search"]:focus { width: auto; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }

  .header-inner {
    padding: 10px 16px;
    gap: 10px;
  }

  .brand-name { font-size: 1.05rem; }

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

  .theme-toggle { order: 4; }

  nav[aria-label="主导航"] {
    order: 6;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), padding 0.35s var(--ease);
  }

  #site-header.menu-open nav[aria-label="主导航"] {
    max-height: 520px;
    opacity: 1;
    padding: 6px 0 4px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-list a {
    display: block;
    padding: 11px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    background: var(--bg-glass-strong);
  }

  .site-search { order: 7; flex-basis: 100%; }

  main { padding: 0 14px 32px; }

  main > section {
    margin: 28px 0;
    border-radius: var(--radius-md);
  }

  #banner { margin-top: 18px; }

  .banner-carousel {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .banner-carousel .slide {
    flex: 0 0 82%;
    min-width: 0;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  #site-footer > section { padding: 18px 18px; }
}

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

  .header-inner { padding: 9px 12px; }

  .brand svg { width: 34px; height: 34px; border-radius: 10px; }

  .theme-toggle,
  .menu-toggle { padding: 7px 13px; font-size: 0.82rem; }

  main { padding: 0 10px 24px; }

  main > section { padding: 18px 16px; }

  main > section > h2 { padding-left: 14px; }

  main > section > h2::before { width: 4px; }

  .banner-carousel .slide { flex: 0 0 88%; padding: 16px 18px; }

  #faq summary { padding: 14px 46px 14px 16px; font-size: 0.95rem; }

  #faq details p { padding: 14px 16px; }

  #howto ol > li { padding: 10px 12px 10px 46px; }

  #howto ol > li::before { left: 10px; width: 24px; height: 24px; }

  #contact ul > li,
  #sitemap ul > li,
  #links ul > li { padding: 9px 13px; }

  .breadcrumb { font-size: 0.8rem; padding: 7px 13px; }
}

@media (hover: none) {
  main > section:hover,
  #news > article:hover,
  #articles > article:hover,
  #faq details:hover,
  #site-footer > section:hover,
  .banner-carousel .slide:hover,
  #howto ol > li:hover,
  #contact ul > li:hover,
  #sitemap ul > li:hover,
  #links ul > li:hover {
    transform: none;
  }
}

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

@media print {
  #site-header,
  .menu-toggle,
  .theme-toggle,
  .site-search,
  #site-footer > p:last-child {
    display: none !important;
  }

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

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