:root {
  --brand-red: #C8102E;
  --brand-red-dark: #A00C24;
  --brand-red-light: #E8354F;
  --brand-green: #2E7D32;
  --brand-green-light: #43A047;
  --accent-gold: #FFB74D;
  --bg: #FFF8F5;
  --bg-alt: #FFFFFF;
  --bg-soft: #FDF0EC;
  --text: #2B2023;
  --text-soft: #5C4A4E;
  --text-muted: #8A767B;
  --border: rgba(200, 16, 46, 0.12);
  --border-strong: rgba(200, 16, 46, 0.22);
  --shadow-sm: 0 2px 8px rgba(160, 12, 36, 0.06);
  --shadow-md: 0 8px 24px rgba(160, 12, 36, 0.10);
  --shadow-lg: 0 16px 48px rgba(160, 12, 36, 0.14);
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: 16px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  --max-w: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --brand-red: #FF4D66;
  --brand-red-dark: #E8354F;
  --brand-red-light: #FF7183;
  --brand-green: #66BB6A;
  --brand-green-light: #81C784;
  --accent-gold: #FFCA7A;
  --bg: #14090C;
  --bg-alt: #1E1116;
  --bg-soft: #27151B;
  --text: #F5E8EB;
  --text-soft: #C9B4B9;
  --text-muted: #9C858B;
  --border: rgba(255, 77, 102, 0.16);
  --border-strong: rgba(255, 77, 102, 0.30);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --glass-bg: rgba(30, 17, 22, 0.62);
  --glass-border: rgba(255, 77, 102, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-red: #FF4D66;
    --brand-red-dark: #E8354F;
    --brand-red-light: #FF7183;
    --brand-green: #66BB6A;
    --brand-green-light: #81C784;
    --accent-gold: #FFCA7A;
    --bg: #14090C;
    --bg-alt: #1E1116;
    --bg-soft: #27151B;
    --text: #F5E8EB;
    --text-soft: #C9B4B9;
    --text-muted: #9C858B;
    --border: rgba(255, 77, 102, 0.16);
    --border-strong: rgba(255, 77, 102, 0.30);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --glass-bg: rgba(30, 17, 22, 0.62);
    --glass-border: rgba(255, 77, 102, 0.18);
  }
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(200, 16, 46, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(46, 125, 50, 0.08), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  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(--brand-red);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

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

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

ul,
ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.4em;
}

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

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

h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.08rem; }

p {
  margin-bottom: 1em;
  color: var(--text-soft);
  text-wrap: pretty;
}

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

blockquote {
  position: relative;
  margin: 1.2em 0;
  padding: 1em 1.2em 1em 3em;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--brand-red);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote::before {
  content: "“";
  position: absolute;
  left: 0.5em;
  top: 0.1em;
  font-size: 2.6em;
  line-height: 1;
  color: var(--brand-red);
  opacity: 0.35;
  font-family: Georgia, serif;
}

blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-bar > a {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 50%;
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
}

.brand-bar > a:hover {
  transform: rotate(-8deg) scale(1.06);
  filter: drop-shadow(0 6px 14px rgba(200, 16, 46, 0.35));
}

.brand-bar svg {
  width: 48px;
  height: 48px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.brand-text strong {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#main-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

#main-nav > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
}

#main-nav > ul > li {
  margin: 0;
}

#main-nav > ul a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  position: relative;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav > ul a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-green));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#main-nav > ul a:hover {
  color: var(--brand-red);
  background: var(--bg-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

#main-nav > ul a:hover::after {
  width: 55%;
}

#main-nav form[role="search"] {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 320px;
  min-width: 0;
}

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

#main-nav input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}

#main-nav input[type="search"]::placeholder {
  color: var(--text-muted);
}

#main-nav input[type="search"]:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

#main-nav button {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  white-space: nowrap;
}

#main-nav button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.38);
  filter: brightness(1.06);
}

#main-nav button:active {
  transform: translateY(0);
}

#theme-toggle {
  background: linear-gradient(135deg, var(--brand-green), #1B5E20);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.28);
}

#theme-toggle:hover {
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.38);
}

#menu-toggle {
  display: none;
  background: linear-gradient(135deg, var(--brand-red-light), var(--brand-red));
}

header[role="banner"] nav[aria-label="面包屑导航"] {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 10px;
}

header[role="banner"] nav[aria-label="面包屑导航"] ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

header[role="banner"] nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--text-muted);
  opacity: 0.6;
}

header[role="banner"] nav[aria-label="面包屑导航"] a {
  color: var(--text-muted);
  text-decoration: none;
}

