:root {
  --peach-50: #fff5f7;
  --peach-100: #ffe4ea;
  --peach-200: #ffc9d6;
  --peach-300: #ffa3bb;
  --peach-400: #f97c9d;
  --peach-500: #e8567a;
  --peach-600: #d13e63;
  --peach-700: #b02f4f;
  --peach-800: #8a2540;
  --peach-900: #5f1a2c;
  --ink-900: #1f1720;
  --ink-700: #4a3d47;
  --ink-500: #7a6b76;
  --ink-300: #b9adb5;
  --surface: #ffffff;
  --surface-soft: #fff8fa;
  --surface-glass: rgba(255, 255, 255, 0.65);
  --border-soft: rgba(232, 86, 122, 0.16);
  --shadow-sm: 0 2px 8px rgba(95, 26, 44, 0.06);
  --shadow-md: 0 10px 30px rgba(95, 26, 44, 0.1);
  --shadow-lg: 0 20px 50px rgba(95, 26, 44, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --grad-hero: linear-gradient(135deg, #ffd9e2 0%, #ffe9d6 45%, #e8d9ff 100%);
  --grad-accent: linear-gradient(135deg, var(--peach-500) 0%, #ff8fa8 55%, #ffb38a 100%);
  --grad-soft: linear-gradient(160deg, rgba(232, 86, 122, 0.08), rgba(255, 179, 138, 0.06));
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --peach-50: #2a1a20;
    --peach-100: #3a2229;
    --peach-200: #4d2b35;
    --peach-300: #6e3a48;
    --peach-400: #f97c9d;
    --peach-500: #ff7f9f;
    --peach-600: #ff9db6;
    --peach-700: #ffb8cb;
    --peach-800: #ffd1de;
    --peach-900: #ffe6ec;
    --ink-900: #f7eef2;
    --ink-700: #dcc9d2;
    --ink-500: #a895a0;
    --ink-300: #6f5f69;
    --surface: #1a1218;
    --surface-soft: #221820;
    --surface-glass: rgba(34, 24, 32, 0.6);
    --border-soft: rgba(255, 127, 159, 0.18);
    --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-hero: linear-gradient(135deg, #3a1f2b 0%, #2c1c2e 45%, #241a33 100%);
    --grad-accent: linear-gradient(135deg, #ff7f9f 0%, #ff9db6 55%, #ffb38a 100%);
    --grad-soft: linear-gradient(160deg, rgba(255, 127, 159, 0.1), rgba(255, 179, 138, 0.05));
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-700);
  background-color: var(--surface-soft);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(232, 86, 122, 0.1), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(255, 179, 138, 0.12), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(200, 160, 255, 0.08), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--peach-500);
}

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

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

h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  position: relative;
  padding-bottom: 0.5em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-accent);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-top: 1.4em;
}

h4 {
  font-size: 1.05rem;
  margin-top: 1.2em;
  color: var(--peach-700);
}

p {
  margin: 0 0 1em;
}

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

li {
  margin-bottom: 0.4em;
}

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--peach-400);
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink-700);
  font-style: normal;
}

blockquote p {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

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

header > div {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

header > div > a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding: 0.2rem 0.4rem;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

header > div > a:hover {
  transform: scale(1.04);
  filter: brightness(1.08);
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ink-700);
  font-weight: 500;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

header nav a:hover {
  color: var(--peach-600);
  background: var(--peach-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Skip link ---------- */
body > a[href="#main-content"] {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--peach-500);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: top 0.3s var(--ease);
}

body > a[href="#main-content"]:focus {
  top: 1rem;
  color: #fff;
}

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

main > section,
main > nav {
  margin-bottom: 1.75rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.7s var(--ease) both;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-lg);
}

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

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

/* ---------- Hero ---------- */
section[aria-labelledby="hero-title"] {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--grad-hero);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
}

section[aria-labelledby="hero-title"]::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 70%);
  pointer-events: none;
}

section[aria-labelledby="hero-title"]::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: -80px;
  bottom: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 86, 122, 0.25), transparent 70%);
  pointer-events: none;
}

section[aria-labelledby="hero-title"] h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 0.75em;
  background: linear-gradient(120deg, var(--peach-700), var(--peach-500) 60%, #ff9a6b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

section[aria-labelledby="hero-title"] p {
  position: relative;
  z-index: 1;
  max-width: 780px;
  font-size: 1.05rem;
  color: var(--ink-700);
}

/* ---------- Breadcrumb ---------- */
nav[aria-label="面包屑导航"] {
  padding: 0.85rem 1.4rem !important;
  border-radius: 999px !important;
}

nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
}

