:root {
  --primary: #e05a7a;
  --primary-dark: #c94a68;
  --primary-light: #f7c4d0;
  --primary-soft: #fdf1f4;
  --accent: #a8d8c8;
  --accent-dark: #3a6b5a;
  --bg: #fffafb;
  --bg-alt: #fdf1f4;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --text: #2d2a2e;
  --text-soft: #5c565c;
  --text-muted: #8a828a;
  --border: #f0dfe4;
  --shadow-sm: 0 2px 8px rgba(224, 90, 122, 0.08);
  --shadow-md: 0 8px 28px rgba(224, 90, 122, 0.12);
  --shadow-lg: 0 18px 48px rgba(224, 90, 122, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #f07a96;
    --primary-dark: #e05a7a;
    --primary-light: #7a3a4c;
    --primary-soft: #2a1e23;
    --accent: #6fbfa6;
    --accent-dark: #a8d8c8;
    --bg: #141114;
    --bg-alt: #1c171b;
    --surface: #1f1a1e;
    --surface-glass: rgba(31, 26, 30, 0.72);
    --text: #f3ecef;
    --text-soft: #c9bfc6;
    --text-muted: #9a8f97;
    --border: #332a30;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  }
}

*,
*::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: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(224, 90, 122, 0.08), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(168, 216, 200, 0.1), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--primary-light);
  color: var(--text);
}

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

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

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

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

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

h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  margin: 0 0 1rem;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary) 55%, var(--accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin: 0 0 1rem;
  padding-left: 0.85rem;
  position: relative;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

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

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

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

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
  color: var(--text-soft);
}

li {
  margin: 0.35rem 0;
}

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

blockquote {
  margin: 1rem 0;
  padding: 1.1rem 1.3rem;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-style: italic;
}

blockquote p {
  margin: 0;
}

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--primary-soft);
  padding: 0.15rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.4rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.4rem 0;
  font-size: 0.94rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  padding: 0 0 0.6rem;
}

thead th {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 1rem;
}

tbody td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}

tbody tr {
  transition: background 0.25s var(--ease);
}

tbody tr:hover {
  background: var(--primary-soft);
}

figure {
  margin: 1.4rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.6rem 1rem;
  background: var(--surface);
}

details {
  margin: 0 0 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.15rem 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

details:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

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

summary {
  cursor: pointer;
  padding: 1rem 1.3rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 3rem;
  transition: color 0.25s var(--ease);
  border-radius: var(--radius);
}

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

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

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

details > p {
  padding: 0 1.3rem 1rem;
  margin: 0;
  animation: fadeIn 0.35s var(--ease);
}

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

/* ============ 跳转链接 ============ */
body > a[href="#main-content"] {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

body > a[href="#main-content"]:focus {
  left: 0;
}

/* ============ 头部 ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(224, 90, 122, 0.04);
}

header > div {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

header > div > a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

header > div > a svg {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(224, 90, 122, 0.3);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

header > div > a:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 6px 20px rgba(224, 90, 122, 0.45);
}

header > div > a span {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

header nav {
  flex: 1 1 auto;
  min-width: 0;
}

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

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

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

header form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

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

header form input[type="search"] {
  width: 190px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: width 0.35s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

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

header form input[type="search"]:focus {
  width: 240px;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(224, 90, 122, 0.12);
  outline: none;
}

header form button {
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  box-shadow: 0 4px 14px rgba(224, 90, 122, 0.3);
}

header form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(224, 90, 122, 0.4);
  filter: brightness(1.05);
}

header form button:active {
  transform: translateY(0);
}

/* ============ 主内容 ============ */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

main > section {
  margin: 2.5rem 0;
  padding: 1.8rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: riseIn 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 55%;
}

@supports not (animation-timeline: view()) {
  main > section {
    animation: none;
  }
}

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

main > section:hover {
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.4s var(--ease);
}

/* Hero */
#hero {
  margin-top: 1.8rem;
  padding: 2.6rem 1.8rem 2rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.35), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.25), transparent 45%),
    linear-gradient(135deg, #f7c4d0 0%, #e05a7a 48%, #c94a68 100%);
  border: none;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(8px);
  animation: floatBlob 9s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(168, 216, 200, 0.35);
  filter: blur(10px);
  animation: floatBlob 11s ease-in-out infinite reverse;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 22px) scale(1.08); }
}

#hero h1 {
  -webkit-text-fill-color: #fff;
  background: none;
  color: #fff;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.15);
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
}

