:root {
  --brand-purple: #6a4bd6;
  --brand-purple-dark: #4a2fb0;
  --brand-orange: #ff8a3d;
  --brand-orange-soft: #ffb37d;
  --brand-pink: #ff6fae;
  --bg: #f7f5ff;
  --bg-soft: #ffffff;
  --bg-elevated: #ffffff;
  --text: #241f3d;
  --text-soft: #57516f;
  --text-muted: #8a84a3;
  --border: rgba(106, 75, 214, 0.14);
  --border-strong: rgba(106, 75, 214, 0.28);
  --shadow-sm: 0 4px 14px rgba(74, 47, 176, 0.08);
  --shadow-md: 0 12px 32px rgba(74, 47, 176, 0.12);
  --shadow-lg: 0 24px 64px rgba(74, 47, 176, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --max-width: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #6a4bd6 0%, #9b5de5 38%, #ff6fae 72%, #ff8a3d 100%);
  --grad-btn: linear-gradient(135deg, #6a4bd6 0%, #ff6fae 100%);
  --grad-accent: linear-gradient(135deg, #ff8a3d 0%, #ff6fae 100%);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0f0c1d;
  --bg-soft: #171230;
  --bg-elevated: #1d1738;
  --text: #f2eefc;
  --text-soft: #c3bce0;
  --text-muted: #8f88ad;
  --border: rgba(155, 93, 229, 0.22);
  --border-strong: rgba(155, 93, 229, 0.42);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --glass-bg: rgba(29, 23, 56, 0.55);
  --glass-border: rgba(155, 93, 229, 0.28);
  --grad-hero: linear-gradient(135deg, #2a1b5e 0%, #4a2fb0 38%, #7b2f8f 72%, #a8482a 100%);
}

*,
*::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-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(106, 75, 214, 0.16), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(255, 111, 174, 0.14), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 138, 61, 0.1), transparent 46%);
  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-purple);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

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

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

li {
  margin-bottom: 0.35em;
}

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

h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); margin: 0 0 0.7em; }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.4rem); margin: 1.6em 0 0.5em; }
h4 { font-size: 1.05rem; margin: 1.2em 0 0.4em; color: var(--text-soft); }

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

time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

blockquote {
  margin: 1.25em 0;
  padding: 1.1em 1.4em;
  border-left: 4px solid transparent;
  border-image: var(--grad-accent) 1;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

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

blockquote footer {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

::selection {
  background: rgba(255, 111, 174, 0.32);
  color: var(--text);
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px rgba(74, 47, 176, 0.08);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

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

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
}

.brand > a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

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

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(106, 75, 214, 0.32);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand > a:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(255, 111, 174, 0.42);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-slogan {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

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

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-accent);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  color: var(--brand-purple);
  background: rgba(106, 75, 214, 0.08);
  transform: translateY(-1px);
}

#main-nav a:hover::after {
  width: 60%;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

#search-form {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#search-form:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(106, 75, 214, 0.14);
}

#site-search {
  border: none;
  background: transparent;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--text);
  width: 180px;
  outline: none;
  font-family: inherit;
}

#site-search::placeholder {
  color: var(--text-muted);
}

#search-form button {
  border: none;
  background: var(--grad-btn);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.25s var(--ease);
}

#search-form button:hover {
  filter: brightness(1.1);
}

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

#theme-toggle:hover,
#menu-toggle:hover {
  color: #fff;
  background: var(--grad-btn);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(106, 75, 214, 0.32);
  transform: translateY(-1px);
}

#menu-toggle {
  display: none;
}

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

main > section {
  margin: 0 0 56px;
  padding: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
  opacity: 0;
  transform: translateY(28px);
  animation: riseIn 0.7s var(--ease) forwards;
}

main > section:nth-of-type(2n) { animation-delay: 0.06s; }
main > section:nth-of-type(3n) { animation-delay: 0.12s; }

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

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  main > section {
    animation: none;
    opacity: 1;
    transform: none;
  }
  html { scroll-behavior: auto; }
}

#hero {
  margin: 24px 0 40px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  animation: none;
  opacity: 1;
  transform: none;
}

#hero:hover {
  box-shadow: none;
}

.hero-slider {
  position: relative;
  padding: 48px 40px 56px;
  border-radius: var(--radius-xl);
  background: var(--grad-hero);
  background-size: 200% 200%;
  animation: heroShift 16s ease infinite;
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.24), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.16), transparent 42%);
  pointer-events: none;
}

@keyframes heroShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.slide {
  position: relative;
  display: none;
  max-width: 820px;
  animation: fadeSlide 0.6s var(--ease);
}

.slide.is-active {
  display: block;
}

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

.slide h1,
.slide h2 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

.slide h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.8rem);
  margin-bottom: 0.5em;
}

.slide p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  margin-bottom: 0.9em;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  margin: 8px 12px 0 0;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.btn-primary {
  background: #fff;
  color: var(--brand-purple-dark);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: var(--brand-purple-dark);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.slider-controls {
  position: absolute;
  right: 32px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.slider-prev,
.slider-next {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease);
}

.slider-prev:hover,
.slider-next:hover {
  background: #fff;
  color: var(--brand-purple-dark);
  transform: translateY(-2px);
}

.hero-stats {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

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

.stat-num {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

#breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto 16px;
  padding: 0 24px;
}

#breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

#breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-muted);
  opacity: 0.6;
}

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

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

#anchor-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  margin: 0 auto 32px;
  padding: 10px 24px;
  max-width: var(--max-width);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: thin;
}

