:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: rgba(26, 26, 46, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-strong: rgba(255, 255, 255, 0.1);
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0f5;
  --text-secondary: #b8b8cc;
  --text-muted: #8888a0;
  --accent: #ff6b6b;
  --accent-2: #4ecdc4;
  --accent-3: #ffe66d;
  --accent-4: #533483;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #533483 100%);
  --gradient-accent: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  --gradient-cool: linear-gradient(135deg, #4ecdc4 0%, #556270 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 24px rgba(255, 107, 107, 0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1180px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f4f5fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f8;
    --bg-card: rgba(255, 255, 255, 0.78);
    --bg-glass: rgba(255, 255, 255, 0.55);
    --bg-glass-strong: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(26, 26, 46, 0.1);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a66;
    --text-muted: #7a7a95;
    --gradient-hero: linear-gradient(135deg, #eef0f8 0%, #dfe4f5 45%, #d5c8f0 100%);
    --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.08);
    --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.12);
    --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.16);
    --shadow-glow: 0 0 24px rgba(255, 107, 107, 0.18);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-base), color var(--transition-base);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(255, 107, 107, 0.12), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 10%, rgba(78, 205, 196, 0.1), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(83, 52, 131, 0.14), transparent 70%);
  pointer-events: none;
}

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

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

ul,
ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.75rem);
  background: linear-gradient(120deg, var(--text-primary) 20%, var(--accent) 55%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  position: relative;
  padding-left: 18px;
  margin-bottom: 1rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  box-shadow: var(--shadow-glow);
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--text-primary);
  margin: 1.6rem 0 0.6rem;
}

h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: var(--radius-full);
  background: var(--gradient-cool);
  opacity: 0.85;
}

p {
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

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

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

/* ===== Header / Nav ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav > a[aria-label="漫剧首页"] {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

header nav > a[aria-label="漫剧首页"]:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 32px rgba(255, 107, 107, 0.45);
  color: #fff;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-left: auto;
}

header nav ul li a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast);
}

header nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

header nav ul li a:hover {
  color: var(--text-primary);
  background: var(--bg-glass-strong);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ===== Main layout ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

main > section {
  margin-bottom: 2.5rem;
  animation: fadeUp 0.7s cubic-bezier(0.22, 0.68, 0, 1) both;
}

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

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

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

/* ===== Breadcrumb ===== */
nav[aria-label="面包屑导航"] {
  margin-bottom: 1.25rem;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

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

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

/* ===== Hero ===== */
#hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--gradient-hero);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 55%;
  height: 130%;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.28), transparent 65%);
  filter: blur(30px);
  z-index: -1;
  animation: floatGlow 9s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -45%;
  left: -10%;
  width: 50%;
  height: 120%;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.22), transparent 65%);
  filter: blur(34px);
  z-index: -1;
  animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-24px, 18px, 0) scale(1.08); }
}

#hero h1 {
  margin-bottom: 1rem;
  max-width: 26ch;
}

#hero p {
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

#hero figure {
  margin-top: 1.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

#hero figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

/* ===== Generic content cards ===== */
#about,
#products,
#services,
#scenarios,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#knowledge,
#contact,
#sitemap,
#links {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

#about:hover,
#products:hover,
#services:hover,
#scenarios:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#knowledge:hover,
#contact:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 107, 0.28);
}

/* ===== Lists ===== */
#about ul,
#products ul,
#services ul,
#howto ul,
#contact ul,
#sitemap ul,
#links ul,
#news ul {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

#about ul li,
#products ul li,
#services ul li {
  position: relative;
  padding: 0.65rem 0.9rem 0.65rem 2.1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

#about ul li::before,
#products ul li::before,
#services ul li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-accent);
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

#about ul li:hover,
#products ul li:hover,
#services ul li:hover {
  background: var(--bg-glass-strong);
  transform: translateX(4px);
  border-color: rgba(78, 205, 196, 0.35);
}

#howto ol {
  counter-reset: step;
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

#howto ol li:hover {
  background: var(--bg-glass-strong);
  transform: translateX(4px);
}

#howto ul li {
  position: relative;
  padding: 0.5rem 0.75rem 0.5rem 1.9rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

#howto ul li::before {
  content: "✓";
  position: absolute;
  left: 0.7rem;
  color: var(--accent-2);
  font-weight: 700;
}

/* ===== News ===== */
#news ul {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

#news li {
  list-style: none;
}

#news article {
  height: 100%;
  padding: 1.1rem 1.2rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

#news article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

#news article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: rgba(255, 107, 107, 0.35);
}

#news article:hover::before {
  opacity: 1;
}

#news article h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

#news article h3::after {
  display: none;
}

#news article h3 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

#news article h3 a:hover {
  color: var(--accent);
}

#news article p {
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

#news article p:last-child {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===== Articles ===== */
#articles > p {
  margin-bottom: 1.25rem;
}

#articles article {
  position: relative;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

#articles article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(78, 205, 196, 0.35);
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