#hero strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  padding: 0 0.35rem;
  border-radius: 6px;
}

#hero figure {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  transition: transform 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.01);
}

#hero figure svg {
  border-radius: var(--radius) var(--radius) 0 0;
}

#hero figcaption {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

#hero > p:last-child {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

#hero > p:last-child a {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 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(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

/* 锚点导航 */
main > nav[aria-label="页面锚点导航"] {
  margin: 1.6rem 0;
  padding: 0.9rem 1rem;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="页面锚点导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

main > nav[aria-label="页面锚点导航"] li {
  margin: 0;
}

main > nav[aria-label="页面锚点导航"] a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: all 0.28s var(--ease);
}

main > nav[aria-label="页面锚点导航"] a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(224, 90, 122, 0.28);
}

/* 文章卡片 */
main article {
  padding: 1.2rem 1.3rem;
  margin: 0 0 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

main article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  background: var(--surface);
}

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

main article:hover h3 {
  color: var(--primary);
}

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

main article a {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

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

/* 有序列表（HowTo） */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.7rem 0.9rem 0.7rem 3rem;
  margin: 0.5rem 0;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(224, 90, 122, 0.3);
}

#howto ol li:hover {
  background: var(--primary-soft);
  transform: translateX(4px);
}

/* 联系信息 */
#contact p {
  font-size: 0.96rem;
}

/* 网站地图与友情链接 */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(224, 90, 122, 0.28);
}

/* ============ 页脚 ============ */
footer {
  margin-top: 3rem;
  padding: 2.6rem 1.25rem 1.6rem;
  background: linear-gradient(180deg, var(--bg-alt), var(--surface));
  border-top: 1px solid var(--border);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

footer > section {
  max-width: var(--max);
  margin: 0 auto 1.8rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

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

footer h2 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

footer h3 {
  font-size: 1rem;
  margin-top: 1rem;
}

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

footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer li {
  margin: 0;
}

footer ul a {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease);
}

footer ul a:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
  transform: translateX(3px);
}

footer > p:last-child {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border);
  text-align: center;
}

footer small {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.9;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  header > div {
    gap: 0.8rem;
  }

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

  header form input[type="search"] {
    width: 150px;
  }

  header form input[type="search"]:focus {
    width: 180px;
  }
}

@media (max-width: 820px) {
  header > div {
    padding: 0.6rem 1rem;
    gap: 0.6rem;
  }

  header nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  header form {
    margin-left: auto;
  }

  header form input[type="search"] {
    width: 130px;
  }

  header form input[type="search"]:focus {
    width: 150px;
  }

  main > section {
    padding: 1.4rem 1.15rem;
    border-radius: var(--radius);
    margin: 1.8rem 0;
  }

  #hero {
    padding: 2rem 1.2rem 1.6rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

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

  header > div {
    padding: 0.55rem 0.85rem;
  }

  header > div > a {
    font-size: 1.05rem;
  }

  header > div > a svg {
    width: 34px;
    height: 34px;
  }

  header form input[type="search"] {
    width: 110px;
    padding: 0.45rem 0.8rem;
  }

  header form input[type="search"]:focus {
    width: 130px;
  }

  header form button {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
  }

  main {
    padding: 0 0.85rem 2rem;
  }

  main > section {
    padding: 1.2rem 1rem;
    margin: 1.4rem 0;
  }

  #hero {
    margin-top: 1rem;
    padding: 1.6rem 1rem 1.3rem;
  }

  #hero > p:last-child {
    flex-direction: column;
  }

  #hero > p:last-child a {
    text-align: center;
  }

  main > nav[aria-label="页面锚点导航"] {
    padding: 0.7rem;
  }

  main > nav[aria-label="页面锚点导航"] a {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }

  blockquote {
    padding: 0.9rem 1rem;
  }

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

  summary::after {
    right: 1rem;
  }

  details > p {
    padding: 0 1rem 0.9rem;
    font-size: 0.92rem;
  }

  footer {
    padding: 1.8rem 0.85rem 1.2rem;
  }

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

  #howto ol li {
    padding: 0.6rem 0.75rem 0.6rem 2.7rem;
  }
}

/* ============ 无障碍与动效偏好 ============ */
@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 {
  header,
  footer,
  main > nav[aria-label="页面锚点导航"],
  #hero > p:last-child {
    display: none;
  }

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

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

  a {
    color: #000;
    text-decoration: underline;
  }
}