header[role="banner"] nav[aria-label="面包屑导航"] a:hover {
  color: var(--brand-red);
}

header[role="banner"] nav[aria-label="面包屑导航"] [aria-current="page"] {
  color: var(--brand-red);
  font-weight: 700;
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 40px;
}

main > section {
  margin: 32px 0;
  padding: 32px 28px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-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: fadeUp 0.7s var(--ease) both;
}

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

main > section:nth-child(even) {
  animation-delay: 0.06s;
}

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

main > section > h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-green));
}

main > section > h3 {
  margin: 24px 0 10px;
  padding-left: 14px;
  border-left: 4px solid var(--brand-red);
  border-radius: 2px;
}

main > section > h3:first-of-type {
  margin-top: 8px;
}

main > section > h4 {
  margin: 18px 0 8px;
  color: var(--brand-red-dark);
}

#hero {
  position: relative;
  overflow: hidden;
  padding: 44px 32px;
  background:
    linear-gradient(135deg, rgba(200, 16, 46, 0.96) 0%, rgba(160, 12, 36, 0.94) 45%, rgba(46, 125, 50, 0.92) 100%);
  border: none;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(255, 255, 255, 0.18), transparent 70%),
    radial-gradient(400px 260px at 5% 90%, rgba(255, 183, 77, 0.22), transparent 70%);
  pointer-events: none;
}

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

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

#hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 900px;
}

#hero strong {
  color: #FFE082;
  background: rgba(0, 0, 0, 0.16);
  padding: 0 4px;
  border-radius: 4px;
}

#hero > p:last-child {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
}

#hero > p:last-child a {
  display: inline-block;
  padding: 10px 22px;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#hero > p:last-child a:hover {
  background: #fff;
  color: var(--brand-red-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  text-decoration: none;
}

.banner-carousel {
  position: relative;
  margin: 28px 0 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.banner-carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transform: scale(1.03);
}

.banner-carousel .slide:first-child {
  position: relative;
  opacity: 1;
  transform: scale(1);
}

.banner-carousel .slide[aria-hidden="false"] {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.banner-carousel svg {
  width: 100%;
  height: auto;
  display: block;
}

.banner-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

#products ul,
#howto ul,
#howto ol,
#notice ul,
#sitemap ul,
#links ul,
#news ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#products ul li,
#howto ul li,
#howto ol li,
#notice ul li {
  position: relative;
  padding: 10px 14px 10px 40px;
  margin-bottom: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#products ul li::before,
#notice ul li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-green));
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.10);
}

#howto ul li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-green);
  font-weight: 800;
  font-size: 1rem;
}

#howto ol {
  counter-reset: step;
}

#howto ol li {
  counter-increment: step;
  padding-left: 52px;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(200, 16, 46, 0.30);
}

#products ul li:hover,
#howto ul li:hover,
#howto ol li:hover,
#notice ul li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

#products > h3 + ul,
#products h4 {
  margin-top: 18px;
}

#products h4 {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.95rem;
  color: var(--brand-red-dark);
  background: var(--bg-soft);
  border-radius: 999px;
  border: 1px solid var(--border);
}

#cases article {
  padding: 20px 22px;
  margin: 14px 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#cases article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#cases article h4 {
  margin: 0 0 8px;
  color: var(--brand-red-dark);
}

#cases article p {
  margin: 0;
}

#news ul li {
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-green);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#news ul li:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
  border-left-color: var(--brand-red);
}

#news ul li h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

#news ul li h3 a {
  color: var(--text);
  text-decoration: none;
}

#news ul li h3 a:hover {
  color: var(--brand-red);
}

#news ul li p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

#articles > h2 {
  grid-column: 1 / -1;
}

#articles article {
  padding: 20px 22px;
  margin: 10px 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

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

#articles article h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  color: var(--text);
  padding: 0;
  border: none;
}

#articles article > p:first-of-type {
  margin-bottom: 8px;
}

#articles article > p:last-child {
  margin: 10px 0 0;
}

#articles article > p:last-child a {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

#articles article > p:last-child a:hover {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
  transform: translateX(3px);
  text-decoration: none;
}

#faq details {
  margin-bottom: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: var(--brand-red);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.14);
}

#faq summary {
  position: relative;
  padding: 15px 48px 15px 18px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

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

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

#faq details[open] summary {
  color: var(--brand-red-dark);
  background: var(--bg-soft);
}

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

#faq details p {
  padding: 0 18px 16px;
  margin: 0;
  color: var(--text-soft);
  animation: fadeIn 0.35s var(--ease);
}

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