#anchor-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  min-width: max-content;
}

#anchor-nav li {
  margin: 0;
}

#anchor-nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
}

#anchor-nav a:hover,
#anchor-nav a:focus-visible {
  color: #fff;
  background: var(--grad-btn);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(106, 75, 214, 0.3);
}

#anchor-nav::-webkit-scrollbar {
  height: 4px;
}

#anchor-nav::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

#products article,
#articles article,
#news article {
  padding: 20px 22px;
  margin: 0 0 16px;
  background: var(--bg-elevated);
  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,
#news article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#articles article h3,
#news article h3 {
  margin-top: 0;
  font-size: 1.12rem;
}

#articles article a {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-purple);
  position: relative;
  padding-right: 16px;
}

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

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

#faq details {
  margin: 0 0 12px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

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

#faq summary {
  cursor: pointer;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  position: relative;
  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-purple);
  transition: transform 0.3s var(--ease);
  line-height: 1;
}

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

#faq summary:hover {
  background: rgba(106, 75, 214, 0.06);
  color: var(--brand-purple);
}

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.94rem;
  color: var(--text-soft);
  animation: fadeSlide 0.35s var(--ease);
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 56px;
  margin-bottom: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-btn);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(106, 75, 214, 0.3);
}

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

#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding-left: 0;
}

#contact ul li,
#sitemap ul li,
#links ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

#contact ul li:last-child,
#sitemap ul li:last-child,
#links ul li:last-child {
  border-bottom: none;
}

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

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

#links ul li {
  border-bottom: none;
  padding: 0;
}

#links a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all 0.25s var(--ease);
}

#links a:hover {
  color: #fff;
  background: var(--grad-btn);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(106, 75, 214, 0.28);
}

#site-footer {
  margin-top: 40px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  position: relative;
}

#site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-hero);
}

.footer-cols {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
}

.footer-cols h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.footer-cols p {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-cols li {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.footer-cols a {
  color: var(--text-soft);
  position: relative;
  padding-left: 0;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.footer-cols a:hover {
  color: var(--brand-purple);
  padding-left: 6px;
}

.footer-legal {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--border);
}

.footer-legal h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin: 18px 0 6px;
}

.footer-legal h3:first-child {
  margin-top: 0;
}

.footer-legal p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-legal p:last-child {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  text-align: center;
  font-size: 0.82rem;
}

#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--grad-btn);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 10px 28px rgba(106, 75, 214, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: all 0.35s var(--ease);
  line-height: 1.2;
  padding: 0;
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 38px rgba(255, 111, 174, 0.5);
}

#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

@media (max-width: 1024px) {
  .header-inner {
    gap: 14px;
  }
  #main-nav a {
    padding: 8px 9px;
    font-size: 0.85rem;
  }
  #site-search {
    width: 140px;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }
  .header-inner {
    padding: 0 16px;
    min-height: var(--header-h);
    justify-content: space-between;
  }
  .brand-slogan {
    display: none;
  }
  #menu-toggle {
    display: inline-block;
  }
  #main-nav {
    order: 10;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease);
    opacity: 0;
  }
  #main-nav.is-open {
    max-height: 520px;
    opacity: 1;
    padding-bottom: 12px;
  }
  #main-nav ul {
    flex-direction: column;
    gap: 2px;
  }
  #main-nav a {
    display: block;
    padding: 10px 14px;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
  }
  #main-nav a::after {
    display: none;
  }
  .header-tools {
    margin-left: auto;
  }
  #search-form {
    display: none;
  }
  main {
    padding: 0 16px;
  }
  main > section {
    padding: 24px 20px;
    margin-bottom: 40px;
    border-radius: var(--radius-md);
  }
  #hero {
    margin: 16px 0 32px;
    padding: 0;
  }
  .hero-slider {
    padding: 36px 24px 72px;
    border-radius: var(--radius-lg);
  }
  .slider-controls {
    right: 20px;
    bottom: 18px;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  #breadcrumb,
  #anchor-nav {
    padding-left: 16px;
    padding-right: 16px;
  }
  #anchor-nav {
    top: var(--header-h);
    border-radius: var(--radius-sm);
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 16px 24px;
  }
  .footer-legal {
    padding: 24px 16px 32px;
  }
  #back-to-top {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    font-size: 0.66rem;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }
  .brand-name {
    font-size: 1.1rem;
  }
  .brand svg {
    width: 34px;
    height: 34px;
  }
  .hero-slider {
    padding: 28px 18px 76px;
  }
  .slide h1 {
    font-size: 1.5rem;
  }
  .btn-primary,
  .btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
    margin: 8px 0 0;
  }
  .slider-prev,
  .slider-next {
    padding: 7px 12px;
    font-size: 0.76rem;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  .hero-stats li {
    padding: 14px 10px;
  }
  #sitemap ul {
    grid-template-columns: 1fr;
  }
  #howto ol li {
    padding: 12px 12px 12px 48px;
  }
  #faq summary {
    padding: 14px 42px 14px 16px;
    font-size: 0.92rem;
  }
  #faq details p {
    padding: 0 16px 16px;
  }
  #links a {
    font-size: 0.82rem;
    padding: 7px 12px;
  }
}

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

@media print {
  #site-header,
  #anchor-nav,
  #back-to-top,
  .slider-controls,
  #links {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    opacity: 1;
    transform: none;
    animation: none;
    page-break-inside: avoid;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}