#articles article h3::after {
  display: none;
}

#articles article p {
  font-size: 0.94rem;
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

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

#articles article > p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-glass);
  color: var(--accent-2);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

#articles article > p:last-child a::after {
  content: "→";
  transition: transform var(--transition-fast);
}

#articles article > p:last-child a:hover {
  background: var(--gradient-accent);
  color: #fff;
  transform: translateX(2px);
}

#articles article > p:last-child a:hover::after {
  transform: translateX(3px);
}

/* ===== Blockquotes ===== */
blockquote {
  position: relative;
  margin: 0.75rem 0;
  padding: 0.9rem 1.1rem 0.9rem 1.4rem;
  background: var(--bg-glass);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

blockquote:hover {
  background: var(--bg-glass-strong);
  transform: translateX(4px);
}

blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* ===== FAQ ===== */
#faq details {
  margin-bottom: 0.7rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

#faq details[open] {
  border-color: rgba(78, 205, 196, 0.4);
  box-shadow: var(--shadow-sm);
  background: var(--bg-glass-strong);
}

#faq details:hover {
  border-color: rgba(255, 107, 107, 0.3);
}

#faq summary {
  position: relative;
  padding: 0.9rem 2.6rem 0.9rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  list-style: none;
  transition: color var(--transition-fast);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-glass);
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform var(--transition-base), background var(--transition-base), color var(--transition-base);
}

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

#faq summary:hover {
  color: var(--accent);
}

#faq details p {
  padding: 0 1.1rem 1rem;
  font-size: 0.92rem;
  margin: 0;
  color: var(--text-secondary);
  animation: fadeIn 0.4s ease both;
}

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

/* ===== Contact & sitemap & links ===== */
#contact ul,
#sitemap ul,
#links ul {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

#contact ul li,
#sitemap ul li,
#links ul li {
  padding: 0.7rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

#contact ul li:hover,
#sitemap ul li:hover,
#links ul li:hover {
  background: var(--bg-glass-strong);
  transform: translateY(-2px);
  border-color: rgba(255, 107, 107, 0.3);
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  width: 100%;
  font-weight: 500;
}

#sitemap ul li a {
  color: var(--text-primary);
}

#sitemap ul li a:hover {
  color: var(--accent);
}

#links ul li a {
  color: var(--accent-2);
}

#links ul li a:hover {
  color: var(--accent);
}

#contact h3 {
  margin-top: 1.5rem;
}

/* ===== Footer ===== */
footer {
  margin-top: 2rem;
  padding: 2.5rem 1.25rem 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.28) 100%);
  border-top: 1px solid var(--border-glass);
  position: relative;
}

@media (prefers-color-scheme: light) {
  footer {
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 46, 0.06) 100%);
  }
}

footer > section {
  max-width: var(--max-width);
  margin: 0 auto 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

footer > section h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  padding-left: 14px;
}

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

footer > section p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

footer > p {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-4));
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

::selection {
  background: rgba(255, 107, 107, 0.35);
  color: var(--text-primary);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header nav {
    padding: 0.6rem 1rem;
  }

  header nav ul {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav ul li {
    flex: 0 0 auto;
  }

  header nav ul li a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
  }

  main {
    padding: 1rem 1rem 2.5rem;
  }

  #hero {
    padding: 1.5rem 1.25rem;
  }

  #hero h1 {
    max-width: none;
  }
}

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

  html {
    scroll-padding-top: 120px;
  }

  header nav > a[aria-label="漫剧首页"] {
    font-size: 1.15rem;
    padding: 0.25rem 0.75rem;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  #about,
  #products,
  #services,
  #scenarios,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #knowledge,
  #contact,
  #sitemap,
  #links {
    padding: 1.1rem 1rem;
    border-radius: var(--radius-md);
  }

  #hero {
    border-radius: var(--radius-md);
  }

  #hero figure {
    margin-top: 1.25rem;
  }

  #hero figcaption {
    font-size: 0.78rem;
    padding: 0.55rem 0.75rem;
  }

  #news ul,
  #contact ul,
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }

  #faq summary {
    font-size: 0.9rem;
    padding: 0.8rem 2.4rem 0.8rem 0.9rem;
  }

  #faq details p {
    padding: 0 0.9rem 0.9rem;
    font-size: 0.88rem;
  }

  #articles article {
    padding: 1rem;
  }

  blockquote {
    padding: 0.75rem 0.9rem 0.75rem 1.1rem;
  }

  footer {
    padding: 2rem 1rem 1.25rem;
  }

  footer > section {
    padding: 0.95rem 1rem;
  }
}

/* ===== Hover-capable devices only ===== */
@media (hover: none) {
  #about ul li:hover,
  #products ul li:hover,
  #services ul li:hover,
  #howto ol li:hover,
  #news article:hover,
  #articles article:hover,
  #contact ul li:hover,
  #sitemap ul li:hover,
  #links ul li:hover {
    transform: none;
  }
}

/* ===== Dark mode explicit support ===== */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  }
}