#contact address {
  font-style: normal;
  padding: 20px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

#contact address p {
  margin-bottom: 8px;
}

#contact address p:last-child {
  margin-bottom: 0;
}

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

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

#sitemap ul a:hover,
#links ul a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(200, 16, 46, 0.28);
  text-decoration: none;
}

#legal h3 {
  margin-top: 22px;
}

#legal h3:first-of-type {
  margin-top: 8px;
}

#meta-info dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

#meta-info dt {
  font-weight: 700;
  color: var(--text);
}

#meta-info dd {
  margin: 0;
  color: var(--text-soft);
}

footer[role="contentinfo"] {
  margin-top: 40px;
  padding: 32px 20px 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.06), rgba(46, 125, 50, 0.06));
  border-top: 1px solid var(--border);
}

footer[role="contentinfo"] p {
  margin: 0 auto 10px;
  max-width: var(--max-w);
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer[role="contentinfo"] p:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-bottom: 0;
}

footer[role="contentinfo"] a {
  color: var(--text-soft);
  font-weight: 600;
}

footer[role="contentinfo"] a:hover {
  color: var(--brand-red);
}

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  box-shadow: 0 8px 22px rgba(200, 16, 46, 0.38);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.3s var(--ease);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 30px rgba(200, 16, 46, 0.5);
}

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

::selection {
  background: rgba(200, 16, 46, 0.22);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-red), var(--brand-red-dark));
  border-radius: 999px;
  border: 2px solid var(--bg-soft);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-red-dark);
}

@media (min-width: 720px) {
  #articles {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  #articles > h2 {
    margin-bottom: 6px;
  }

  #articles article {
    margin: 0;
  }

  #meta-info dl {
    grid-template-columns: 140px 1fr;
  }
}

@media (min-width: 1024px) {
  main > section {
    padding: 40px 40px;
    margin: 40px 0;
  }

  #hero {
    padding: 56px 44px;
  }

  #articles {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-bar {
    padding: 14px 24px;
  }
}

@media (max-width: 900px) {
  #main-nav {
    gap: 8px;
  }

  #main-nav form[role="search"] {
    flex: 1 1 100%;
    order: 3;
  }

  #main-nav > ul {
    order: 1;
    flex: 1 1 100%;
  }

  #main-nav button {
    order: 2;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 60px;
    --radius-lg: 18px;
    --radius-xl: 24px;
  }

  body {
    font-size: 15px;
  }

  .brand-bar {
    padding: 10px 16px;
    gap: 10px;
  }

  .brand-bar svg {
    width: 40px;
    height: 40px;
  }

  .brand-text strong {
    font-size: 1rem;
  }

  .brand-text span {
    font-size: 0.72rem;
  }

  #main-nav {
    padding: 0 16px 10px;
  }

  #main-nav > ul {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.3s var(--ease);
  }

  #main-nav > ul.is-open {
    display: flex;
  }

  #main-nav > ul a {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }

  #main-nav > ul a::after {
    display: none;
  }

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

  #theme-toggle {
    padding: 9px 14px;
    font-size: 0.82rem;
  }

  #main-nav form[role="search"] {
    flex: 1 1 100%;
  }

  header[role="banner"] nav[aria-label="面包屑导航"] {
    padding: 0 16px 8px;
  }

  main {
    padding: 0 14px 28px;
  }

  main > section {
    padding: 24px 18px;
    margin: 22px 0;
  }

  #hero {
    padding: 30px 20px;
  }

  .banner-carousel {
    margin: 20px 0 6px;
  }

  #hero > p:last-child {
    gap: 10px;
  }

  #hero > p:last-child a {
    padding: 9px 18px;
    font-size: 0.9rem;
  }

  #products ul li,
  #howto ul li,
  #howto ol li,
  #notice ul li {
    padding: 9px 12px 9px 36px;
  }

  #howto ol li {
    padding-left: 46px;
  }

  #faq summary {
    padding: 13px 44px 13px 14px;
    font-size: 0.95rem;
  }

  #meta-info dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  #meta-info dt {
    margin-top: 8px;
  }

  #back-to-top {
    right: 14px;
    bottom: 16px;
    padding: 10px 15px;
    font-size: 0.8rem;
  }

  #sitemap ul a,
  #links ul a {
    padding: 7px 14px;
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .brand-text span {
    display: none;
  }

  #main-nav button {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

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

@media print {
  header[role="banner"],
  #back-to-top,
  footer[role="contentinfo"] {
    display: none;
  }

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

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