nav[aria-label="面包屑导航"] li {
  margin: 0;
  color: var(--ink-500);
}

nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--peach-400);
}

/* ---------- Cards / articles ---------- */
article {
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

article:last-child {
  margin-bottom: 0;
}

article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--peach-300);
}

article h3 {
  margin-top: 0;
  transition: color 0.3s var(--ease);
}

article:hover h3 {
  color: var(--peach-600);
}

article p {
  color: var(--ink-500);
  font-size: 0.95rem;
}

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

article p:last-child a {
  display: inline-block;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: var(--grad-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

article p:last-child a:hover {
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(232, 86, 122, 0.35);
}

/* ---------- FAQ ---------- */
details {
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

details:last-child {
  margin-bottom: 0;
}

details:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--peach-300);
}

details[open] {
  border-color: var(--peach-400);
  box-shadow: var(--shadow-md);
}

summary {
  cursor: pointer;
  padding: 1rem 1.35rem;
  font-weight: 600;
  color: var(--ink-900);
  list-style: none;
  position: relative;
  padding-right: 3rem;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  border-radius: var(--radius-md);
}

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

summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--peach-500);
  transition: transform 0.35s var(--ease);
}

details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

summary:hover {
  background: var(--grad-soft);
  color: var(--peach-600);
}

details > p {
  margin: 0;
  padding: 0 1.35rem 1.25rem;
  color: var(--ink-500);
  font-size: 0.95rem;
  animation: fadeUp 0.4s var(--ease) both;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 2rem;
  padding: 2.5rem 1.25rem 2rem;
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--border-soft);
  color: var(--ink-500);
}

footer > section {
  max-width: var(--container);
  margin: 0 auto 1.75rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--grad-soft);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

footer > section h2 {
  font-size: 1.3rem;
}

footer > section p {
  font-size: 0.92rem;
  color: var(--ink-500);
}

footer > p {
  max-width: var(--container);
  margin: 0 auto 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-300);
  text-align: center;
}

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

/* ---------- Sitemap / links lists ---------- */
section[aria-labelledby="sitemap-title"] ul,
section[aria-labelledby="links-title"] ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

section[aria-labelledby="sitemap-title"] li,
section[aria-labelledby="links-title"] li {
  margin: 0;
}

section[aria-labelledby="sitemap-title"] a,
section[aria-labelledby="links-title"] a {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  font-size: 0.9rem;
  color: var(--ink-700);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

section[aria-labelledby="sitemap-title"] a:hover,
section[aria-labelledby="links-title"] a:hover {
  background: var(--grad-accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(232, 86, 122, 0.3);
}

/* ---------- Author block ---------- */
section[aria-labelledby="author-title"] p {
  font-size: 0.92rem;
  color: var(--ink-500);
  margin-bottom: 0.35rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  header > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  header nav ul {
    gap: 0.2rem 0.3rem;
  }

  header nav a {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1.1rem 0.9rem 2.5rem;
  }

  main > section,
  main > nav {
    padding: 1.3rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
  }

  section[aria-labelledby="hero-title"] {
    padding: 1.8rem 1.3rem;
  }

  footer {
    padding: 2rem 0.9rem 1.5rem;
  }

  footer > section {
    padding: 1.3rem;
    border-radius: var(--radius-md);
  }
}

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

  h2::after {
    width: 42px;
    height: 3px;
  }

  header nav ul {
    justify-content: flex-start;
  }

  header nav a {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  main > section,
  main > nav {
    padding: 1.1rem;
    border-radius: var(--radius-md);
  }

  section[aria-labelledby="hero-title"] {
    padding: 1.5rem 1.1rem;
    border-radius: var(--radius-md);
  }

  article {
    padding: 1.1rem;
  }

  summary {
    padding: 0.85rem 2.6rem 0.85rem 1.1rem;
    font-size: 0.95rem;
  }

  details > p {
    padding: 0 1.1rem 1rem;
  }

  blockquote {
    padding: 0.85rem 1.1rem;
  }

  footer > p {
    text-align: left;
  }
}

/* ---------- Motion preferences ---------- */
@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;
  }
}

/* ---------- Print ---------- */
@media print {
  header,
  footer,
  nav,
  body > a[href="#main-content"] {
    display: none !important;
  }

  main > section,
  main > nav,
  article,
  details {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
  }

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

  details {
    page-break-inside: avoid;
  }

  details > p {
    display: block !important;
  }
}